mirror of
https://github.com/ShareX/ShareX.git
synced 2024-08-20 04:32:00 +12:00
Greenshot image editor resize button
This commit is contained in:
parent
30e773e4c8
commit
64560f1a06
10 changed files with 218 additions and 170 deletions
|
@ -69,7 +69,7 @@ public void ShowAndWait(string title, string text, ThreadStart waitDelegate)
|
||||||
this.title = title;
|
this.title = title;
|
||||||
Text = title;
|
Text = title;
|
||||||
label_pleasewait.Text = text;
|
label_pleasewait.Text = text;
|
||||||
cancelButton.Text = Language.GetString("CANCEL");
|
cancelButton.Text = "Cancel";
|
||||||
|
|
||||||
// Make sure the form is shown.
|
// Make sure the form is shown.
|
||||||
Show();
|
Show();
|
||||||
|
|
|
@ -156,11 +156,11 @@ private static void SetDataObject(IDataObject ido, bool copy)
|
||||||
string clipboardOwner = GetClipboardOwner();
|
string clipboardOwner = GetClipboardOwner();
|
||||||
if (clipboardOwner != null)
|
if (clipboardOwner != null)
|
||||||
{
|
{
|
||||||
messageText = Language.GetFormattedString("clipboard_inuse", clipboardOwner);
|
messageText = string.Format("Greenshot wasn't able to write to the clipboard as the process {0} blocked the access.", clipboardOwner);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageText = Language.GetString("clipboard_error");
|
messageText = "An unexpected error occured while writing to the clipboard.";
|
||||||
}
|
}
|
||||||
LOG.Error(messageText, ee);
|
LOG.Error(messageText, ee);
|
||||||
}
|
}
|
||||||
|
@ -199,11 +199,11 @@ public static IDataObject GetDataObject()
|
||||||
string clipboardOwner = GetClipboardOwner();
|
string clipboardOwner = GetClipboardOwner();
|
||||||
if (clipboardOwner != null)
|
if (clipboardOwner != null)
|
||||||
{
|
{
|
||||||
messageText = Language.GetFormattedString("clipboard_inuse", clipboardOwner);
|
messageText = string.Format("Greenshot wasn't able to write to the clipboard as the process {0} blocked the access.", clipboardOwner);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageText = Language.GetString("clipboard_error");
|
messageText = "An unexpected error occured while writing to the clipboard.";
|
||||||
}
|
}
|
||||||
LOG.Error(messageText, ee);
|
LOG.Error(messageText, ee);
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,7 +467,8 @@ public static string SaveWithDialog(ISurface surface, ICaptureDetails captureDet
|
||||||
}
|
}
|
||||||
catch (ExternalException)
|
catch (ExternalException)
|
||||||
{
|
{
|
||||||
MessageBox.Show(Language.GetFormattedString("error_nowriteaccess", saveImageFileDialog.FileName).Replace(@"\\", @"\"), Language.GetString("error"));
|
MessageBox.Show(string.Format("Cannot save file to {0}.\r\nPlease check write accessibility of the selected storage location.",
|
||||||
|
saveImageFileDialog.FileName).Replace(@"\\", @"\"), "Error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ private void InitializeComponent() {
|
||||||
this.btnCrop = new GreenshotPlugin.Controls.GreenshotToolStripButton();
|
this.btnCrop = new GreenshotPlugin.Controls.GreenshotToolStripButton();
|
||||||
this.rotateCwToolstripButton = new GreenshotPlugin.Controls.GreenshotToolStripButton();
|
this.rotateCwToolstripButton = new GreenshotPlugin.Controls.GreenshotToolStripButton();
|
||||||
this.rotateCcwToolstripButton = new GreenshotPlugin.Controls.GreenshotToolStripButton();
|
this.rotateCcwToolstripButton = new GreenshotPlugin.Controls.GreenshotToolStripButton();
|
||||||
|
this.btnResize = new System.Windows.Forms.ToolStripButton();
|
||||||
this.menuStrip1 = new Greenshot.Controls.MenuStripEx();
|
this.menuStrip1 = new Greenshot.Controls.MenuStripEx();
|
||||||
this.editToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.editToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
@ -251,7 +252,8 @@ private void InitializeComponent() {
|
||||||
this.toolStripSeparator13,
|
this.toolStripSeparator13,
|
||||||
this.btnCrop,
|
this.btnCrop,
|
||||||
this.rotateCwToolstripButton,
|
this.rotateCwToolstripButton,
|
||||||
this.rotateCcwToolstripButton});
|
this.rotateCcwToolstripButton,
|
||||||
|
this.btnResize});
|
||||||
this.toolStrip2.Location = new System.Drawing.Point(0, 0);
|
this.toolStrip2.Location = new System.Drawing.Point(0, 0);
|
||||||
this.toolStrip2.Name = "toolStrip2";
|
this.toolStrip2.Name = "toolStrip2";
|
||||||
this.toolStrip2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 0);
|
this.toolStrip2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 0);
|
||||||
|
@ -491,6 +493,16 @@ private void InitializeComponent() {
|
||||||
this.rotateCcwToolstripButton.Text = "Rotate counter clockwise (Control + ,)";
|
this.rotateCcwToolstripButton.Text = "Rotate counter clockwise (Control + ,)";
|
||||||
this.rotateCcwToolstripButton.Click += new System.EventHandler(this.RotateCcwToolstripButtonClick);
|
this.rotateCcwToolstripButton.Click += new System.EventHandler(this.RotateCcwToolstripButtonClick);
|
||||||
//
|
//
|
||||||
|
// btnResize
|
||||||
|
//
|
||||||
|
this.btnResize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.btnResize.Image = ((System.Drawing.Image)(resources.GetObject("btnResize.Image")));
|
||||||
|
this.btnResize.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.btnResize.Name = "btnResize";
|
||||||
|
this.btnResize.Size = new System.Drawing.Size(22, 20);
|
||||||
|
this.btnResize.Text = "Resize";
|
||||||
|
this.btnResize.Click += new System.EventHandler(this.btnResize_Click);
|
||||||
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
//
|
//
|
||||||
this.menuStrip1.ClickThrough = true;
|
this.menuStrip1.ClickThrough = true;
|
||||||
|
@ -1740,5 +1752,6 @@ private void InitializeComponent() {
|
||||||
private System.Windows.Forms.ToolStripButton btnSave;
|
private System.Windows.Forms.ToolStripButton btnSave;
|
||||||
private GreenshotPlugin.Controls.GreenshotToolStripButton btnSpeechBubble;
|
private GreenshotPlugin.Controls.GreenshotToolStripButton btnSpeechBubble;
|
||||||
private GreenshotPlugin.Controls.GreenshotToolStripButton btnStepLabel;
|
private GreenshotPlugin.Controls.GreenshotToolStripButton btnStepLabel;
|
||||||
|
private System.Windows.Forms.ToolStripButton btnResize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1298,6 +1298,23 @@ private void RotateCcwToolstripButtonClick(object sender, EventArgs e)
|
||||||
updateUndoRedoSurfaceDependencies();
|
updateUndoRedoSurfaceDependencies();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Open the resize settings from, and resize if ok was pressed
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void btnResize_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ResizeEffect resizeEffect = new ResizeEffect(surface.Image.Width, surface.Image.Height, true);
|
||||||
|
// TODO: Use the Resize SettingsForm to make it possible to change the default values
|
||||||
|
DialogResult result = new ResizeSettingsForm(resizeEffect).ShowDialog(this);
|
||||||
|
if (result == DialogResult.OK)
|
||||||
|
{
|
||||||
|
surface.ApplyBitmapEffect(resizeEffect);
|
||||||
|
updateUndoRedoSurfaceDependencies();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void InvertToolStripMenuItemClick(object sender, EventArgs e)
|
private void InvertToolStripMenuItemClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
surface.ApplyBitmapEffect(new InvertEffect());
|
surface.ApplyBitmapEffect(new InvertEffect());
|
||||||
|
|
|
@ -211,26 +211,25 @@
|
||||||
<data name="btnSpeechBubble.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnSpeechBubble.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAG1SURBVDhPzY67SyNRFIdPJulFrFYLsbS1s7DYP2ARRBsl
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVDhPzY67L0NRHMd/vbWLmDCI0WozGPwBIhEW0kQ8
|
||||||
ID7ZZd1FxEIxDkZtbKJR1BSxcRBfnZqFJJUSLKIRDcQXvjKJM4mOcWQmMSFynKPXwmUVt/MHH/fec3/f
|
KsQjIgaibhSLQb3iMdTiRrw2Wkl1Io2hVKhUSbx6W/e2dVVpSxvyc38cA0HYfJNPzjm/8/2cHPhf2dBD
|
||||||
5cLniq8NClY7zF89v7jmPz+57rUOroegPc3ojjqs/jqrv6Hc1/ul58jLe9LylphRo1nMXSLm4phRL7Jp
|
+lqLttjaytWuN3Odlhaui6A9zeiOOqz+MWttkL/RndV1YuOtCXlHvFd8SUxdIaYCeK9cJhOyUzyx9Vqp
|
||||||
OSgeefs91KEu056z0g4lfr7MrsqBKGbOELVDg4O/MGaZE1TjG1G/rdRODtMBln9wVmlvNoS6UboLv4+2
|
Q12mvWW1AXLsfJ4xKjt8+HCOGDtW8X5CnT2cYjSw5bMbco3kMB1gpYnTSQdzLoyrpTv3z8SOUNo1u8hh
|
||||||
j9K2O0QO0wEW2rl+XY3omArhC3llHTV5HhVxDBPnQyid9j1Be+XYqZPDdIC5NtOAltpN480W5q/XjW+6
|
OsBiA9d7F/XEMeLCd56UTYzJC6iIoxi8GEDprOcV2ive4Tg5TAeY12v6biP7CbzZwafrTfWbZgxdDKpl
|
||||||
MXk+bJTt/0SO8GlymA4gtHCt4qYrnFP8eBubwBvR8Sap2Cge+FvD5DDdeKAJSpe6ip2xyJSkJwTULt1v
|
45fIh3yCHKYDCHVcvbg9404pdrz1T+CNaPqWiH8EvfZ6NzlMVx+ogdzljuwxv2dKigcFjF2Zv8W/1y8t
|
||||||
EtsZlBY6i5zkMP05M41QIXwvdASF+sBVZDSRis/nssklzCYX8d6A1qBQF6AOdZn2OuNWKJq2mmsmGzjb
|
tmeOkcP0t8xWQ4HQmGFyCpWOsGckGA4spJKhZUyGlvBRhVanUOGgDnWZ9jHjOsic1mnLJqs4w1SVZkJl
|
||||||
VINpwsD1woPiQVqpw+ofC88D56i1VI7UmucINv7/2KotVbZvpjV2/DQBeATEdG4gYWca5wAAAABJRU5E
|
5p1nxYq0UofVfxeeB85UnlY4VK6dJ9j47zGUphUZSjQWdvw3AXgBZvdt/AbQj2UAAAAASUVORK5CYII=
|
||||||
rkJggg==
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnStepLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnStepLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE5SURBVDhP7ZHNSkJRFIX3fqvGNXDoAzhxcFXEP1BBnCg+
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE4SURBVDhP7ZFPS0JREMVnvlXrWrh069LFUxH/gQriRvFD
|
||||||
RFSzmjQKoaCgzCKQqDCIKC7mQNLkjvKqFNwfc7fu7eDo0ANEH+zJOeusvfc69Me4IlrvEDVviDr3RJdP
|
RLWrTasQCgrKLAKJCoOI4mEuJE3eKp9KwftjTue9Lq4ufYDoB7O599wzM+fSH+OKaL1D1Lwh6twTXT4x
|
||||||
zGcvzMcD5sMh89aIaE1J9QSPrUjEdhIJmaVSMs3lxKtUROp1cQ3DGjNvKqmeoLOXTIodj4tjmhIwzedF
|
n70wHw+YD4fMWyOiNSXVEzy2IhHbSSRklkrJNJcTr1IRqdfFNQxrzLyppHqCzl4yKXY8Lo5pSsA0nxcJ
|
||||||
ApNGQ96Ym0qqJxjbz2TkE92HhhEaTAqFH4NaTUZYRUn1PDK3F8Wi+Hj0ns2uDJblsiyrVUEWp0qqx2S+
|
TBoNeWNuKqmeYGw/k5FPdB8aRmgwKRR+DGo1GWEVJdXzyNxeFIvi49F7NrsyWJbLsqxWBVmcKqkek/k6
|
||||||
DoR+qSSWMhin0+IgiwXOnplvlVTPA/NdGBg6ev1+aOD2ejJHLj5M2szY8hfwCy07Fpt/weQDk0ywzgwh
|
EPqlkljKYJxOi4MsFjh7Zr5VUj0PzHdhYOjo9fuhgdvryRy5+DBpM2PLX8AvtOxYbP4Fkw9MMsE6M4To
|
||||||
upjmNRqd7xGdK6meC6KNFtHRCVEXaXUPUPuoXdQOzrdxr6T/rCD6BjREwGXyfU9MAAAAAElFTkSuQmCC
|
YprXaHS+R3SupHouiDZaREcnRF2k1T1A7aN2UTs438a9kv6zgugbK4/AX0C4XXEAAAAASUVORK5CYII=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnHighlight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnHighlight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
@ -311,6 +310,19 @@
|
||||||
Jmy7NWXVscfL9ANPgA1QTluVu+/yi61bzz5ddfTmm40Vi061q6avSpBPX64A1gwCZlE3JtVPf3Ll4PVX
|
Jmy7NWXVscfL9ANPgA1QTluVu+/yi61bzz5ddfTmm40Vi061q6avSpBPX64A1gwCZlE3JtVPf3Ll4PVX
|
||||||
u7ece7Zpyd6n+y2iboINkIxZVLZo/90V28493bznyqsdp26/ObT19JO1TlVbqiVjF/qLhk7hYXBIerbM
|
u7ece7Zpyd6n+y2iboINkIxZVLZo/90V28493bznyqsdp26/ObT19JO1TlVbqiVjF/qLhk7hYXBIerbM
|
||||||
Mfn5f2QMEgMZIBQ+OwiI6/DgIJC6IQ0YGADxitTt0c6Z7QAAAABJRU5ErkJggg==
|
Mfn5f2QMEgMZIBQ+OwiI6/DgIJC6IQ0YGADxitTt0c6Z7QAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnResize.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGISURBVDhPxZLdK4NhGMbfQ/4EWinmAEeIRGGLpJBolowU
|
||||||
|
U8pHvo6IEi1HRApzgBO0aIWIpom0pFDkayiUrxlpH5nZZffjmfYeGOXAr66D+76vXz31vsKfUWseQanS
|
||||||
|
WIx8FRDq+Ry2ULVfoaTj+leyD+qTx4aCpiMm59XvG/MbD/FTqOfvfSGvNIHwBAhBPa6ISVAu493jQfYg
|
||||||
|
oBgFCkcA1RhQMw30rgIrh2B36nFFTHSOHq9uNzrntqHfc2N+HzAcA7odwHgCmB/A7tTjipiITB3sLhdi
|
||||||
|
mwtRNz4A0/kDDm6cOL1/x6UVeHKA3anHFTHhGTN4cTohUZYjSl0LWVsXivu1aJjUo8ewiUXzPbtTjyti
|
||||||
|
IrMWYLXbkVg9CnnLFAq6l6Ae2kLr7Dn61p8xcfDG7tTjipiY3DU4vE+02Gzfhu7U48oncUW77HtK07Xr
|
||||||
|
8Yod/BRp6vCGvyeklJ4huezCGBaWFuQdQ7wJDRSJJCmY+uR5Z0GQVdyBIq+4Ff9Z30A9n8NX/4ogfABH
|
||||||
|
/2l//yD6wAAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Greenshot - a free and open source screenshot tool
|
* Greenshot - a free and open source screenshot tool
|
||||||
* Copyright (C) 2007-2013 Thomas Braun, Jens Klingen, Robin Krom
|
* Copyright (C) 2007-2014 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
*
|
*
|
||||||
* For more information see: http://getgreenshot.org/
|
* For more information see: http://getgreenshot.org/
|
||||||
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
namespace Greenshot.Forms {
|
namespace Greenshot {
|
||||||
partial class ResizeSettingsForm {
|
partial class ResizeSettingsForm {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
@ -56,19 +56,17 @@ private void InitializeComponent() {
|
||||||
//
|
//
|
||||||
// buttonOK
|
// buttonOK
|
||||||
//
|
//
|
||||||
this.buttonOK.LanguageKey = "OK";
|
|
||||||
this.buttonOK.Location = new System.Drawing.Point(76, 87);
|
this.buttonOK.Location = new System.Drawing.Point(76, 87);
|
||||||
this.buttonOK.Name = "buttonOK";
|
this.buttonOK.Name = "buttonOK";
|
||||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||||
this.buttonOK.TabIndex = 6;
|
this.buttonOK.TabIndex = 6;
|
||||||
this.buttonOK.Text = "Ok";
|
this.buttonOK.Text = "OK";
|
||||||
this.buttonOK.UseVisualStyleBackColor = true;
|
this.buttonOK.UseVisualStyleBackColor = true;
|
||||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||||
//
|
//
|
||||||
// buttonCancel
|
// buttonCancel
|
||||||
//
|
//
|
||||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.buttonCancel.LanguageKey = "CANCEL";
|
|
||||||
this.buttonCancel.Location = new System.Drawing.Point(157, 87);
|
this.buttonCancel.Location = new System.Drawing.Point(157, 87);
|
||||||
this.buttonCancel.Name = "buttonCancel";
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||||
|
@ -79,7 +77,6 @@ private void InitializeComponent() {
|
||||||
// checkbox_aspectratio
|
// checkbox_aspectratio
|
||||||
//
|
//
|
||||||
this.checkbox_aspectratio.AutoSize = true;
|
this.checkbox_aspectratio.AutoSize = true;
|
||||||
this.checkbox_aspectratio.LanguageKey = "editor_resize_aspectratio";
|
|
||||||
this.checkbox_aspectratio.Location = new System.Drawing.Point(22, 64);
|
this.checkbox_aspectratio.Location = new System.Drawing.Point(22, 64);
|
||||||
this.checkbox_aspectratio.Name = "checkbox_aspectratio";
|
this.checkbox_aspectratio.Name = "checkbox_aspectratio";
|
||||||
this.checkbox_aspectratio.Size = new System.Drawing.Size(124, 17);
|
this.checkbox_aspectratio.Size = new System.Drawing.Size(124, 17);
|
||||||
|
@ -90,22 +87,20 @@ private void InitializeComponent() {
|
||||||
// label_width
|
// label_width
|
||||||
//
|
//
|
||||||
this.label_width.AutoSize = true;
|
this.label_width.AutoSize = true;
|
||||||
this.label_width.LanguageKey = "editor_resize_width";
|
|
||||||
this.label_width.Location = new System.Drawing.Point(19, 15);
|
this.label_width.Location = new System.Drawing.Point(19, 15);
|
||||||
this.label_width.Name = "label_width";
|
this.label_width.Name = "label_width";
|
||||||
this.label_width.Size = new System.Drawing.Size(35, 13);
|
this.label_width.Size = new System.Drawing.Size(38, 13);
|
||||||
this.label_width.TabIndex = 14;
|
this.label_width.TabIndex = 14;
|
||||||
this.label_width.Text = "Width";
|
this.label_width.Text = "Width:";
|
||||||
//
|
//
|
||||||
// label_height
|
// label_height
|
||||||
//
|
//
|
||||||
this.label_height.AutoSize = true;
|
this.label_height.AutoSize = true;
|
||||||
this.label_height.LanguageKey = "editor_resize_height";
|
|
||||||
this.label_height.Location = new System.Drawing.Point(19, 38);
|
this.label_height.Location = new System.Drawing.Point(19, 38);
|
||||||
this.label_height.Name = "label_height";
|
this.label_height.Name = "label_height";
|
||||||
this.label_height.Size = new System.Drawing.Size(38, 13);
|
this.label_height.Size = new System.Drawing.Size(41, 13);
|
||||||
this.label_height.TabIndex = 15;
|
this.label_height.TabIndex = 15;
|
||||||
this.label_height.Text = "Height";
|
this.label_height.Text = "Height:";
|
||||||
//
|
//
|
||||||
// textbox_height
|
// textbox_height
|
||||||
//
|
//
|
||||||
|
@ -140,7 +135,7 @@ private void InitializeComponent() {
|
||||||
this.combobox_height.Location = new System.Drawing.Point(165, 38);
|
this.combobox_height.Location = new System.Drawing.Point(165, 38);
|
||||||
this.combobox_height.Name = "combobox_height";
|
this.combobox_height.Name = "combobox_height";
|
||||||
this.combobox_height.Size = new System.Drawing.Size(65, 21);
|
this.combobox_height.Size = new System.Drawing.Size(65, 21);
|
||||||
this.combobox_height.TabIndex = 19;
|
this.combobox_height.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// ResizeSettingsForm
|
// ResizeSettingsForm
|
||||||
//
|
//
|
||||||
|
@ -160,11 +155,12 @@ private void InitializeComponent() {
|
||||||
this.Controls.Add(this.buttonCancel);
|
this.Controls.Add(this.buttonCancel);
|
||||||
this.Controls.Add(this.buttonOK);
|
this.Controls.Add(this.buttonOK);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||||
this.LanguageKey = "editor_resize_settings";
|
this.LanguageKey = "";
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "ResizeSettingsForm";
|
this.Name = "ResizeSettingsForm";
|
||||||
this.ShowIcon = false;
|
this.ShowIcon = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "Resize settings";
|
this.Text = "Resize settings";
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Greenshot - a free and open source screenshot tool
|
* Greenshot - a free and open source screenshot tool
|
||||||
* Copyright (C) 2007-2013 Thomas Braun, Jens Klingen, Robin Krom
|
* Copyright (C) 2007-2014 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
*
|
*
|
||||||
* For more information see: http://getgreenshot.org/
|
* For more information see: http://getgreenshot.org/
|
||||||
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
|
||||||
|
@ -19,13 +19,13 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
using Greenshot.Core;
|
||||||
|
using GreenshotPlugin.Core;
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Greenshot.Core;
|
|
||||||
using GreenshotPlugin.Core;
|
|
||||||
|
|
||||||
namespace Greenshot.Forms
|
namespace Greenshot
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A form to set the resize settings
|
/// A form to set the resize settings
|
||||||
|
@ -42,8 +42,8 @@ public ResizeSettingsForm(ResizeEffect effect)
|
||||||
this.effect = effect;
|
this.effect = effect;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.Icon = GreenshotResources.getGreenshotIcon();
|
this.Icon = GreenshotResources.getGreenshotIcon();
|
||||||
value_pixel = Language.GetString("editor_resize_pixel");
|
value_pixel = "Pixels";
|
||||||
value_percent = Language.GetString("editor_resize_percent");
|
value_percent = "Percent";
|
||||||
combobox_width.Items.Add(value_pixel);
|
combobox_width.Items.Add(value_pixel);
|
||||||
combobox_width.Items.Add(value_percent);
|
combobox_width.Items.Add(value_percent);
|
||||||
combobox_width.SelectedItem = value_pixel;
|
combobox_width.SelectedItem = value_pixel;
|
||||||
|
@ -125,16 +125,24 @@ private void textbox_KeyUp(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!checkbox_aspectratio.Checked)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
TextBox textbox = sender as TextBox;
|
TextBox textbox = sender as TextBox;
|
||||||
if (textbox.Text.Length == 0)
|
if (textbox.Text.Length == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool isWidth = textbox == textbox_width;
|
bool isWidth = textbox == textbox_width;
|
||||||
|
if (!checkbox_aspectratio.Checked)
|
||||||
|
{
|
||||||
|
if (isWidth)
|
||||||
|
{
|
||||||
|
newWidth = double.Parse(textbox_width.Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newHeight = double.Parse(textbox_height.Text);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
bool isPercent = false;
|
bool isPercent = false;
|
||||||
if (isWidth)
|
if (isWidth)
|
||||||
{
|
{
|
||||||
|
|
|
@ -252,12 +252,12 @@
|
||||||
<Compile Include="Forms\ImageEditorForm.Designer.cs">
|
<Compile Include="Forms\ImageEditorForm.Designer.cs">
|
||||||
<DependentUpon>ImageEditorForm.cs</DependentUpon>
|
<DependentUpon>ImageEditorForm.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<None Include="Forms\ResizeSettingsForm.cs">
|
<Compile Include="Forms\ResizeSettingsForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</None>
|
</Compile>
|
||||||
<None Include="Forms\ResizeSettingsForm.Designer.cs">
|
<Compile Include="Forms\ResizeSettingsForm.Designer.cs">
|
||||||
<DependentUpon>ResizeSettingsForm.cs</DependentUpon>
|
<DependentUpon>ResizeSettingsForm.cs</DependentUpon>
|
||||||
</None>
|
</Compile>
|
||||||
<None Include="Forms\TornEdgeSettingsForm.cs">
|
<None Include="Forms\TornEdgeSettingsForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
@ -861,7 +861,8 @@ public override IMessage Invoke(IMessage myMessage)
|
||||||
{
|
{
|
||||||
destinationName = _InterceptType.FullName;
|
destinationName = _InterceptType.FullName;
|
||||||
}
|
}
|
||||||
DialogResult result = MessageBox.Show(Language.GetFormattedString("com_rejected", destinationName), Language.GetString("com_rejected_title"), MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
|
DialogResult result = MessageBox.Show(string.Format("The destination {0} rejected Greenshot access, probably a dialog is open. Close the dialog and try again.",
|
||||||
|
destinationName), "Greenshot access rejected", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
|
||||||
if (result == DialogResult.OK)
|
if (result == DialogResult.OK)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue