设置工具条按钮点击事件及调整布局
This commit is contained in:
@@ -28,37 +28,27 @@ namespace JoyD.Windows.CS
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnDrawTempDiff = new System.Windows.Forms.ToolStripButton();
|
||||
this.splitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.groupBoxTempDisplay = new System.Windows.Forms.GroupBox();
|
||||
this.picBoxTemp = new System.Windows.Forms.PictureBox();
|
||||
this.toolStripContainer = new System.Windows.Forms.ToolStripContainer();
|
||||
this.tempDiffToolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.btnDrawRegion = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnSelectColor = new System.Windows.Forms.ToolStripButton();
|
||||
this.btnDeleteRegion = new System.Windows.Forms.ToolStripButton();
|
||||
this.tempDiffToolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.btnDrawTempDiff = new System.Windows.Forms.ToolStripButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.Panel2.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.groupBoxTempDisplay.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.picBoxTemp)).BeginInit();
|
||||
this.toolStripContainer.ContentPanel.SuspendLayout();
|
||||
this.toolStripContainer.TopToolStripPanel.SuspendLayout();
|
||||
this.toolStripContainer.SuspendLayout();
|
||||
this.toolStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnDrawTempDiff
|
||||
//
|
||||
this.btnDrawTempDiff.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnDrawTempDiff.ImageTransparentColor = System.Drawing.Color.Transparent;
|
||||
this.btnDrawTempDiff.Name = "btnDrawTempDiff";
|
||||
this.btnDrawTempDiff.Size = new System.Drawing.Size(23, 4);
|
||||
this.btnDrawTempDiff.Text = "绘制温差图";
|
||||
this.btnDrawTempDiff.ToolTipText = "绘制温差图";
|
||||
this.btnDrawTempDiff.Click += new System.EventHandler(this.BtnDrawTempDiff_Click);
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
@@ -108,8 +98,7 @@ namespace JoyD.Windows.CS
|
||||
//
|
||||
// toolStripContainer.ContentPanel
|
||||
//
|
||||
this.toolStripContainer.ContentPanel.Controls.Add(this.tempDiffToolStrip);
|
||||
this.toolStripContainer.ContentPanel.Controls.Add(this.toolStrip);
|
||||
this.toolStripContainer.ContentPanel.AutoScroll = true;
|
||||
this.toolStripContainer.ContentPanel.Size = new System.Drawing.Size(174, 425);
|
||||
this.toolStripContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.toolStripContainer.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -118,22 +107,36 @@ namespace JoyD.Windows.CS
|
||||
this.toolStripContainer.TabIndex = 0;
|
||||
this.toolStripContainer.Text = "toolStripContainer";
|
||||
//
|
||||
// toolStripContainer.TopToolStripPanel
|
||||
//
|
||||
this.toolStripContainer.TopToolStripPanel.Controls.Add(this.toolStrip);
|
||||
this.toolStripContainer.TopToolStripPanel.Controls.Add(this.tempDiffToolStrip);
|
||||
//
|
||||
// tempDiffToolStrip
|
||||
//
|
||||
this.tempDiffToolStrip.AllowDrop = true;
|
||||
this.tempDiffToolStrip.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.tempDiffToolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.tempDiffToolStrip.Location = new System.Drawing.Point(110, 0);
|
||||
this.tempDiffToolStrip.Name = "tempDiffToolStrip";
|
||||
this.tempDiffToolStrip.Size = new System.Drawing.Size(51, 25);
|
||||
this.tempDiffToolStrip.TabIndex = 4;
|
||||
this.tempDiffToolStrip.Text = "温差图例";
|
||||
//
|
||||
// toolStrip
|
||||
//
|
||||
this.toolStrip.AllowDrop = true;
|
||||
this.toolStrip.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
|
||||
this.toolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.btnDrawRegion,
|
||||
this.btnSelectColor,
|
||||
this.btnDeleteRegion,
|
||||
this.btnDrawTempDiff});
|
||||
this.toolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
|
||||
this.toolStrip.Location = new System.Drawing.Point(22, 96);
|
||||
this.toolStrip.Location = new System.Drawing.Point(3, 0);
|
||||
this.toolStrip.Name = "toolStrip";
|
||||
this.toolStrip.Size = new System.Drawing.Size(93, 7);
|
||||
this.toolStrip.TabIndex = 1;
|
||||
this.toolStrip.Size = new System.Drawing.Size(104, 25);
|
||||
this.toolStrip.TabIndex = 3;
|
||||
this.toolStrip.Text = "工具条";
|
||||
//
|
||||
// btnDrawRegion
|
||||
@@ -142,7 +145,7 @@ namespace JoyD.Windows.CS
|
||||
this.btnDrawRegion.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnDrawRegion.ImageTransparentColor = System.Drawing.Color.Transparent;
|
||||
this.btnDrawRegion.Name = "btnDrawRegion";
|
||||
this.btnDrawRegion.Size = new System.Drawing.Size(23, 4);
|
||||
this.btnDrawRegion.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnDrawRegion.Text = "画框";
|
||||
this.btnDrawRegion.ToolTipText = "绘制温度检测区域(点击开启/关闭)";
|
||||
this.btnDrawRegion.Click += new System.EventHandler(this.BtnDrawRegion_Click);
|
||||
@@ -152,7 +155,7 @@ namespace JoyD.Windows.CS
|
||||
this.btnSelectColor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnSelectColor.ImageTransparentColor = System.Drawing.Color.Transparent;
|
||||
this.btnSelectColor.Name = "btnSelectColor";
|
||||
this.btnSelectColor.Size = new System.Drawing.Size(23, 4);
|
||||
this.btnSelectColor.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnSelectColor.Text = "选择颜色";
|
||||
this.btnSelectColor.ToolTipText = "选择绘制区域的颜色(点击更换颜色)";
|
||||
this.btnSelectColor.Click += new System.EventHandler(this.BtnSelectColor_Click);
|
||||
@@ -162,22 +165,20 @@ namespace JoyD.Windows.CS
|
||||
this.btnDeleteRegion.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnDeleteRegion.ImageTransparentColor = System.Drawing.Color.Transparent;
|
||||
this.btnDeleteRegion.Name = "btnDeleteRegion";
|
||||
this.btnDeleteRegion.Size = new System.Drawing.Size(23, 4);
|
||||
this.btnDeleteRegion.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnDeleteRegion.Text = "删除区域";
|
||||
this.btnDeleteRegion.ToolTipText = "删除选中的区域";
|
||||
this.btnDeleteRegion.Click += new System.EventHandler(this.BtnDeleteRegion_Click);
|
||||
//
|
||||
// tempDiffToolStrip
|
||||
// btnDrawTempDiff
|
||||
//
|
||||
this.tempDiffToolStrip.AllowDrop = true;
|
||||
this.tempDiffToolStrip.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.tempDiffToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
|
||||
this.tempDiffToolStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.tempDiffToolStrip.Location = new System.Drawing.Point(54, 140);
|
||||
this.tempDiffToolStrip.Name = "tempDiffToolStrip";
|
||||
this.tempDiffToolStrip.Size = new System.Drawing.Size(51, 25);
|
||||
this.tempDiffToolStrip.TabIndex = 2;
|
||||
this.tempDiffToolStrip.Text = "温差图例";
|
||||
this.btnDrawTempDiff.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.btnDrawTempDiff.ImageTransparentColor = System.Drawing.Color.Transparent;
|
||||
this.btnDrawTempDiff.Name = "btnDrawTempDiff";
|
||||
this.btnDrawTempDiff.Size = new System.Drawing.Size(23, 22);
|
||||
this.btnDrawTempDiff.Text = "绘制温差图";
|
||||
this.btnDrawTempDiff.ToolTipText = "绘制温差图";
|
||||
this.btnDrawTempDiff.Click += new System.EventHandler(this.BtnDrawTempDiff_Click);
|
||||
//
|
||||
// Setting
|
||||
//
|
||||
@@ -196,8 +197,8 @@ namespace JoyD.Windows.CS
|
||||
this.splitContainer.ResumeLayout(false);
|
||||
this.groupBoxTempDisplay.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.picBoxTemp)).EndInit();
|
||||
this.toolStripContainer.ContentPanel.ResumeLayout(false);
|
||||
this.toolStripContainer.ContentPanel.PerformLayout();
|
||||
this.toolStripContainer.TopToolStripPanel.ResumeLayout(false);
|
||||
this.toolStripContainer.TopToolStripPanel.PerformLayout();
|
||||
this.toolStripContainer.ResumeLayout(false);
|
||||
this.toolStripContainer.PerformLayout();
|
||||
this.toolStrip.ResumeLayout(false);
|
||||
@@ -212,11 +213,11 @@ namespace JoyD.Windows.CS
|
||||
private System.Windows.Forms.GroupBox groupBoxTempDisplay;
|
||||
private System.Windows.Forms.PictureBox picBoxTemp;
|
||||
private System.Windows.Forms.ToolStripContainer toolStripContainer;
|
||||
private System.Windows.Forms.ToolStrip tempDiffToolStrip;
|
||||
private System.Windows.Forms.ToolStrip toolStrip;
|
||||
private System.Windows.Forms.ToolStripButton btnDrawRegion;
|
||||
private System.Windows.Forms.ToolStripButton btnSelectColor;
|
||||
private System.Windows.Forms.ToolStripButton btnDeleteRegion;
|
||||
private System.Windows.Forms.ToolStripButton btnDrawTempDiff;
|
||||
private System.Windows.Forms.ToolStrip tempDiffToolStrip;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user