Commit 4d12ecc3 LN

点形状改为图片选择

1 个父辈 6567ac0f
...@@ -71,6 +71,12 @@ ...@@ -71,6 +71,12 @@
this.linkLabel3 = new System.Windows.Forms.LinkLabel(); this.linkLabel3 = new System.Windows.Forms.LinkLabel();
this.linkLabel2 = new System.Windows.Forms.LinkLabel(); this.linkLabel2 = new System.Windows.Forms.LinkLabel();
this.groupBox4 = new System.Windows.Forms.GroupBox(); this.groupBox4 = new System.Windows.Forms.GroupBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.numSizeY = new System.Windows.Forms.NumericUpDown(); this.numSizeY = new System.Windows.Forms.NumericUpDown();
this.numSizeX = new System.Windows.Forms.NumericUpDown(); this.numSizeX = new System.Windows.Forms.NumericUpDown();
this.numPenWidth = new System.Windows.Forms.NumericUpDown(); this.numPenWidth = new System.Windows.Forms.NumericUpDown();
...@@ -83,6 +89,12 @@ ...@@ -83,6 +89,12 @@
this.groupBoxSelCom.SuspendLayout(); this.groupBoxSelCom.SuspendLayout();
this.groupBox_new.SuspendLayout(); this.groupBox_new.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numSizeY)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSizeY)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numSizeX)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSizeX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numPenWidth)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numPenWidth)).BeginInit();
...@@ -547,6 +559,12 @@ ...@@ -547,6 +559,12 @@
// //
// groupBox4 // groupBox4
// //
this.groupBox4.Controls.Add(this.pictureBox6);
this.groupBox4.Controls.Add(this.pictureBox5);
this.groupBox4.Controls.Add(this.pictureBox4);
this.groupBox4.Controls.Add(this.pictureBox3);
this.groupBox4.Controls.Add(this.pictureBox2);
this.groupBox4.Controls.Add(this.pictureBox1);
this.groupBox4.Controls.Add(this.numSizeY); this.groupBox4.Controls.Add(this.numSizeY);
this.groupBox4.Controls.Add(this.numSizeX); this.groupBox4.Controls.Add(this.numSizeX);
this.groupBox4.Controls.Add(this.numPenWidth); this.groupBox4.Controls.Add(this.numPenWidth);
...@@ -563,6 +581,66 @@ ...@@ -563,6 +581,66 @@
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "投影默认设置"; this.groupBox4.Text = "投影默认设置";
// //
// pictureBox6
//
this.pictureBox6.Location = new System.Drawing.Point(462, 15);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(40, 40);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox6.TabIndex = 343;
this.pictureBox6.TabStop = false;
this.pictureBox6.Click += new System.EventHandler(this.pictureBox6_Click);
//
// pictureBox5
//
this.pictureBox5.Location = new System.Drawing.Point(415, 15);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(40, 40);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox5.TabIndex = 342;
this.pictureBox5.TabStop = false;
this.pictureBox5.Click += new System.EventHandler(this.pictureBox5_Click);
//
// pictureBox4
//
this.pictureBox4.Location = new System.Drawing.Point(368, 15);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(40, 40);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox4.TabIndex = 341;
this.pictureBox4.TabStop = false;
this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click);
//
// pictureBox3
//
this.pictureBox3.Location = new System.Drawing.Point(321, 15);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(40, 40);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox3.TabIndex = 340;
this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click);
//
// pictureBox2
//
this.pictureBox2.Location = new System.Drawing.Point(274, 15);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(40, 40);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 339;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(227, 15);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(40, 40);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 338;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// numSizeY // numSizeY
// //
this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -637,10 +715,10 @@ ...@@ -637,10 +715,10 @@
this.lblLineWidth.Text = "画笔宽度:"; this.lblLineWidth.Text = "画笔宽度:";
this.lblLineWidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblLineWidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label7 // labelH
// //
this.labelH.Location = new System.Drawing.Point(60, 99); this.labelH.Location = new System.Drawing.Point(60, 99);
this.labelH.Name = "label7"; this.labelH.Name = "labelH";
this.labelH.Size = new System.Drawing.Size(160, 17); this.labelH.Size = new System.Drawing.Size(160, 17);
this.labelH.TabIndex = 306; this.labelH.TabIndex = 306;
this.labelH.Text = "高↓:"; this.labelH.Text = "高↓:";
...@@ -658,10 +736,12 @@ ...@@ -658,10 +736,12 @@
"4=━━", "4=━━",
"5=□", "5=□",
"6=○"}); "6=○"});
this.cmbType.Location = new System.Drawing.Point(226, 24); this.cmbType.Location = new System.Drawing.Point(609, 26);
this.cmbType.Name = "cmbType"; this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(119, 28); this.cmbType.Size = new System.Drawing.Size(18, 28);
this.cmbType.TabIndex = 305; this.cmbType.TabIndex = 305;
this.cmbType.Visible = false;
this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
// //
// lbltype // lbltype
// //
...@@ -716,6 +796,12 @@ ...@@ -716,6 +796,12 @@
this.groupBox_new.ResumeLayout(false); this.groupBox_new.ResumeLayout(false);
this.groupBox_new.PerformLayout(); this.groupBox_new.PerformLayout();
this.groupBox4.ResumeLayout(false); this.groupBox4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numSizeY)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numSizeY)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numSizeX)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numSizeX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numPenWidth)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numPenWidth)).EndInit();
...@@ -777,5 +863,11 @@ ...@@ -777,5 +863,11 @@
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
private System.Windows.Forms.CheckBox chbShowText; private System.Windows.Forms.CheckBox chbShowText;
private System.Windows.Forms.RadioButton rdbData; private System.Windows.Forms.RadioButton rdbData;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -301,7 +301,11 @@ namespace TSA_V ...@@ -301,7 +301,11 @@ namespace TSA_V
this.txtImagePath.Text= openFileDialogImg.FileName; this.txtImagePath.Text= openFileDialogImg.FileName;
} }
} }
private List<PictureBox> pictureBoxes = new List<PictureBox>();
private List<Image> picDefImages = new List<Image>();
private List<Image> picSelImages = new List<Image>();
private void FrmAddBoard_Load(object sender, EventArgs e) private void FrmAddBoard_Load(object sender, EventArgs e)
{ {
labelH.Text = ResourceCulture.GetString("FrmPointInfo_lblSizeWidth_Text", "高↓: "); labelH.Text = ResourceCulture.GetString("FrmPointInfo_lblSizeWidth_Text", "高↓: ");
...@@ -357,6 +361,29 @@ namespace TSA_V ...@@ -357,6 +361,29 @@ namespace TSA_V
txtLineWidth.Visible = false; txtLineWidth.Visible = false;
label9.Visible = false; label9.Visible = false;
} }
pictureBoxes.Add(pictureBox1);
pictureBoxes.Add(pictureBox2);
pictureBoxes.Add(pictureBox3);
pictureBoxes.Add(pictureBox4);
pictureBoxes.Add(pictureBox5);
pictureBoxes.Add(pictureBox6);
picDefImages.Add(UserFromControl.ImageManager.imgType1);
picDefImages.Add(UserFromControl.ImageManager.imgType2);
picDefImages.Add(UserFromControl.ImageManager.imgType3);
picDefImages.Add(UserFromControl.ImageManager.imgType4);
picDefImages.Add(UserFromControl.ImageManager.imgType5);
picDefImages.Add(UserFromControl.ImageManager.imgType6);
picSelImages.Add(UserFromControl.ImageManager.imgType1s);
picSelImages.Add(UserFromControl.ImageManager.imgType2s);
picSelImages.Add(UserFromControl.ImageManager.imgType3s);
picSelImages.Add(UserFromControl.ImageManager.imgType4s);
picSelImages.Add(UserFromControl.ImageManager.imgType5s);
picSelImages.Add(UserFromControl.ImageManager.imgType6s);
TypeUpdate(cmbType.SelectedIndex);
} }
private bool XyMoveControl1_ShowPointEvent(ProjectorPInfo p) private bool XyMoveControl1_ShowPointEvent(ProjectorPInfo p)
{ {
...@@ -774,5 +801,55 @@ namespace TSA_V ...@@ -774,5 +801,55 @@ namespace TSA_V
{ {
ComChange(); ComChange();
} }
private void TypeUpdate(int index)
{
for (int i = 0; i < pictureBoxes.Count; i++)
{
if (i.Equals(index))
{
pictureBoxes[i].Image = picSelImages[i];
}
else
{
pictureBoxes[i].Image = picDefImages[i];
}
}
}
private void pictureBox1_Click(object sender, EventArgs e)
{
cmbType.SelectedIndex = 0;
}
private void pictureBox2_Click(object sender, EventArgs e)
{
cmbType.SelectedIndex = 1;
}
private void pictureBox3_Click(object sender, EventArgs e)
{
cmbType.SelectedIndex = 2;
}
private void pictureBox4_Click(object sender, EventArgs e)
{
cmbType.SelectedIndex = 3;
}
private void pictureBox5_Click(object sender, EventArgs e)
{
cmbType.SelectedIndex = 4;
}
private void pictureBox6_Click(object sender, EventArgs e)
{
cmbType.SelectedIndex = 5;
}
private void cmbType_SelectedIndexChanged(object sender, EventArgs e)
{
TypeUpdate(cmbType.SelectedIndex);
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!