mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 22:34:27 -07:00
Improving the DPI handling for most forms, there are still issues with:
* the AboutForm.Designer.cs where the title with the version scales differently. * the destination picker doesn't seem to scale the font correctly. Some parts are not tested yet...
This commit is contained in:
parent
d8aeab5514
commit
21be3a93a5
36 changed files with 209 additions and 209 deletions
|
@ -4,6 +4,9 @@
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||||
</startup>
|
</startup>
|
||||||
|
<System.Windows.Forms.ApplicationConfigurationSection>
|
||||||
|
<add key="DpiAwareness" value="PerMonitorV2" />
|
||||||
|
</System.Windows.Forms.ApplicationConfigurationSection>
|
||||||
<runtime>
|
<runtime>
|
||||||
<loadFromRemoteSources enabled="true" />
|
<loadFromRemoteSources enabled="true" />
|
||||||
<relativeBindForResources enabled="true" />
|
<relativeBindForResources enabled="true" />
|
||||||
|
|
7
Greenshot/Forms/AboutForm.Designer.cs
generated
7
Greenshot/Forms/AboutForm.Designer.cs
generated
|
@ -67,7 +67,7 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// lblTitle
|
// lblTitle
|
||||||
//
|
//
|
||||||
this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World, ((byte)(0)));
|
||||||
this.lblTitle.Location = new System.Drawing.Point(108, 12);
|
this.lblTitle.Location = new System.Drawing.Point(108, 12);
|
||||||
this.lblTitle.Name = "lblTitle";
|
this.lblTitle.Name = "lblTitle";
|
||||||
this.lblTitle.Size = new System.Drawing.Size(263, 19);
|
this.lblTitle.Size = new System.Drawing.Size(263, 19);
|
||||||
|
@ -195,8 +195,11 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// AboutForm
|
// AboutForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
//this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
//this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96, 96);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
|
|
||||||
this.ClientSize = new System.Drawing.Size(530, 293);
|
this.ClientSize = new System.Drawing.Size(530, 293);
|
||||||
this.Controls.Add(this.lblTranslation);
|
this.Controls.Add(this.lblTranslation);
|
||||||
this.Controls.Add(this.pictureBox1);
|
this.Controls.Add(this.pictureBox1);
|
||||||
|
|
4
Greenshot/Forms/CaptureForm.Designer.cs
generated
4
Greenshot/Forms/CaptureForm.Designer.cs
generated
|
@ -55,8 +55,8 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// CaptureForm
|
// CaptureForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(0, 0);
|
this.ClientSize = new System.Drawing.Size(0, 0);
|
||||||
this.Cursor = System.Windows.Forms.Cursors.Cross;
|
this.Cursor = System.Windows.Forms.Cursors.Cross;
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
|
|
|
@ -105,7 +105,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
this.label3.AutoSize = true;
|
|
||||||
this.label3.Location = new System.Drawing.Point(153, 35);
|
this.label3.Location = new System.Drawing.Point(153, 35);
|
||||||
this.label3.Name = "label3";
|
this.label3.Name = "label3";
|
||||||
this.label3.Size = new System.Drawing.Size(14, 13);
|
this.label3.Size = new System.Drawing.Size(14, 13);
|
||||||
|
@ -166,7 +165,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelDarkness
|
// labelDarkness
|
||||||
//
|
//
|
||||||
this.labelDarkness.AutoSize = true;
|
|
||||||
this.labelDarkness.LanguageKey = "editor_dropshadow_darkness";
|
this.labelDarkness.LanguageKey = "editor_dropshadow_darkness";
|
||||||
this.labelDarkness.Location = new System.Drawing.Point(12, 73);
|
this.labelDarkness.Location = new System.Drawing.Point(12, 73);
|
||||||
this.labelDarkness.Name = "labelDarkness";
|
this.labelDarkness.Name = "labelDarkness";
|
||||||
|
@ -175,7 +173,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelOffset
|
// labelOffset
|
||||||
//
|
//
|
||||||
this.labelOffset.AutoSize = true;
|
|
||||||
this.labelOffset.LanguageKey = "editor_dropshadow_offset";
|
this.labelOffset.LanguageKey = "editor_dropshadow_offset";
|
||||||
this.labelOffset.Location = new System.Drawing.Point(12, 35);
|
this.labelOffset.Location = new System.Drawing.Point(12, 35);
|
||||||
this.labelOffset.Name = "labelOffset";
|
this.labelOffset.Name = "labelOffset";
|
||||||
|
@ -184,7 +181,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelThickness
|
// labelThickness
|
||||||
//
|
//
|
||||||
this.labelThickness.AutoSize = true;
|
|
||||||
this.labelThickness.LanguageKey = "editor_dropshadow_thickness";
|
this.labelThickness.LanguageKey = "editor_dropshadow_thickness";
|
||||||
this.labelThickness.Location = new System.Drawing.Point(12, 9);
|
this.labelThickness.Location = new System.Drawing.Point(12, 9);
|
||||||
this.labelThickness.Name = "labelThickness";
|
this.labelThickness.Name = "labelThickness";
|
||||||
|
@ -194,8 +190,8 @@ namespace Greenshot.Forms {
|
||||||
// DropShadowSettingsForm
|
// DropShadowSettingsForm
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.buttonOK;
|
this.AcceptButton = this.buttonOK;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.CancelButton = this.buttonCancel;
|
this.CancelButton = this.buttonCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(230, 154);
|
this.ClientSize = new System.Drawing.Size(230, 154);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
|
|
|
@ -102,13 +102,12 @@ namespace Greenshot {
|
||||||
propertiesToolStrip.ImageScalingSize = newSize;
|
propertiesToolStrip.ImageScalingSize = newSize;
|
||||||
propertiesToolStrip.MinimumSize = new Size(150, newSize.Height + 10);
|
propertiesToolStrip.MinimumSize = new Size(150, newSize.Height + 10);
|
||||||
|
|
||||||
_surface.AdjustToDpi(dpi);
|
_surface?.AdjustToDpi(dpi);
|
||||||
|
UpdateUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ImageEditorForm(ISurface iSurface, bool outputMade)
|
public ImageEditorForm(ISurface iSurface, bool outputMade)
|
||||||
{
|
{
|
||||||
// Make sure we change the icon size depending on the scaling
|
|
||||||
DpiChanged += AdjustToDpi;
|
|
||||||
EditorList.Add(this);
|
EditorList.Add(this);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -116,6 +115,8 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
ManualLanguageApply = true;
|
ManualLanguageApply = true;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
// Make sure we change the icon size depending on the scaling
|
||||||
|
DpiChanged += AdjustToDpi;
|
||||||
Load += delegate {
|
Load += delegate {
|
||||||
var thread = new Thread(AddDestinations)
|
var thread = new Thread(AddDestinations)
|
||||||
{
|
{
|
||||||
|
@ -236,7 +237,10 @@ namespace Greenshot {
|
||||||
MouseWheel += PanelMouseWheel;
|
MouseWheel += PanelMouseWheel;
|
||||||
|
|
||||||
// Make sure the value is set correctly when starting
|
// Make sure the value is set correctly when starting
|
||||||
|
if (Surface != null)
|
||||||
|
{
|
||||||
counterUpDown.Value = Surface.CounterStart;
|
counterUpDown.Value = Surface.CounterStart;
|
||||||
|
}
|
||||||
ApplyLanguage();
|
ApplyLanguage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
14
Greenshot/Forms/MainForm.Designer.cs
generated
14
Greenshot/Forms/MainForm.Designer.cs
generated
|
@ -55,24 +55,23 @@ namespace Greenshot {
|
||||||
this.contextmenu_capturewindow = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_capturewindow = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_capturefullscreen = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_capturefullscreen = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_captureie = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_captureie = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.toolStripListCaptureSeparator = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.contextmenu_capturewindowfromlist = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_capturewindowfromlist = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_captureiefromlist = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_captureiefromlist = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.toolStripOtherSourcesSeparator = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.contextmenu_captureclipboard = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_captureclipboard = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_openfile = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_openfile = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.toolStripOpenFolderSeparator = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.contextmenu_openrecentcapture = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_openrecentcapture = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.toolStripPluginSeparator = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.contextmenu_quicksettings = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_quicksettings = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_settings = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_settings = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.toolStripMiscSeparator = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.contextmenu_help = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_help = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_donate = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_donate = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.contextmenu_about = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_about = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.toolStripCloseSeparator = new System.Windows.Forms.ToolStripSeparator();
|
|
||||||
this.contextmenu_exit = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
this.contextmenu_exit = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
|
||||||
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
this.toolStripListCaptureSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripOtherSourcesSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripOpenFolderSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripPluginSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripMiscSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripCloseSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.contextMenu.SuspendLayout();
|
this.contextMenu.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
|
@ -250,6 +249,7 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// notifyIcon
|
// notifyIcon
|
||||||
//
|
//
|
||||||
|
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||||
this.notifyIcon.ContextMenuStrip = this.contextMenu;
|
this.notifyIcon.ContextMenuStrip = this.contextMenu;
|
||||||
this.notifyIcon.Text = "Greenshot";
|
this.notifyIcon.Text = "Greenshot";
|
||||||
this.notifyIcon.MouseUp += new System.Windows.Forms.MouseEventHandler(this.NotifyIconClickTest);
|
this.notifyIcon.MouseUp += new System.Windows.Forms.MouseEventHandler(this.NotifyIconClickTest);
|
||||||
|
|
|
@ -744,7 +744,10 @@ namespace Greenshot {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ContextMenuOpening(object sender, CancelEventArgs e) {
|
private void ContextMenuOpening(object sender, CancelEventArgs e)
|
||||||
|
{
|
||||||
|
var factor = DeviceDpi / 96f;
|
||||||
|
contextMenu.Scale(new SizeF(factor,factor));
|
||||||
contextmenu_captureclipboard.Enabled = ClipboardHelper.ContainsImage();
|
contextmenu_captureclipboard.Enabled = ClipboardHelper.ContainsImage();
|
||||||
contextmenu_capturelastregion.Enabled = coreConfiguration.LastCapturedRegion != Rectangle.Empty;
|
contextmenu_capturelastregion.Enabled = coreConfiguration.LastCapturedRegion != Rectangle.Empty;
|
||||||
|
|
||||||
|
@ -1025,7 +1028,7 @@ namespace Greenshot {
|
||||||
/// <param name="e">EventArgs</param>
|
/// <param name="e">EventArgs</param>
|
||||||
private void Contextmenu_DonateClick(object sender, EventArgs e) {
|
private void Contextmenu_DonateClick(object sender, EventArgs e) {
|
||||||
BeginInvoke((MethodInvoker)delegate {
|
BeginInvoke((MethodInvoker)delegate {
|
||||||
Process.Start("http://getgreenshot.org/support/?version=" + Assembly.GetEntryAssembly().GetName().Version);
|
Process.Start("http://getgreenshot.org/support/?version=" + EnvironmentInfo.GetGreenshotVersion(true));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
9
Greenshot/Forms/MovableShowColorForm.Designer.cs
generated
9
Greenshot/Forms/MovableShowColorForm.Designer.cs
generated
|
@ -52,7 +52,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
|
||||||
this.label1.Location = new System.Drawing.Point(40, 5);
|
this.label1.Location = new System.Drawing.Point(40, 5);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(37, 13);
|
this.label1.Size = new System.Drawing.Size(37, 13);
|
||||||
|
@ -69,7 +68,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
|
||||||
this.label2.Location = new System.Drawing.Point(2, 37);
|
this.label2.Location = new System.Drawing.Point(2, 37);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(33, 13);
|
this.label2.Size = new System.Drawing.Size(33, 13);
|
||||||
|
@ -92,7 +90,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// label4
|
// label4
|
||||||
//
|
//
|
||||||
this.label4.AutoSize = true;
|
|
||||||
this.label4.Location = new System.Drawing.Point(2, 50);
|
this.label4.Location = new System.Drawing.Point(2, 50);
|
||||||
this.label4.Name = "label4";
|
this.label4.Name = "label4";
|
||||||
this.label4.Size = new System.Drawing.Size(42, 13);
|
this.label4.Size = new System.Drawing.Size(42, 13);
|
||||||
|
@ -108,7 +105,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// label6
|
// label6
|
||||||
//
|
//
|
||||||
this.label6.AutoSize = true;
|
|
||||||
this.label6.Location = new System.Drawing.Point(2, 63);
|
this.label6.Location = new System.Drawing.Point(2, 63);
|
||||||
this.label6.Name = "label6";
|
this.label6.Name = "label6";
|
||||||
this.label6.Size = new System.Drawing.Size(34, 13);
|
this.label6.Size = new System.Drawing.Size(34, 13);
|
||||||
|
@ -124,7 +120,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// label5
|
// label5
|
||||||
//
|
//
|
||||||
this.label5.AutoSize = true;
|
|
||||||
this.label5.Location = new System.Drawing.Point(2, 76);
|
this.label5.Location = new System.Drawing.Point(2, 76);
|
||||||
this.label5.Name = "label5";
|
this.label5.Name = "label5";
|
||||||
this.label5.Size = new System.Drawing.Size(40, 13);
|
this.label5.Size = new System.Drawing.Size(40, 13);
|
||||||
|
@ -156,8 +151,8 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
this.Visible = false;
|
this.Visible = false;
|
||||||
this.Location = new System.Drawing.Point(-10000,-10000);
|
this.Location = new System.Drawing.Point(-10000,-10000);
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.ClientSize = new System.Drawing.Size(100, 100);
|
this.ClientSize = new System.Drawing.Size(100, 100);
|
||||||
this.Controls.Add(this.panel1);
|
this.Controls.Add(this.panel1);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
|
|
13
Greenshot/Forms/PrintOptionsDialog.Designer.cs
generated
13
Greenshot/Forms/PrintOptionsDialog.Designer.cs
generated
|
@ -68,7 +68,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkbox_dontaskagain
|
// checkbox_dontaskagain
|
||||||
//
|
//
|
||||||
this.checkbox_dontaskagain.AutoSize = true;
|
|
||||||
this.checkbox_dontaskagain.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkbox_dontaskagain.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkbox_dontaskagain.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkbox_dontaskagain.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkbox_dontaskagain.LanguageKey = "printoptions_dontaskagain";
|
this.checkbox_dontaskagain.LanguageKey = "printoptions_dontaskagain";
|
||||||
|
@ -82,7 +81,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkboxAllowShrink
|
// checkboxAllowShrink
|
||||||
//
|
//
|
||||||
this.checkboxAllowShrink.AutoSize = true;
|
|
||||||
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
|
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
|
||||||
|
@ -97,7 +95,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkboxAllowEnlarge
|
// checkboxAllowEnlarge
|
||||||
//
|
//
|
||||||
this.checkboxAllowEnlarge.AutoSize = true;
|
|
||||||
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
|
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
|
||||||
|
@ -112,7 +109,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkboxAllowCenter
|
// checkboxAllowCenter
|
||||||
//
|
//
|
||||||
this.checkboxAllowCenter.AutoSize = true;
|
|
||||||
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
|
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
|
||||||
|
@ -127,7 +123,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkboxAllowRotate
|
// checkboxAllowRotate
|
||||||
//
|
//
|
||||||
this.checkboxAllowRotate.AutoSize = true;
|
|
||||||
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
|
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
|
||||||
|
@ -155,7 +150,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkboxDateTime
|
// checkboxDateTime
|
||||||
//
|
//
|
||||||
this.checkboxDateTime.AutoSize = true;
|
|
||||||
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
|
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
|
||||||
|
@ -182,7 +176,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// checkboxPrintInverted
|
// checkboxPrintInverted
|
||||||
//
|
//
|
||||||
this.checkboxPrintInverted.AutoSize = true;
|
|
||||||
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
|
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
|
||||||
|
@ -197,7 +190,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// radioBtnGrayScale
|
// radioBtnGrayScale
|
||||||
//
|
//
|
||||||
this.radioBtnGrayScale.AutoSize = true;
|
|
||||||
this.radioBtnGrayScale.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnGrayScale.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnGrayScale.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnGrayScale.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale";
|
this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale";
|
||||||
|
@ -212,7 +204,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// radioBtnMonochrome
|
// radioBtnMonochrome
|
||||||
//
|
//
|
||||||
this.radioBtnMonochrome.AutoSize = true;
|
|
||||||
this.radioBtnMonochrome.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnMonochrome.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnMonochrome.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnMonochrome.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome";
|
this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome";
|
||||||
|
@ -227,7 +218,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// groupBoxPrintLayout
|
// groupBoxPrintLayout
|
||||||
//
|
//
|
||||||
this.groupBoxPrintLayout.AutoSize = true;
|
|
||||||
this.groupBoxPrintLayout.Controls.Add(this.checkboxDateTime);
|
this.groupBoxPrintLayout.Controls.Add(this.checkboxDateTime);
|
||||||
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowShrink);
|
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowShrink);
|
||||||
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowEnlarge);
|
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowEnlarge);
|
||||||
|
@ -243,7 +233,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// groupBoxColors
|
// groupBoxColors
|
||||||
//
|
//
|
||||||
this.groupBoxColors.AutoSize = true;
|
|
||||||
this.groupBoxColors.Controls.Add(this.checkboxPrintInverted);
|
this.groupBoxColors.Controls.Add(this.checkboxPrintInverted);
|
||||||
this.groupBoxColors.Controls.Add(this.radioBtnColorPrint);
|
this.groupBoxColors.Controls.Add(this.radioBtnColorPrint);
|
||||||
this.groupBoxColors.Controls.Add(this.radioBtnGrayScale);
|
this.groupBoxColors.Controls.Add(this.radioBtnGrayScale);
|
||||||
|
@ -258,7 +247,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
// radioBtnColorPrint
|
// radioBtnColorPrint
|
||||||
//
|
//
|
||||||
this.radioBtnColorPrint.AutoSize = true;
|
|
||||||
this.radioBtnColorPrint.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnColorPrint.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnColorPrint.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnColorPrint.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnColorPrint.LanguageKey = "printoptions_printcolor";
|
this.radioBtnColorPrint.LanguageKey = "printoptions_printcolor";
|
||||||
|
@ -274,7 +262,6 @@ namespace Greenshot.Forms
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.AutoSize = true;
|
|
||||||
this.ClientSize = new System.Drawing.Size(355, 390);
|
this.ClientSize = new System.Drawing.Size(355, 390);
|
||||||
this.Controls.Add(this.groupBoxColors);
|
this.Controls.Add(this.groupBoxColors);
|
||||||
this.Controls.Add(this.groupBoxPrintLayout);
|
this.Controls.Add(this.groupBoxPrintLayout);
|
||||||
|
|
7
Greenshot/Forms/ResizeSettingsForm.Designer.cs
generated
7
Greenshot/Forms/ResizeSettingsForm.Designer.cs
generated
|
@ -76,7 +76,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// checkbox_aspectratio
|
// checkbox_aspectratio
|
||||||
//
|
//
|
||||||
this.checkbox_aspectratio.AutoSize = true;
|
|
||||||
this.checkbox_aspectratio.LanguageKey = "editor_resize_aspectratio";
|
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";
|
||||||
|
@ -86,7 +85,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// label_width
|
// label_width
|
||||||
//
|
//
|
||||||
this.label_width.AutoSize = true;
|
|
||||||
this.label_width.LanguageKey = "editor_resize_width";
|
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";
|
||||||
|
@ -95,7 +93,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// label_height
|
// label_height
|
||||||
//
|
//
|
||||||
this.label_height.AutoSize = true;
|
|
||||||
this.label_height.LanguageKey = "editor_resize_height";
|
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";
|
||||||
|
@ -140,8 +137,8 @@ namespace Greenshot.Forms {
|
||||||
// ResizeSettingsForm
|
// ResizeSettingsForm
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.buttonOK;
|
this.AcceptButton = this.buttonOK;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.CancelButton = this.buttonCancel;
|
this.CancelButton = this.buttonCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(244, 122);
|
this.ClientSize = new System.Drawing.Size(244, 122);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
|
|
19
Greenshot/Forms/SettingsForm.Designer.cs
generated
19
Greenshot/Forms/SettingsForm.Designer.cs
generated
|
@ -705,7 +705,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// colorButton_window_background
|
// colorButton_window_background
|
||||||
//
|
//
|
||||||
this.colorButton_window_background.AutoSize = true;
|
|
||||||
this.colorButton_window_background.Image = ((System.Drawing.Image)(resources.GetObject("colorButton_window_background.Image")));
|
this.colorButton_window_background.Image = ((System.Drawing.Image)(resources.GetObject("colorButton_window_background.Image")));
|
||||||
this.colorButton_window_background.Location = new System.Drawing.Point(374, 37);
|
this.colorButton_window_background.Location = new System.Drawing.Point(374, 37);
|
||||||
this.colorButton_window_background.Name = "colorButton_window_background";
|
this.colorButton_window_background.Name = "colorButton_window_background";
|
||||||
|
@ -716,7 +715,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// radiobuttonWindowCapture
|
// radiobuttonWindowCapture
|
||||||
//
|
//
|
||||||
this.radiobuttonWindowCapture.AutoSize = true;
|
|
||||||
this.radiobuttonWindowCapture.LanguageKey = "settings_window_capture_mode";
|
this.radiobuttonWindowCapture.LanguageKey = "settings_window_capture_mode";
|
||||||
this.radiobuttonWindowCapture.Location = new System.Drawing.Point(11, 44);
|
this.radiobuttonWindowCapture.Location = new System.Drawing.Point(11, 44);
|
||||||
this.radiobuttonWindowCapture.Name = "radiobuttonWindowCapture";
|
this.radiobuttonWindowCapture.Name = "radiobuttonWindowCapture";
|
||||||
|
@ -727,7 +725,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// radiobuttonInteractiveCapture
|
// radiobuttonInteractiveCapture
|
||||||
//
|
//
|
||||||
this.radiobuttonInteractiveCapture.AutoSize = true;
|
|
||||||
this.radiobuttonInteractiveCapture.LanguageKey = "settings_capture_windows_interactive";
|
this.radiobuttonInteractiveCapture.LanguageKey = "settings_capture_windows_interactive";
|
||||||
this.radiobuttonInteractiveCapture.Location = new System.Drawing.Point(11, 20);
|
this.radiobuttonInteractiveCapture.Location = new System.Drawing.Point(11, 20);
|
||||||
this.radiobuttonInteractiveCapture.Name = "radiobuttonInteractiveCapture";
|
this.radiobuttonInteractiveCapture.Name = "radiobuttonInteractiveCapture";
|
||||||
|
@ -868,7 +865,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// groupBoxColors
|
// groupBoxColors
|
||||||
//
|
//
|
||||||
this.groupBoxColors.AutoSize = true;
|
|
||||||
this.groupBoxColors.Controls.Add(this.checkboxPrintInverted);
|
this.groupBoxColors.Controls.Add(this.checkboxPrintInverted);
|
||||||
this.groupBoxColors.Controls.Add(this.radioBtnColorPrint);
|
this.groupBoxColors.Controls.Add(this.radioBtnColorPrint);
|
||||||
this.groupBoxColors.Controls.Add(this.radioBtnGrayScale);
|
this.groupBoxColors.Controls.Add(this.radioBtnGrayScale);
|
||||||
|
@ -882,7 +878,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// checkboxPrintInverted
|
// checkboxPrintInverted
|
||||||
//
|
//
|
||||||
this.checkboxPrintInverted.AutoSize = true;
|
|
||||||
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
|
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
|
||||||
|
@ -896,7 +891,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// radioBtnColorPrint
|
// radioBtnColorPrint
|
||||||
//
|
//
|
||||||
this.radioBtnColorPrint.AutoSize = true;
|
|
||||||
this.radioBtnColorPrint.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnColorPrint.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnColorPrint.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnColorPrint.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnColorPrint.LanguageKey = "printoptions_printcolor";
|
this.radioBtnColorPrint.LanguageKey = "printoptions_printcolor";
|
||||||
|
@ -910,7 +904,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// radioBtnGrayScale
|
// radioBtnGrayScale
|
||||||
//
|
//
|
||||||
this.radioBtnGrayScale.AutoSize = true;
|
|
||||||
this.radioBtnGrayScale.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnGrayScale.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnGrayScale.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnGrayScale.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale";
|
this.radioBtnGrayScale.LanguageKey = "printoptions_printgrayscale";
|
||||||
|
@ -925,7 +918,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// radioBtnMonochrome
|
// radioBtnMonochrome
|
||||||
//
|
//
|
||||||
this.radioBtnMonochrome.AutoSize = true;
|
|
||||||
this.radioBtnMonochrome.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnMonochrome.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnMonochrome.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.radioBtnMonochrome.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome";
|
this.radioBtnMonochrome.LanguageKey = "printoptions_printmonochrome";
|
||||||
|
@ -939,7 +931,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// groupBoxPrintLayout
|
// groupBoxPrintLayout
|
||||||
//
|
//
|
||||||
this.groupBoxPrintLayout.AutoSize = true;
|
|
||||||
this.groupBoxPrintLayout.Controls.Add(this.checkboxDateTime);
|
this.groupBoxPrintLayout.Controls.Add(this.checkboxDateTime);
|
||||||
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowShrink);
|
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowShrink);
|
||||||
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowEnlarge);
|
this.groupBoxPrintLayout.Controls.Add(this.checkboxAllowEnlarge);
|
||||||
|
@ -954,7 +945,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// checkboxDateTime
|
// checkboxDateTime
|
||||||
//
|
//
|
||||||
this.checkboxDateTime.AutoSize = true;
|
|
||||||
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
|
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
|
||||||
|
@ -968,7 +958,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// checkboxAllowShrink
|
// checkboxAllowShrink
|
||||||
//
|
//
|
||||||
this.checkboxAllowShrink.AutoSize = true;
|
|
||||||
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
|
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
|
||||||
|
@ -982,7 +971,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// checkboxAllowEnlarge
|
// checkboxAllowEnlarge
|
||||||
//
|
//
|
||||||
this.checkboxAllowEnlarge.AutoSize = true;
|
|
||||||
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
|
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
|
||||||
|
@ -996,7 +984,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// checkboxAllowRotate
|
// checkboxAllowRotate
|
||||||
//
|
//
|
||||||
this.checkboxAllowRotate.AutoSize = true;
|
|
||||||
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
|
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
|
||||||
|
@ -1010,7 +997,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// checkboxAllowCenter
|
// checkboxAllowCenter
|
||||||
//
|
//
|
||||||
this.checkboxAllowCenter.AutoSize = true;
|
|
||||||
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
|
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
|
||||||
|
@ -1075,7 +1061,6 @@ namespace Greenshot {
|
||||||
// button_pluginconfigure
|
// button_pluginconfigure
|
||||||
//
|
//
|
||||||
this.button_pluginconfigure.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.button_pluginconfigure.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.button_pluginconfigure.AutoSize = true;
|
|
||||||
this.button_pluginconfigure.Enabled = false;
|
this.button_pluginconfigure.Enabled = false;
|
||||||
this.button_pluginconfigure.LanguageKey = "settings_configureplugin";
|
this.button_pluginconfigure.LanguageKey = "settings_configureplugin";
|
||||||
this.button_pluginconfigure.Location = new System.Drawing.Point(6, 285);
|
this.button_pluginconfigure.Location = new System.Drawing.Point(6, 285);
|
||||||
|
@ -1164,7 +1149,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// label_counter
|
// label_counter
|
||||||
//
|
//
|
||||||
this.label_counter.AutoSize = true;
|
|
||||||
this.label_counter.LanguageKey = "expertsettings_counter";
|
this.label_counter.LanguageKey = "expertsettings_counter";
|
||||||
this.label_counter.Location = new System.Drawing.Point(7, 285);
|
this.label_counter.Location = new System.Drawing.Point(7, 285);
|
||||||
this.label_counter.Name = "label_counter";
|
this.label_counter.Name = "label_counter";
|
||||||
|
@ -1181,7 +1165,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// label_footerpattern
|
// label_footerpattern
|
||||||
//
|
//
|
||||||
this.label_footerpattern.AutoSize = true;
|
|
||||||
this.label_footerpattern.LanguageKey = "expertsettings_footerpattern";
|
this.label_footerpattern.LanguageKey = "expertsettings_footerpattern";
|
||||||
this.label_footerpattern.Location = new System.Drawing.Point(7, 259);
|
this.label_footerpattern.Location = new System.Drawing.Point(7, 259);
|
||||||
this.label_footerpattern.Name = "label_footerpattern";
|
this.label_footerpattern.Name = "label_footerpattern";
|
||||||
|
@ -1229,7 +1212,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
// label_clipboardformats
|
// label_clipboardformats
|
||||||
//
|
//
|
||||||
this.label_clipboardformats.AutoSize = true;
|
|
||||||
this.label_clipboardformats.LanguageKey = "expertsettings_clipboardformats";
|
this.label_clipboardformats.LanguageKey = "expertsettings_clipboardformats";
|
||||||
this.label_clipboardformats.Location = new System.Drawing.Point(7, 39);
|
this.label_clipboardformats.Location = new System.Drawing.Point(7, 39);
|
||||||
this.label_clipboardformats.Name = "label_clipboardformats";
|
this.label_clipboardformats.Name = "label_clipboardformats";
|
||||||
|
@ -1273,7 +1255,6 @@ namespace Greenshot {
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.AutoSize = true;
|
|
||||||
this.ClientSize = new System.Drawing.Size(451, 431);
|
this.ClientSize = new System.Drawing.Size(451, 431);
|
||||||
this.Controls.Add(this.tabcontrol);
|
this.Controls.Add(this.tabcontrol);
|
||||||
this.Controls.Add(this.settings_confirm);
|
this.Controls.Add(this.settings_confirm);
|
||||||
|
|
13
Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
generated
13
Greenshot/Forms/TornEdgeSettingsForm.Designer.cs
generated
|
@ -123,7 +123,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
this.label3.AutoSize = true;
|
|
||||||
this.label3.Location = new System.Drawing.Point(153, 63);
|
this.label3.Location = new System.Drawing.Point(153, 63);
|
||||||
this.label3.Name = "label3";
|
this.label3.Name = "label3";
|
||||||
this.label3.Size = new System.Drawing.Size(12, 13);
|
this.label3.Size = new System.Drawing.Size(12, 13);
|
||||||
|
@ -184,7 +183,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelDarkness
|
// labelDarkness
|
||||||
//
|
//
|
||||||
this.labelDarkness.AutoSize = true;
|
|
||||||
this.labelDarkness.LanguageKey = "editor_dropshadow_darkness";
|
this.labelDarkness.LanguageKey = "editor_dropshadow_darkness";
|
||||||
this.labelDarkness.Location = new System.Drawing.Point(12, 97);
|
this.labelDarkness.Location = new System.Drawing.Point(12, 97);
|
||||||
this.labelDarkness.Name = "labelDarkness";
|
this.labelDarkness.Name = "labelDarkness";
|
||||||
|
@ -194,7 +192,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelOffset
|
// labelOffset
|
||||||
//
|
//
|
||||||
this.labelOffset.AutoSize = true;
|
|
||||||
this.labelOffset.LanguageKey = "editor_dropshadow_offset";
|
this.labelOffset.LanguageKey = "editor_dropshadow_offset";
|
||||||
this.labelOffset.Location = new System.Drawing.Point(12, 63);
|
this.labelOffset.Location = new System.Drawing.Point(12, 63);
|
||||||
this.labelOffset.Name = "labelOffset";
|
this.labelOffset.Name = "labelOffset";
|
||||||
|
@ -203,7 +200,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelThickness
|
// labelThickness
|
||||||
//
|
//
|
||||||
this.labelThickness.AutoSize = true;
|
|
||||||
this.labelThickness.LanguageKey = "editor_dropshadow_thickness";
|
this.labelThickness.LanguageKey = "editor_dropshadow_thickness";
|
||||||
this.labelThickness.Location = new System.Drawing.Point(12, 37);
|
this.labelThickness.Location = new System.Drawing.Point(12, 37);
|
||||||
this.labelThickness.Name = "labelThickness";
|
this.labelThickness.Name = "labelThickness";
|
||||||
|
@ -234,7 +230,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// label_toothsize
|
// label_toothsize
|
||||||
//
|
//
|
||||||
this.label_toothsize.AutoSize = true;
|
|
||||||
this.label_toothsize.LanguageKey = "editor_tornedge_toothsize";
|
this.label_toothsize.LanguageKey = "editor_tornedge_toothsize";
|
||||||
this.label_toothsize.Location = new System.Drawing.Point(12, 140);
|
this.label_toothsize.Location = new System.Drawing.Point(12, 140);
|
||||||
this.label_toothsize.Name = "label_toothsize";
|
this.label_toothsize.Name = "label_toothsize";
|
||||||
|
@ -243,7 +238,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// label_horizontaltoothrange
|
// label_horizontaltoothrange
|
||||||
//
|
//
|
||||||
this.label_horizontaltoothrange.AutoSize = true;
|
|
||||||
this.label_horizontaltoothrange.LanguageKey = "editor_tornedge_horizontaltoothrange";
|
this.label_horizontaltoothrange.LanguageKey = "editor_tornedge_horizontaltoothrange";
|
||||||
this.label_horizontaltoothrange.Location = new System.Drawing.Point(12, 166);
|
this.label_horizontaltoothrange.Location = new System.Drawing.Point(12, 166);
|
||||||
this.label_horizontaltoothrange.Name = "label_horizontaltoothrange";
|
this.label_horizontaltoothrange.Name = "label_horizontaltoothrange";
|
||||||
|
@ -273,7 +267,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// labelVerticaltoothrange
|
// labelVerticaltoothrange
|
||||||
//
|
//
|
||||||
this.labelVerticaltoothrange.AutoSize = true;
|
|
||||||
this.labelVerticaltoothrange.LanguageKey = "editor_tornedge_verticaltoothrange";
|
this.labelVerticaltoothrange.LanguageKey = "editor_tornedge_verticaltoothrange";
|
||||||
this.labelVerticaltoothrange.Location = new System.Drawing.Point(12, 192);
|
this.labelVerticaltoothrange.Location = new System.Drawing.Point(12, 192);
|
||||||
this.labelVerticaltoothrange.Name = "labelVerticaltoothrange";
|
this.labelVerticaltoothrange.Name = "labelVerticaltoothrange";
|
||||||
|
@ -351,7 +344,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// shadowCheckbox
|
// shadowCheckbox
|
||||||
//
|
//
|
||||||
this.shadowCheckbox.AutoSize = true;
|
|
||||||
this.shadowCheckbox.LanguageKey = "editor_tornedge_shadow";
|
this.shadowCheckbox.LanguageKey = "editor_tornedge_shadow";
|
||||||
this.shadowCheckbox.Location = new System.Drawing.Point(12, 12);
|
this.shadowCheckbox.Location = new System.Drawing.Point(12, 12);
|
||||||
this.shadowCheckbox.Name = "shadowCheckbox";
|
this.shadowCheckbox.Name = "shadowCheckbox";
|
||||||
|
@ -362,7 +354,6 @@ namespace Greenshot.Forms {
|
||||||
//
|
//
|
||||||
// all
|
// all
|
||||||
//
|
//
|
||||||
this.all.AutoSize = true;
|
|
||||||
this.all.LanguageKey = "editor_tornedge_all";
|
this.all.LanguageKey = "editor_tornedge_all";
|
||||||
this.all.Location = new System.Drawing.Point(251, 12);
|
this.all.Location = new System.Drawing.Point(251, 12);
|
||||||
this.all.Name = "all";
|
this.all.Name = "all";
|
||||||
|
@ -374,8 +365,8 @@ namespace Greenshot.Forms {
|
||||||
// TornEdgeSettingsForm
|
// TornEdgeSettingsForm
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.buttonOK;
|
this.AcceptButton = this.buttonOK;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.CancelButton = this.buttonCancel;
|
this.CancelButton = this.buttonCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(502, 223);
|
this.ClientSize = new System.Drawing.Size(502, 223);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
|
|
|
@ -846,7 +846,7 @@ namespace Greenshot.Helpers {
|
||||||
// Restore the window making sure it's visible!
|
// Restore the window making sure it's visible!
|
||||||
windowToCapture.Restore();
|
windowToCapture.Restore();
|
||||||
} else {
|
} else {
|
||||||
windowToCapture.ToForeground(false);
|
windowToCapture.ToForeground();
|
||||||
}
|
}
|
||||||
tmpCapture = windowToCapture.CaptureGdiWindow(captureForWindow);
|
tmpCapture = windowToCapture.CaptureGdiWindow(captureForWindow);
|
||||||
if (tmpCapture != null) {
|
if (tmpCapture != null) {
|
||||||
|
@ -941,7 +941,7 @@ namespace Greenshot.Helpers {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetDpi() {
|
private void SetDpi() {
|
||||||
// Workaround for proble with DPI retrieval, the FromHwnd activates the window...
|
// Workaround for problem with DPI retrieval, the FromHwnd activates the window...
|
||||||
WindowDetails previouslyActiveWindow = WindowDetails.GetActiveWindow();
|
WindowDetails previouslyActiveWindow = WindowDetails.GetActiveWindow();
|
||||||
// Workaround for changed DPI settings in Windows 7
|
// Workaround for changed DPI settings in Windows 7
|
||||||
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
||||||
|
@ -950,7 +950,7 @@ namespace Greenshot.Helpers {
|
||||||
_capture.CaptureDetails.DpiY = graphics.DpiY;
|
_capture.CaptureDetails.DpiY = graphics.DpiY;
|
||||||
}
|
}
|
||||||
// Set previouslyActiveWindow as foreground window
|
// Set previouslyActiveWindow as foreground window
|
||||||
previouslyActiveWindow?.ToForeground(false);
|
previouslyActiveWindow?.ToForeground();
|
||||||
if (_capture.CaptureDetails != null) {
|
if (_capture.CaptureDetails != null) {
|
||||||
((Bitmap) _capture.Image)?.SetResolution(_capture.CaptureDetails.DpiX, _capture.CaptureDetails.DpiY);
|
((Bitmap) _capture.Image)?.SetResolution(_capture.CaptureDetails.DpiX, _capture.CaptureDetails.DpiY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,6 @@ namespace GreenshotBoxPlugin {
|
||||||
// checkboxAfterUploadLinkToClipBoard
|
// checkboxAfterUploadLinkToClipBoard
|
||||||
//
|
//
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
|
|
||||||
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "box.label_AfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "box.label_AfterUploadLinkToClipBoard";
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(208, 45);
|
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(208, 45);
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
||||||
|
|
|
@ -106,7 +106,6 @@ namespace GreenshotDropboxPlugin {
|
||||||
//
|
//
|
||||||
// checkboxAfterUploadLinkToClipBoard
|
// checkboxAfterUploadLinkToClipBoard
|
||||||
//
|
//
|
||||||
this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
|
|
||||||
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "dropbox.label_AfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "dropbox.label_AfterUploadLinkToClipBoard";
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(116, 37);
|
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(116, 37);
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
||||||
|
|
|
@ -130,8 +130,8 @@ namespace GreenshotExternalCommandPlugin {
|
||||||
// SettingsForm
|
// SettingsForm
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.buttonOk;
|
this.AcceptButton = this.buttonOk;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.CancelButton = this.buttonCancel;
|
this.CancelButton = this.buttonCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(365, 208);
|
this.ClientSize = new System.Drawing.Size(365, 208);
|
||||||
this.Controls.Add(this.button_edit);
|
this.Controls.Add(this.button_edit);
|
||||||
|
|
|
@ -168,8 +168,8 @@ namespace GreenshotExternalCommandPlugin {
|
||||||
// SettingsFormDetail
|
// SettingsFormDetail
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.buttonOk;
|
this.AcceptButton = this.buttonOk;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||||
this.CancelButton = this.buttonCancel;
|
this.CancelButton = this.buttonCancel;
|
||||||
this.ClientSize = new System.Drawing.Size(360, 172);
|
this.ClientSize = new System.Drawing.Size(360, 172);
|
||||||
|
|
|
@ -105,7 +105,6 @@ namespace GreenshotFlickrPlugin {
|
||||||
//
|
//
|
||||||
// checkBoxPublic
|
// checkBoxPublic
|
||||||
//
|
//
|
||||||
this.checkBoxPublic.AutoSize = true;
|
|
||||||
this.checkBoxPublic.LanguageKey = "flickr.public";
|
this.checkBoxPublic.LanguageKey = "flickr.public";
|
||||||
this.checkBoxPublic.Location = new System.Drawing.Point(174, 88);
|
this.checkBoxPublic.Location = new System.Drawing.Point(174, 88);
|
||||||
this.checkBoxPublic.Name = "checkBoxPublic";
|
this.checkBoxPublic.Name = "checkBoxPublic";
|
||||||
|
@ -117,7 +116,6 @@ namespace GreenshotFlickrPlugin {
|
||||||
//
|
//
|
||||||
// checkBoxFamily
|
// checkBoxFamily
|
||||||
//
|
//
|
||||||
this.checkBoxFamily.AutoSize = true;
|
|
||||||
this.checkBoxFamily.LanguageKey = "flickr.family";
|
this.checkBoxFamily.LanguageKey = "flickr.family";
|
||||||
this.checkBoxFamily.Location = new System.Drawing.Point(265, 88);
|
this.checkBoxFamily.Location = new System.Drawing.Point(265, 88);
|
||||||
this.checkBoxFamily.Name = "checkBoxFamily";
|
this.checkBoxFamily.Name = "checkBoxFamily";
|
||||||
|
@ -129,7 +127,6 @@ namespace GreenshotFlickrPlugin {
|
||||||
//
|
//
|
||||||
// checkBoxFriend
|
// checkBoxFriend
|
||||||
//
|
//
|
||||||
this.checkBoxFriend.AutoSize = true;
|
|
||||||
this.checkBoxFriend.LanguageKey = "flickr.friend";
|
this.checkBoxFriend.LanguageKey = "flickr.friend";
|
||||||
this.checkBoxFriend.Location = new System.Drawing.Point(350, 88);
|
this.checkBoxFriend.Location = new System.Drawing.Point(350, 88);
|
||||||
this.checkBoxFriend.Name = "checkBoxFriend";
|
this.checkBoxFriend.Name = "checkBoxFriend";
|
||||||
|
@ -170,7 +167,6 @@ namespace GreenshotFlickrPlugin {
|
||||||
//
|
//
|
||||||
// checkboxAfterUploadLinkToClipBoard
|
// checkboxAfterUploadLinkToClipBoard
|
||||||
//
|
//
|
||||||
this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
|
|
||||||
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "flickr.label_AfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "flickr.label_AfterUploadLinkToClipBoard";
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(173, 116);
|
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(173, 116);
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
||||||
|
@ -182,7 +178,6 @@ namespace GreenshotFlickrPlugin {
|
||||||
//
|
//
|
||||||
// checkBox_hiddenfromsearch
|
// checkBox_hiddenfromsearch
|
||||||
//
|
//
|
||||||
this.checkBox_hiddenfromsearch.AutoSize = true;
|
|
||||||
this.checkBox_hiddenfromsearch.LanguageKey = "flickr.label_HiddenFromSearch";
|
this.checkBox_hiddenfromsearch.LanguageKey = "flickr.label_HiddenFromSearch";
|
||||||
this.checkBox_hiddenfromsearch.Location = new System.Drawing.Point(174, 60);
|
this.checkBox_hiddenfromsearch.Location = new System.Drawing.Point(174, 60);
|
||||||
this.checkBox_hiddenfromsearch.Name = "checkBox_hiddenfromsearch";
|
this.checkBox_hiddenfromsearch.Name = "checkBox_hiddenfromsearch";
|
||||||
|
|
|
@ -87,7 +87,6 @@ namespace GreenshotImgurPlugin
|
||||||
// deleteButton
|
// deleteButton
|
||||||
//
|
//
|
||||||
this.deleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.deleteButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.deleteButton.AutoSize = true;
|
|
||||||
this.deleteButton.Location = new System.Drawing.Point(109, 272);
|
this.deleteButton.Location = new System.Drawing.Point(109, 272);
|
||||||
this.deleteButton.Name = "deleteButton";
|
this.deleteButton.Name = "deleteButton";
|
||||||
this.deleteButton.Size = new System.Drawing.Size(75, 23);
|
this.deleteButton.Size = new System.Drawing.Size(75, 23);
|
||||||
|
@ -99,7 +98,6 @@ namespace GreenshotImgurPlugin
|
||||||
// openButton
|
// openButton
|
||||||
//
|
//
|
||||||
this.openButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.openButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.openButton.AutoSize = true;
|
|
||||||
this.openButton.Location = new System.Drawing.Point(109, 305);
|
this.openButton.Location = new System.Drawing.Point(109, 305);
|
||||||
this.openButton.Name = "openButton";
|
this.openButton.Name = "openButton";
|
||||||
this.openButton.Size = new System.Drawing.Size(75, 23);
|
this.openButton.Size = new System.Drawing.Size(75, 23);
|
||||||
|
@ -122,7 +120,6 @@ namespace GreenshotImgurPlugin
|
||||||
// clipboardButton
|
// clipboardButton
|
||||||
//
|
//
|
||||||
this.clipboardButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.clipboardButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.clipboardButton.AutoSize = true;
|
|
||||||
this.clipboardButton.Location = new System.Drawing.Point(109, 338);
|
this.clipboardButton.Location = new System.Drawing.Point(109, 338);
|
||||||
this.clipboardButton.Name = "clipboardButton";
|
this.clipboardButton.Name = "clipboardButton";
|
||||||
this.clipboardButton.Size = new System.Drawing.Size(129, 23);
|
this.clipboardButton.Size = new System.Drawing.Size(129, 23);
|
||||||
|
@ -144,8 +141,8 @@ namespace GreenshotImgurPlugin
|
||||||
//
|
//
|
||||||
// ImgurHistory
|
// ImgurHistory
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.ClientSize = new System.Drawing.Size(534, 372);
|
this.ClientSize = new System.Drawing.Size(534, 372);
|
||||||
this.Controls.Add(this.clearHistoryButton);
|
this.Controls.Add(this.clearHistoryButton);
|
||||||
this.Controls.Add(this.clipboardButton);
|
this.Controls.Add(this.clipboardButton);
|
||||||
|
|
|
@ -109,7 +109,6 @@ namespace GreenshotImgurPlugin {
|
||||||
//
|
//
|
||||||
// checkbox_anonymous_access
|
// checkbox_anonymous_access
|
||||||
//
|
//
|
||||||
this.checkbox_anonymous_access.AutoSize = true;
|
|
||||||
this.checkbox_anonymous_access.LanguageKey = "imgur.anonymous_access";
|
this.checkbox_anonymous_access.LanguageKey = "imgur.anonymous_access";
|
||||||
this.checkbox_anonymous_access.Location = new System.Drawing.Point(15, 38);
|
this.checkbox_anonymous_access.Location = new System.Drawing.Point(15, 38);
|
||||||
this.checkbox_anonymous_access.Name = "checkbox_anonymous_access";
|
this.checkbox_anonymous_access.Name = "checkbox_anonymous_access";
|
||||||
|
@ -121,7 +120,6 @@ namespace GreenshotImgurPlugin {
|
||||||
//
|
//
|
||||||
// checkbox_usepagelink
|
// checkbox_usepagelink
|
||||||
//
|
//
|
||||||
this.checkbox_usepagelink.AutoSize = true;
|
|
||||||
this.checkbox_usepagelink.LanguageKey = "imgur.use_page_link";
|
this.checkbox_usepagelink.LanguageKey = "imgur.use_page_link";
|
||||||
this.checkbox_usepagelink.Location = new System.Drawing.Point(15, 57);
|
this.checkbox_usepagelink.Location = new System.Drawing.Point(15, 57);
|
||||||
this.checkbox_usepagelink.Name = "checkbox_usepagelink";
|
this.checkbox_usepagelink.Name = "checkbox_usepagelink";
|
||||||
|
|
|
@ -171,12 +171,11 @@ namespace GreenshotImgurPlugin {
|
||||||
{
|
{
|
||||||
AuthUrlPattern = AuthUrlPattern,
|
AuthUrlPattern = AuthUrlPattern,
|
||||||
TokenUrl = TokenUrl,
|
TokenUrl = TokenUrl,
|
||||||
RedirectUrl = "https://imgur.com",
|
RedirectUrl = "https://getgreenshot.org/oauth/imgur",
|
||||||
CloudServiceName = "Imgur",
|
CloudServiceName = "Imgur",
|
||||||
ClientId = ImgurCredentials.CONSUMER_KEY,
|
ClientId = ImgurCredentials.CONSUMER_KEY,
|
||||||
ClientSecret = ImgurCredentials.CONSUMER_SECRET,
|
ClientSecret = ImgurCredentials.CONSUMER_SECRET,
|
||||||
AuthorizeMode = OAuth2AuthorizeMode.EmbeddedBrowser,
|
AuthorizeMode = OAuth2AuthorizeMode.OutOfBoundAuto,
|
||||||
BrowserSize = new Size(680, 880),
|
|
||||||
RefreshToken = Config.RefreshToken,
|
RefreshToken = Config.RefreshToken,
|
||||||
AccessToken = Config.AccessToken,
|
AccessToken = Config.AccessToken,
|
||||||
AccessTokenExpires = Config.AccessTokenExpires
|
AccessTokenExpires = Config.AccessTokenExpires
|
||||||
|
|
5
GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
generated
5
GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
generated
|
@ -71,7 +71,6 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
//
|
//
|
||||||
// label_jirafilter
|
// label_jirafilter
|
||||||
//
|
//
|
||||||
this.label_jirafilter.AutoSize = true;
|
|
||||||
this.label_jirafilter.Location = new System.Drawing.Point(14, 14);
|
this.label_jirafilter.Location = new System.Drawing.Point(14, 14);
|
||||||
this.label_jirafilter.Name = "label_jirafilter";
|
this.label_jirafilter.Name = "label_jirafilter";
|
||||||
this.label_jirafilter.Size = new System.Drawing.Size(52, 13);
|
this.label_jirafilter.Size = new System.Drawing.Size(52, 13);
|
||||||
|
@ -80,7 +79,6 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
//
|
//
|
||||||
// label_jira
|
// label_jira
|
||||||
//
|
//
|
||||||
this.label_jira.AutoSize = true;
|
|
||||||
this.label_jira.Location = new System.Drawing.Point(14, 41);
|
this.label_jira.Location = new System.Drawing.Point(14, 41);
|
||||||
this.label_jira.Name = "label_jira";
|
this.label_jira.Name = "label_jira";
|
||||||
this.label_jira.Size = new System.Drawing.Size(30, 13);
|
this.label_jira.Size = new System.Drawing.Size(30, 13);
|
||||||
|
@ -127,7 +125,6 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
// label_filename
|
// label_filename
|
||||||
//
|
//
|
||||||
this.label_filename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.label_filename.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.label_filename.AutoSize = true;
|
|
||||||
this.label_filename.Location = new System.Drawing.Point(14, 222);
|
this.label_filename.Location = new System.Drawing.Point(14, 222);
|
||||||
this.label_filename.Name = "label_filename";
|
this.label_filename.Name = "label_filename";
|
||||||
this.label_filename.Size = new System.Drawing.Size(49, 13);
|
this.label_filename.Size = new System.Drawing.Size(49, 13);
|
||||||
|
@ -137,7 +134,6 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
// label_comment
|
// label_comment
|
||||||
//
|
//
|
||||||
this.label_comment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.label_comment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.label_comment.AutoSize = true;
|
|
||||||
this.label_comment.Location = new System.Drawing.Point(14, 248);
|
this.label_comment.Location = new System.Drawing.Point(14, 248);
|
||||||
this.label_comment.Name = "label_comment";
|
this.label_comment.Name = "label_comment";
|
||||||
this.label_comment.Size = new System.Drawing.Size(51, 13);
|
this.label_comment.Size = new System.Drawing.Size(51, 13);
|
||||||
|
@ -167,7 +163,6 @@ namespace GreenshotJiraPlugin.Forms {
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.label1.AutoSize = true;
|
|
||||||
this.label1.Location = new System.Drawing.Point(14, 274);
|
this.label1.Location = new System.Drawing.Point(14, 274);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(23, 13);
|
this.label1.Size = new System.Drawing.Size(23, 13);
|
||||||
|
|
|
@ -96,7 +96,6 @@ namespace GreenshotPhotobucketPlugin {
|
||||||
//
|
//
|
||||||
// checkbox_usepagelink
|
// checkbox_usepagelink
|
||||||
//
|
//
|
||||||
this.checkbox_usepagelink.AutoSize = true;
|
|
||||||
this.checkbox_usepagelink.LanguageKey = "photobucket.use_page_link";
|
this.checkbox_usepagelink.LanguageKey = "photobucket.use_page_link";
|
||||||
this.checkbox_usepagelink.Location = new System.Drawing.Point(15, 43);
|
this.checkbox_usepagelink.Location = new System.Drawing.Point(15, 43);
|
||||||
this.checkbox_usepagelink.Name = "checkbox_usepagelink";
|
this.checkbox_usepagelink.Name = "checkbox_usepagelink";
|
||||||
|
|
|
@ -108,7 +108,6 @@ namespace GreenshotPicasaPlugin {
|
||||||
// checkboxAfterUploadLinkToClipBoard
|
// checkboxAfterUploadLinkToClipBoard
|
||||||
//
|
//
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
|
|
||||||
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "picasa.label_AfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "picasa.label_AfterUploadLinkToClipBoard";
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(197, 50);
|
this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(197, 50);
|
||||||
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard";
|
||||||
|
|
|
@ -55,7 +55,6 @@ namespace GreenshotPlugin.Controls
|
||||||
//
|
//
|
||||||
// label_pleasewait
|
// label_pleasewait
|
||||||
//
|
//
|
||||||
this.label_pleasewait.AutoSize = true;
|
|
||||||
this.label_pleasewait.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.label_pleasewait.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.label_pleasewait.Location = new System.Drawing.Point(0, 0);
|
this.label_pleasewait.Location = new System.Drawing.Point(0, 0);
|
||||||
this.label_pleasewait.Name = "label_pleasewait";
|
this.label_pleasewait.Name = "label_pleasewait";
|
||||||
|
@ -73,9 +72,8 @@ namespace GreenshotPlugin.Controls
|
||||||
//
|
//
|
||||||
// BackgroundForm
|
// BackgroundForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.AutoSize = true;
|
|
||||||
this.ClientSize = new System.Drawing.Size(169, 52);
|
this.ClientSize = new System.Drawing.Size(169, 52);
|
||||||
this.ControlBox = true;
|
this.ControlBox = true;
|
||||||
this.Controls.Add(this.label_pleasewait);
|
this.Controls.Add(this.label_pleasewait);
|
||||||
|
|
|
@ -70,8 +70,8 @@ namespace GreenshotPlugin.Controls {
|
||||||
//
|
//
|
||||||
// OAuthLoginForm
|
// OAuthLoginForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.ClientSize = new System.Drawing.Size(595, 315);
|
this.ClientSize = new System.Drawing.Size(595, 315);
|
||||||
this.Controls.Add(this._browser);
|
this.Controls.Add(this._browser);
|
||||||
this.Controls.Add(this._addressTextBox);
|
this.Controls.Add(this._addressTextBox);
|
||||||
|
|
|
@ -50,7 +50,6 @@ namespace GreenshotPlugin.Controls {
|
||||||
//
|
//
|
||||||
// label_pleasewait
|
// label_pleasewait
|
||||||
//
|
//
|
||||||
this.label_pleasewait.AutoSize = true;
|
|
||||||
this.label_pleasewait.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.label_pleasewait.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.label_pleasewait.Location = new System.Drawing.Point(0, 0);
|
this.label_pleasewait.Location = new System.Drawing.Point(0, 0);
|
||||||
this.label_pleasewait.Name = "label_pleasewait";
|
this.label_pleasewait.Name = "label_pleasewait";
|
||||||
|
@ -77,9 +76,8 @@ namespace GreenshotPlugin.Controls {
|
||||||
//
|
//
|
||||||
// PleaseWaitForm
|
// PleaseWaitForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||||
this.AutoSize = true;
|
|
||||||
this.CancelButton = this.cancelButton;
|
this.CancelButton = this.cancelButton;
|
||||||
this.ClientSize = new System.Drawing.Size(169, 76);
|
this.ClientSize = new System.Drawing.Size(169, 76);
|
||||||
this.Controls.Add(this.cancelButton);
|
this.Controls.Add(this.cancelButton);
|
||||||
|
|
|
@ -108,7 +108,6 @@ namespace GreenshotPlugin.Controls {
|
||||||
//
|
//
|
||||||
// checkBox_reduceColors
|
// checkBox_reduceColors
|
||||||
//
|
//
|
||||||
this.checkBox_reduceColors.AutoSize = true;
|
|
||||||
this.checkBox_reduceColors.Location = new System.Drawing.Point(12, 11);
|
this.checkBox_reduceColors.Location = new System.Drawing.Point(12, 11);
|
||||||
this.checkBox_reduceColors.Name = "checkBox_reduceColors";
|
this.checkBox_reduceColors.Name = "checkBox_reduceColors";
|
||||||
this.checkBox_reduceColors.Size = new System.Drawing.Size(95, 17);
|
this.checkBox_reduceColors.Size = new System.Drawing.Size(95, 17);
|
||||||
|
|
|
@ -155,10 +155,14 @@ namespace GreenshotPlugin.Core {
|
||||||
TopLevel = true
|
TopLevel = true
|
||||||
};
|
};
|
||||||
|
|
||||||
menu.Opened += (sender, args) =>
|
menu.Opening += (sender, args) =>
|
||||||
{
|
{
|
||||||
var scaledIconSize = DpiHelper.ScaleWithDpi(CoreConfig.IconSize, DpiHelper.GetDpi(menu.Handle));
|
// find the DPI settings for the screen where this is going to land
|
||||||
|
var screenDpi = DpiHelper.GetDpi(menu.Location);
|
||||||
|
var scaledIconSize = DpiHelper.ScaleWithDpi(CoreConfig.IconSize, screenDpi);
|
||||||
|
menu.SuspendLayout();
|
||||||
menu.ImageScalingSize = scaledIconSize;
|
menu.ImageScalingSize = scaledIconSize;
|
||||||
|
menu.ResumeLayout();
|
||||||
};
|
};
|
||||||
|
|
||||||
menu.Closing += delegate(object source, ToolStripDropDownClosingEventArgs eventArgs) {
|
menu.Closing += delegate(object source, ToolStripDropDownClosingEventArgs eventArgs) {
|
||||||
|
@ -191,7 +195,10 @@ namespace GreenshotPlugin.Core {
|
||||||
menu.MouseEnter += delegate
|
menu.MouseEnter += delegate
|
||||||
{
|
{
|
||||||
// in case the menu has been unfocused, focus again so that dropdown menus will still open on mouseenter
|
// in case the menu has been unfocused, focus again so that dropdown menus will still open on mouseenter
|
||||||
if(!menu.ContainsFocus) menu.Focus();
|
if (!menu.ContainsFocus)
|
||||||
|
{
|
||||||
|
menu.Focus();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
foreach (IDestination destination in destinations) {
|
foreach (IDestination destination in destinations) {
|
||||||
// Fix foreach loop variable for the delegate
|
// Fix foreach loop variable for the delegate
|
||||||
|
|
|
@ -453,6 +453,24 @@ namespace GreenshotPlugin.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return the DPI for the screen which the location is located on
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="location">POINT</param>
|
||||||
|
/// <returns>uint</returns>
|
||||||
|
public static uint GetDpi(POINT location)
|
||||||
|
{
|
||||||
|
RECT rect = new RECT(location.X, location.Y, 1,1);
|
||||||
|
IntPtr hMonitor = User32.MonitorFromRect(ref rect, User32.MONITOR_DEFAULTTONEAREST);
|
||||||
|
var result = GetDpiForMonitor(hMonitor, MonitorDpiType.EffectiveDpi, out var dpiX, out var dpiY);
|
||||||
|
if (result.Succeeded())
|
||||||
|
{
|
||||||
|
return dpiX;
|
||||||
|
}
|
||||||
|
return DefaultScreenDpi;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieve the DPI value for the supplied window handle
|
/// Retrieve the DPI value for the supplied window handle
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -476,7 +494,8 @@ namespace GreenshotPlugin.Core
|
||||||
{
|
{
|
||||||
var hMonitor = User32.MonitorFromWindow(hWnd, MonitorFrom.DefaultToNearest);
|
var hMonitor = User32.MonitorFromWindow(hWnd, MonitorFrom.DefaultToNearest);
|
||||||
// ReSharper disable once UnusedVariable
|
// ReSharper disable once UnusedVariable
|
||||||
if (GetDpiForMonitor(hMonitor, MonitorDpiType.EffectiveDpi, out var dpiX, out var dpiY))
|
var result = GetDpiForMonitor(hMonitor, MonitorDpiType.EffectiveDpi, out var dpiX, out var dpiY);
|
||||||
|
if (result.Succeeded())
|
||||||
{
|
{
|
||||||
return dpiX;
|
return dpiX;
|
||||||
}
|
}
|
||||||
|
@ -544,9 +563,8 @@ namespace GreenshotPlugin.Core
|
||||||
/// <param name="dpiX">out int for the horizontal dpi</param>
|
/// <param name="dpiX">out int for the horizontal dpi</param>
|
||||||
/// <param name="dpiY">out int for the vertical dpi</param>
|
/// <param name="dpiY">out int for the vertical dpi</param>
|
||||||
/// <returns>true if all okay</returns>
|
/// <returns>true if all okay</returns>
|
||||||
[DllImport("shcore")]
|
[DllImport("shcore.dll", SetLastError = true)]
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
private static extern HResult GetDpiForMonitor(IntPtr hMonitor, MonitorDpiType dpiType, out uint dpiX, out uint dpiY);
|
||||||
private static extern bool GetDpiForMonitor(IntPtr hMonitor, MonitorDpiType dpiType, out uint dpiX, out uint dpiY);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// See <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/mt748621(v=vs.85).aspx">EnableNonClientDpiScaling function</a>
|
/// See <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/mt748621(v=vs.85).aspx">EnableNonClientDpiScaling function</a>
|
||||||
|
|
|
@ -32,6 +32,8 @@ using System.Net.Sockets;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using GreenshotPlugin.Hooking;
|
||||||
|
|
||||||
namespace GreenshotPlugin.Core {
|
namespace GreenshotPlugin.Core {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -43,14 +45,15 @@ namespace GreenshotPlugin.Core {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specify the autorize mode that is used to get the token from the cloud service.
|
/// Specify the authorize mode that is used to get the token from the cloud service.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum OAuth2AuthorizeMode {
|
public enum OAuth2AuthorizeMode {
|
||||||
Unknown, // Will give an exception, caller needs to specify another value
|
Unknown, // Will give an exception, caller needs to specify another value
|
||||||
LocalServer, // Will specify a redirect URL to http://localhost:port/authorize, while having a HttpListener
|
LocalServer, // Will specify a redirect URL to http://localhost:port/authorize, while having a HttpListener
|
||||||
MonitorTitle, // Not implemented yet: Will monitor for title changes
|
MonitorTitle, // Not implemented yet: Will monitor for title changes
|
||||||
Pin, // Not implemented yet: Will ask the user to enter the shown PIN
|
Pin, // Not implemented yet: Will ask the user to enter the shown PIN
|
||||||
EmbeddedBrowser // Will open into an embedded _browser (OAuthLoginForm), and catch the redirect
|
EmbeddedBrowser, // Will open into an embedded _browser (OAuthLoginForm), and catch the redirect
|
||||||
|
OutOfBoundAuto
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1121,11 +1124,42 @@ Greenshot received information from CloudServiceName. You can close this browser
|
||||||
{
|
{
|
||||||
OAuth2AuthorizeMode.LocalServer => AuthenticateViaLocalServer(settings),
|
OAuth2AuthorizeMode.LocalServer => AuthenticateViaLocalServer(settings),
|
||||||
OAuth2AuthorizeMode.EmbeddedBrowser => AuthenticateViaEmbeddedBrowser(settings),
|
OAuth2AuthorizeMode.EmbeddedBrowser => AuthenticateViaEmbeddedBrowser(settings),
|
||||||
|
OAuth2AuthorizeMode.OutOfBoundAuto => AuthenticateViaDefaultBrowser(settings),
|
||||||
_ => throw new NotImplementedException($"Authorize mode '{settings.AuthorizeMode}' is not 'yet' implemented."),
|
_ => throw new NotImplementedException($"Authorize mode '{settings.AuthorizeMode}' is not 'yet' implemented."),
|
||||||
};
|
};
|
||||||
return completed;
|
return completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Authenticate via the default browser
|
||||||
|
/// If this works, return the code
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="settings">OAuth2Settings with the Auth / Token url etc</param>
|
||||||
|
/// <returns>true if completed, false if canceled</returns>
|
||||||
|
private static bool AuthenticateViaDefaultBrowser(OAuth2Settings settings)
|
||||||
|
{
|
||||||
|
var monitor = new WindowsTitleMonitor();
|
||||||
|
|
||||||
|
string[] code = new string[1];
|
||||||
|
monitor.TitleChangeEvent += args =>
|
||||||
|
{
|
||||||
|
if (args.Title.Contains(settings.State))
|
||||||
|
{
|
||||||
|
code[0] = args.Title;
|
||||||
|
settings.Code = args.Title;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
using (var process = Process.Start(settings.FormattedAuthUrl))
|
||||||
|
{
|
||||||
|
while (string.IsNullOrEmpty(code[0]))
|
||||||
|
{
|
||||||
|
Application.DoEvents();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Authenticate via an embedded browser
|
/// Authenticate via an embedded browser
|
||||||
/// If this works, return the code
|
/// If this works, return the code
|
||||||
|
|
|
@ -1137,46 +1137,50 @@ namespace GreenshotPlugin.Core
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the window as foreground window
|
/// Set the window as foreground window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="handle">hWnd of the window to bring to the foreground</param>
|
/// <param name="hWnd">hWnd of the window to bring to the foreground</param>
|
||||||
/// <param name="workaround">bool with true to use a trick to really bring the window to the foreground</param>
|
public static void ToForeground(IntPtr hWnd)
|
||||||
public static void ToForeground(IntPtr handle, bool workaround = true)
|
|
||||||
{
|
{
|
||||||
var window = new WindowDetails(handle);
|
var foregroundWindow = User32.GetForegroundWindow();
|
||||||
|
if (hWnd == foregroundWindow)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var window = new WindowDetails(hWnd);
|
||||||
// Nothing we can do if it's not visible!
|
// Nothing we can do if it's not visible!
|
||||||
if (!window.Visible)
|
if (!window.Visible)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var threadId1 = User32.GetWindowThreadProcessId(foregroundWindow, IntPtr.Zero);
|
||||||
|
var threadId2 = User32.GetWindowThreadProcessId(hWnd, IntPtr.Zero);
|
||||||
|
|
||||||
|
// Show window in foreground.
|
||||||
|
if (threadId1 != threadId2)
|
||||||
|
{
|
||||||
|
User32.AttachThreadInput(threadId1, threadId2, 1);
|
||||||
|
User32.SetForegroundWindow(hWnd);
|
||||||
|
User32.AttachThreadInput(threadId1, threadId2, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
User32.SetForegroundWindow(hWnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
User32.BringWindowToTop(hWnd);
|
||||||
|
|
||||||
if (window.Iconic)
|
if (window.Iconic)
|
||||||
{
|
{
|
||||||
window.Iconic = false;
|
window.Iconic = false;
|
||||||
while (window.Iconic)
|
|
||||||
{
|
|
||||||
Application.DoEvents();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms633539(v=vs.85).aspx
|
|
||||||
if (workaround)
|
|
||||||
{
|
|
||||||
const byte alt = 0xA4;
|
|
||||||
const int extendedKey = 0x1;
|
|
||||||
const int keyup = 0x2;
|
|
||||||
// Simulate an "ALT" key press.
|
|
||||||
User32.keybd_event(alt, 0x45, extendedKey | 0, 0);
|
|
||||||
// Simulate an "ALT" key release.
|
|
||||||
User32.keybd_event(alt, 0x45, extendedKey | keyup, 0);
|
|
||||||
}
|
|
||||||
// Show window in forground.
|
|
||||||
User32.BringWindowToTop(handle);
|
|
||||||
User32.SetForegroundWindow(handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the window as foreground window
|
/// Set the window as foreground window
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="workaround">true to use a workaround, otherwise the window might only flash</param>
|
public void ToForeground() {
|
||||||
public void ToForeground(bool workaround = true) {
|
ToForeground(Handle);
|
||||||
ToForeground(Handle, workaround);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -52,9 +52,6 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
||||||
public const int MONITOR_DEFAULTTONEAREST = 2;
|
public const int MONITOR_DEFAULTTONEAREST = 2;
|
||||||
public const int CURSOR_SHOWING = 0x00000001;
|
public const int CURSOR_SHOWING = 0x00000001;
|
||||||
|
|
||||||
[DllImport("user32", SetLastError = true)]
|
|
||||||
public static extern bool keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether the specified window handle identifies an existing window.
|
/// Determines whether the specified window handle identifies an existing window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -73,6 +70,11 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
||||||
[DllImport("user32", SetLastError = true)]
|
[DllImport("user32", SetLastError = true)]
|
||||||
public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int processId);
|
public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int processId);
|
||||||
[DllImport("user32", SetLastError = true)]
|
[DllImport("user32", SetLastError = true)]
|
||||||
|
public static extern int GetWindowThreadProcessId(IntPtr hWnd, IntPtr processId);
|
||||||
|
[DllImport("user32")]
|
||||||
|
public static extern IntPtr AttachThreadInput(int idAttach, int idAttachTo, int fAttach);
|
||||||
|
|
||||||
|
[DllImport("user32", SetLastError = true)]
|
||||||
public static extern IntPtr GetParent(IntPtr hWnd);
|
public static extern IntPtr GetParent(IntPtr hWnd);
|
||||||
[DllImport("user32", SetLastError = true)]
|
[DllImport("user32", SetLastError = true)]
|
||||||
public static extern int SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
|
public static extern int SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue