mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Added refresh button
This commit is contained in:
parent
d071a62a0b
commit
a9f1f27360
2 changed files with 32 additions and 8 deletions
15
ShareX/Forms/InspectWindowForm.Designer.cs
generated
15
ShareX/Forms/InspectWindowForm.Designer.cs
generated
|
@ -33,6 +33,7 @@ private void InitializeComponent()
|
|||
this.pInfo = new System.Windows.Forms.Panel();
|
||||
this.btnInspectWindow = new System.Windows.Forms.Button();
|
||||
this.btnInspectControl = new System.Windows.Forms.Button();
|
||||
this.btnRefresh = new System.Windows.Forms.Button();
|
||||
this.pInfo.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -60,7 +61,7 @@ private void InitializeComponent()
|
|||
this.pInfo.Name = "pInfo";
|
||||
this.pInfo.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.pInfo.Size = new System.Drawing.Size(672, 488);
|
||||
this.pInfo.TabIndex = 2;
|
||||
this.pInfo.TabIndex = 3;
|
||||
//
|
||||
// btnInspectWindow
|
||||
//
|
||||
|
@ -82,11 +83,22 @@ private void InitializeComponent()
|
|||
this.btnInspectControl.UseVisualStyleBackColor = true;
|
||||
this.btnInspectControl.Click += new System.EventHandler(this.btnInspectControl_Click);
|
||||
//
|
||||
// btnRefresh
|
||||
//
|
||||
this.btnRefresh.Location = new System.Drawing.Point(312, 8);
|
||||
this.btnRefresh.Name = "btnRefresh";
|
||||
this.btnRefresh.Size = new System.Drawing.Size(144, 24);
|
||||
this.btnRefresh.TabIndex = 2;
|
||||
this.btnRefresh.Text = "Refresh";
|
||||
this.btnRefresh.UseVisualStyleBackColor = true;
|
||||
this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
|
||||
//
|
||||
// InspectWindowForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(689, 536);
|
||||
this.Controls.Add(this.btnRefresh);
|
||||
this.Controls.Add(this.btnInspectControl);
|
||||
this.Controls.Add(this.btnInspectWindow);
|
||||
this.Controls.Add(this.pInfo);
|
||||
|
@ -103,5 +115,6 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Panel pInfo;
|
||||
private System.Windows.Forms.Button btnInspectWindow;
|
||||
private System.Windows.Forms.Button btnInspectControl;
|
||||
private System.Windows.Forms.Button btnRefresh;
|
||||
}
|
||||
}
|
|
@ -68,6 +68,8 @@ private void UpdateWindowInfo()
|
|||
rtbInfo.ResetText();
|
||||
|
||||
if (SelectedWindow != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
AddInfo("Window handle", SelectedWindow.Handle.ToString("X8"));
|
||||
AddInfo("Window title", SelectedWindow.Text);
|
||||
|
@ -77,6 +79,10 @@ private void UpdateWindowInfo()
|
|||
AddInfo("Client rectangle", SelectedWindow.ClientRectangle.ToString());
|
||||
AddInfo("Window styles", SelectedWindow.Styles.ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddInfo(string name, string value)
|
||||
|
@ -102,5 +108,10 @@ private void btnInspectControl_Click(object sender, EventArgs e)
|
|||
{
|
||||
SelectHandle();
|
||||
}
|
||||
|
||||
private void btnRefresh_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateWindowInfo();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue