Fixed AutoCloseAfterUploadForm option

This commit is contained in:
Jaex 2022-07-13 22:13:18 +03:00
parent 5151166816
commit a76cb6417f
3 changed files with 12 additions and 6 deletions

View file

@ -49,7 +49,11 @@ public AfterUploadForm(TaskInfo info)
ShareXResources.ApplyTheme(this);
Info = info;
if (Info.TaskSettings.AdvancedSettings.AutoCloseAfterUploadForm) tmrClose.Start();
if (Info.TaskSettings.AdvancedSettings.AutoCloseAfterUploadForm)
{
tmrClose.Start();
}
bool isFileExist = !string.IsNullOrEmpty(info.FilePath) && File.Exists(info.FilePath);

View file

@ -46,11 +46,13 @@ private void InitializeComponent()
// pbPreview
//
resources.ApplyResources(this.pbPreview, "pbPreview");
this.pbPreview.BackColor = System.Drawing.SystemColors.Window;
this.pbPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pbPreview.DrawCheckeredBackground = true;
this.pbPreview.EnableRightClickMenu = true;
this.pbPreview.FullscreenOnClick = true;
this.pbPreview.Name = "pbPreview";
this.pbPreview.PictureBoxBackColor = System.Drawing.SystemColors.Window;
this.pbPreview.ShowImageSizeLabel = true;
//
// btnCopyImage
@ -90,13 +92,13 @@ private void InitializeComponent()
//
// tmrClose
//
this.tmrClose.Enabled = true;
this.tmrClose.Interval = 60000;
this.tmrClose.Tick += new System.EventHandler(this.tmrClose_Tick);
//
// btnClose
//
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
@ -111,6 +113,7 @@ private void InitializeComponent()
this.chFormat});
this.lvClipboardFormats.FullRowSelect = true;
this.lvClipboardFormats.GridLines = true;
this.lvClipboardFormats.HideSelection = false;
this.lvClipboardFormats.Name = "lvClipboardFormats";
this.lvClipboardFormats.UseCompatibleStateImageBehavior = false;
this.lvClipboardFormats.View = System.Windows.Forms.View.Details;
@ -127,7 +130,6 @@ private void InitializeComponent()
// AfterUploadForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.Window;
this.CancelButton = this.btnClose;

View file

@ -136,7 +136,7 @@
<value>pbPreview</value>
</data>
<data name="&gt;&gt;pbPreview.Type" xml:space="preserve">
<value>ShareX.HelpersLib.MyPictureBox, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>ShareX.HelpersLib.MyPictureBox, ShareX.HelpersLib, Version=14.0.2.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;pbPreview.Parent" xml:space="preserve">
<value>$this</value>
@ -367,7 +367,7 @@
<value>lvClipboardFormats</value>
</data>
<data name="&gt;&gt;lvClipboardFormats.Type" xml:space="preserve">
<value>ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=14.0.2.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;lvClipboardFormats.Parent" xml:space="preserve">
<value>$this</value>
@ -379,7 +379,7 @@
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
<value>96, 96</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>704, 344</value>