mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 04:06:05 +13:00
Tray click to open auto capture form
This commit is contained in:
parent
f24defdce9
commit
abe6bf35b6
2 changed files with 23 additions and 14 deletions
28
ShareX/Forms/AutoCaptureForm.Designer.cs
generated
28
ShareX/Forms/AutoCaptureForm.Designer.cs
generated
|
@ -52,6 +52,7 @@ private void InitializeComponent()
|
||||||
this.lblDuration = new System.Windows.Forms.Label();
|
this.lblDuration = new System.Windows.Forms.Label();
|
||||||
this.btnFullscreen = new System.Windows.Forms.Button();
|
this.btnFullscreen = new System.Windows.Forms.Button();
|
||||||
this.niTray = new System.Windows.Forms.NotifyIcon(this.components);
|
this.niTray = new System.Windows.Forms.NotifyIcon(this.components);
|
||||||
|
this.lblDurationSeconds = new System.Windows.Forms.Label();
|
||||||
this.ssBar.SuspendLayout();
|
this.ssBar.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.nudRepeatTime)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.nudRepeatTime)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
|
@ -94,9 +95,9 @@ private void InitializeComponent()
|
||||||
this.cbWaitUploads.AutoSize = true;
|
this.cbWaitUploads.AutoSize = true;
|
||||||
this.cbWaitUploads.Location = new System.Drawing.Point(16, 128);
|
this.cbWaitUploads.Location = new System.Drawing.Point(16, 128);
|
||||||
this.cbWaitUploads.Name = "cbWaitUploads";
|
this.cbWaitUploads.Name = "cbWaitUploads";
|
||||||
this.cbWaitUploads.Size = new System.Drawing.Size(156, 17);
|
this.cbWaitUploads.Size = new System.Drawing.Size(144, 17);
|
||||||
this.cbWaitUploads.TabIndex = 5;
|
this.cbWaitUploads.TabIndex = 5;
|
||||||
this.cbWaitUploads.Text = "Wait until uploads complete";
|
this.cbWaitUploads.Text = "Wait until tasks complete";
|
||||||
this.cbWaitUploads.UseVisualStyleBackColor = true;
|
this.cbWaitUploads.UseVisualStyleBackColor = true;
|
||||||
this.cbWaitUploads.CheckedChanged += new System.EventHandler(this.cbWaitUploads_CheckedChanged);
|
this.cbWaitUploads.CheckedChanged += new System.EventHandler(this.cbWaitUploads_CheckedChanged);
|
||||||
//
|
//
|
||||||
|
@ -138,7 +139,7 @@ private void InitializeComponent()
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
65536});
|
65536});
|
||||||
this.nudRepeatTime.Location = new System.Drawing.Point(136, 72);
|
this.nudRepeatTime.Location = new System.Drawing.Point(88, 72);
|
||||||
this.nudRepeatTime.Maximum = new decimal(new int[] {
|
this.nudRepeatTime.Maximum = new decimal(new int[] {
|
||||||
3600,
|
3600,
|
||||||
0,
|
0,
|
||||||
|
@ -165,9 +166,9 @@ private void InitializeComponent()
|
||||||
this.lblDuration.AutoSize = true;
|
this.lblDuration.AutoSize = true;
|
||||||
this.lblDuration.Location = new System.Drawing.Point(16, 76);
|
this.lblDuration.Location = new System.Drawing.Point(16, 76);
|
||||||
this.lblDuration.Name = "lblDuration";
|
this.lblDuration.Name = "lblDuration";
|
||||||
this.lblDuration.Size = new System.Drawing.Size(116, 13);
|
this.lblDuration.Size = new System.Drawing.Size(67, 13);
|
||||||
this.lblDuration.TabIndex = 10;
|
this.lblDuration.TabIndex = 10;
|
||||||
this.lblDuration.Text = "Repeat time (seconds):";
|
this.lblDuration.Text = "Repeat time:";
|
||||||
//
|
//
|
||||||
// btnFullscreen
|
// btnFullscreen
|
||||||
//
|
//
|
||||||
|
@ -182,13 +183,23 @@ private void InitializeComponent()
|
||||||
// niTray
|
// niTray
|
||||||
//
|
//
|
||||||
this.niTray.Text = "ShareX - Auto capture";
|
this.niTray.Text = "ShareX - Auto capture";
|
||||||
this.niTray.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.niTray_MouseDoubleClick);
|
this.niTray.MouseClick += new System.Windows.Forms.MouseEventHandler(this.niTray_MouseClick);
|
||||||
//
|
//
|
||||||
// AutoCapture
|
// lblDurationSeconds
|
||||||
|
//
|
||||||
|
this.lblDurationSeconds.AutoSize = true;
|
||||||
|
this.lblDurationSeconds.Location = new System.Drawing.Point(160, 76);
|
||||||
|
this.lblDurationSeconds.Name = "lblDurationSeconds";
|
||||||
|
this.lblDurationSeconds.Size = new System.Drawing.Size(47, 13);
|
||||||
|
this.lblDurationSeconds.TabIndex = 13;
|
||||||
|
this.lblDurationSeconds.Text = "seconds";
|
||||||
|
//
|
||||||
|
// AutoCaptureForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(319, 180);
|
this.ClientSize = new System.Drawing.Size(319, 180);
|
||||||
|
this.Controls.Add(this.lblDurationSeconds);
|
||||||
this.Controls.Add(this.btnFullscreen);
|
this.Controls.Add(this.btnFullscreen);
|
||||||
this.Controls.Add(this.nudRepeatTime);
|
this.Controls.Add(this.nudRepeatTime);
|
||||||
this.Controls.Add(this.lblDuration);
|
this.Controls.Add(this.lblDuration);
|
||||||
|
@ -200,7 +211,7 @@ private void InitializeComponent()
|
||||||
this.Controls.Add(this.ssBar);
|
this.Controls.Add(this.ssBar);
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.Name = "AutoCapture";
|
this.Name = "AutoCaptureForm";
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "ShareX - Auto capture";
|
this.Text = "ShareX - Auto capture";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AutoCapture_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AutoCapture_FormClosing);
|
||||||
|
@ -227,5 +238,6 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.Label lblDuration;
|
private System.Windows.Forms.Label lblDuration;
|
||||||
private System.Windows.Forms.Button btnFullscreen;
|
private System.Windows.Forms.Button btnFullscreen;
|
||||||
private System.Windows.Forms.NotifyIcon niTray;
|
private System.Windows.Forms.NotifyIcon niTray;
|
||||||
|
private System.Windows.Forms.Label lblDurationSeconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -226,13 +226,10 @@ private void AutoCapture_Resize(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void niTray_MouseDoubleClick(object sender, MouseEventArgs e)
|
private void niTray_MouseClick(object sender, MouseEventArgs e)
|
||||||
{
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
{
|
{
|
||||||
niTray.Visible = false;
|
niTray.Visible = false;
|
||||||
this.ShowActivate();
|
this.ShowActivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue