Commit 6567ac0f LN

点位调试页面按钮更改,类型改为图片

1 个父辈 bec15b6b
......@@ -585,7 +585,27 @@
<Content Include="image\form\NS.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="image\form\NS.png" />
<Content Include="image\form\NS.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type1s.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type2s.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type3s.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type4s.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type5s.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type6s.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\up.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
......@@ -595,7 +615,7 @@
<Content Include="image\form\type2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\left.png">
<Content Include="image\form\right.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type6.png">
......@@ -604,7 +624,7 @@
<Content Include="image\form\type1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\right.png">
<Content Include="image\form\left.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="image\form\type4.png">
......

1018 字节 | 宽: | 高:

1.0 KB | 宽: | 高:

TSA-V/image/form/left.png
TSA-V/image/form/left.png
TSA-V/image/form/left.png
TSA-V/image/form/left.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖

1.0 KB | 宽: | 高:

1018 字节 | 宽: | 高:

TSA-V/image/form/right.png
TSA-V/image/form/right.png
TSA-V/image/form/right.png
TSA-V/image/form/right.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
......@@ -25,6 +25,14 @@ namespace UserFromControl
public static Image imgType5;
public static Image imgType6;
public static Image imgType1s;
public static Image imgType2s;
public static Image imgType3s;
public static Image imgType4s;
public static Image imgType5s;
public static Image imgType6s;
/// <summary>
/// 是否已经初始化过了
/// </summary>
......@@ -48,6 +56,14 @@ namespace UserFromControl
imgType4 = Image.FromFile(Application.StartupPath + "\\image\\form\\type4.png");
imgType5 = Image.FromFile(Application.StartupPath + "\\image\\form\\type5.png");
imgType6 = Image.FromFile(Application.StartupPath + "\\image\\form\\type6.png");
imgType1s = Image.FromFile(Application.StartupPath + "\\image\\form\\type1s.png");
imgType2s = Image.FromFile(Application.StartupPath + "\\image\\form\\type2s.png");
imgType3s = Image.FromFile(Application.StartupPath + "\\image\\form\\type3s.png");
imgType4s = Image.FromFile(Application.StartupPath + "\\image\\form\\type4s.png");
imgType5s = Image.FromFile(Application.StartupPath + "\\image\\form\\type5s.png");
imgType6s = Image.FromFile(Application.StartupPath + "\\image\\form\\type6s.png");
}
catch (Exception ex)
{
......
......@@ -29,6 +29,12 @@
private void InitializeComponent()
{
this.group = 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.cmbpolarities = new System.Windows.Forms.ComboBox();
this.lblPolarities = new System.Windows.Forms.Label();
this.panImg = new System.Windows.Forms.Panel();
......@@ -53,7 +59,15 @@
this.lblx = new System.Windows.Forms.Label();
this.btnShowPoint = new System.Windows.Forms.Button();
this.lbltype = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.group.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.numSizeX)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numY)).BeginInit();
......@@ -66,6 +80,15 @@
this.group.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.group.BackColor = System.Drawing.Color.Black;
this.group.Controls.Add(this.groupBox2);
this.group.Controls.Add(this.groupBox1);
this.group.Controls.Add(this.pictureBox6);
this.group.Controls.Add(this.pictureBox5);
this.group.Controls.Add(this.pictureBox4);
this.group.Controls.Add(this.pictureBox3);
this.group.Controls.Add(this.pictureBox2);
this.group.Controls.Add(this.pictureBox1);
this.group.Controls.Add(this.cmbpolarities);
this.group.Controls.Add(this.lblPolarities);
this.group.Controls.Add(this.panImg);
......@@ -92,12 +115,72 @@
this.group.Controls.Add(this.lbltype);
this.group.Location = new System.Drawing.Point(5, 3);
this.group.Name = "group";
this.group.Size = new System.Drawing.Size(527, 300);
this.group.Size = new System.Drawing.Size(527, 325);
this.group.TabIndex = 61;
this.group.TabStop = false;
this.group.Text = "投影位置";
this.group.Paint += new System.Windows.Forms.PaintEventHandler(this.group_Paint);
//
// pictureBox6
//
this.pictureBox6.Location = new System.Drawing.Point(377, 59);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(40, 40);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox6.TabIndex = 337;
this.pictureBox6.TabStop = false;
this.pictureBox6.Click += new System.EventHandler(this.pictureBox6_Click);
//
// pictureBox5
//
this.pictureBox5.Location = new System.Drawing.Point(330, 59);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(40, 40);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox5.TabIndex = 336;
this.pictureBox5.TabStop = false;
this.pictureBox5.Click += new System.EventHandler(this.pictureBox5_Click);
//
// pictureBox4
//
this.pictureBox4.Location = new System.Drawing.Point(283, 59);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(40, 40);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox4.TabIndex = 335;
this.pictureBox4.TabStop = false;
this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click);
//
// pictureBox3
//
this.pictureBox3.Location = new System.Drawing.Point(236, 59);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(40, 40);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox3.TabIndex = 334;
this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click);
//
// pictureBox2
//
this.pictureBox2.Location = new System.Drawing.Point(189, 59);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(40, 40);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 333;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(142, 59);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(40, 40);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 332;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// cmbpolarities
//
this.cmbpolarities.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
......@@ -113,7 +196,7 @@
" 6=右上方",
" 7=左下方",
" 8=右下方"});
this.cmbpolarities.Location = new System.Drawing.Point(147, 140);
this.cmbpolarities.Location = new System.Drawing.Point(142, 137);
this.cmbpolarities.Name = "cmbpolarities";
this.cmbpolarities.Size = new System.Drawing.Size(134, 28);
this.cmbpolarities.TabIndex = 330;
......@@ -122,9 +205,10 @@
// lblPolarities
//
this.lblPolarities.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPolarities.Location = new System.Drawing.Point(4, 146);
this.lblPolarities.ForeColor = System.Drawing.Color.White;
this.lblPolarities.Location = new System.Drawing.Point(5, 143);
this.lblPolarities.Name = "lblPolarities";
this.lblPolarities.Size = new System.Drawing.Size(142, 17);
this.lblPolarities.Size = new System.Drawing.Size(134, 17);
this.lblPolarities.TabIndex = 329;
this.lblPolarities.Text = "极性:";
this.lblPolarities.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -132,15 +216,16 @@
// panImg
//
this.panImg.ForeColor = System.Drawing.Color.White;
this.panImg.Location = new System.Drawing.Point(319, 16);
this.panImg.Location = new System.Drawing.Point(321, 104);
this.panImg.Name = "panImg";
this.panImg.Size = new System.Drawing.Size(153, 84);
this.panImg.Size = new System.Drawing.Size(134, 63);
this.panImg.TabIndex = 328;
//
// lblName
//
this.lblName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblName.Location = new System.Drawing.Point(11, 22);
this.lblName.ForeColor = System.Drawing.Color.White;
this.lblName.Location = new System.Drawing.Point(6, 109);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(132, 17);
this.lblName.TabIndex = 327;
......@@ -150,7 +235,7 @@
// txtname
//
this.txtname.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtname.Location = new System.Drawing.Point(147, 18);
this.txtname.Location = new System.Drawing.Point(142, 105);
this.txtname.Name = "txtname";
this.txtname.Size = new System.Drawing.Size(134, 26);
this.txtname.TabIndex = 326;
......@@ -158,7 +243,7 @@
// numSizeY
//
this.numSizeY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numSizeY.Location = new System.Drawing.Point(147, 202);
this.numSizeY.Location = new System.Drawing.Point(142, 209);
this.numSizeY.Maximum = new decimal(new int[] {
255,
0,
......@@ -181,7 +266,7 @@
// numSizeX
//
this.numSizeX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numSizeX.Location = new System.Drawing.Point(147, 172);
this.numSizeX.Location = new System.Drawing.Point(142, 179);
this.numSizeX.Maximum = new decimal(new int[] {
255,
0,
......@@ -204,7 +289,7 @@
// numY
//
this.numY.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numY.Location = new System.Drawing.Point(147, 78);
this.numY.Location = new System.Drawing.Point(244, 18);
this.numY.Maximum = new decimal(new int[] {
4000,
0,
......@@ -216,7 +301,7 @@
0,
0});
this.numY.Name = "numY";
this.numY.Size = new System.Drawing.Size(134, 26);
this.numY.Size = new System.Drawing.Size(100, 26);
this.numY.TabIndex = 322;
this.numY.Value = new decimal(new int[] {
300,
......@@ -227,7 +312,7 @@
// numX
//
this.numX.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numX.Location = new System.Drawing.Point(147, 48);
this.numX.Location = new System.Drawing.Point(96, 18);
this.numX.Maximum = new decimal(new int[] {
4000,
0,
......@@ -239,7 +324,7 @@
0,
0});
this.numX.Name = "numX";
this.numX.Size = new System.Drawing.Size(134, 26);
this.numX.Size = new System.Drawing.Size(100, 26);
this.numX.TabIndex = 321;
this.numX.Value = new decimal(new int[] {
300,
......@@ -250,7 +335,7 @@
// numPenWidth
//
this.numPenWidth.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.numPenWidth.Location = new System.Drawing.Point(147, 232);
this.numPenWidth.Location = new System.Drawing.Point(142, 239);
this.numPenWidth.Maximum = new decimal(new int[] {
255,
0,
......@@ -273,7 +358,8 @@
// lblLineWidth
//
this.lblLineWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLineWidth.Location = new System.Drawing.Point(11, 239);
this.lblLineWidth.ForeColor = System.Drawing.Color.White;
this.lblLineWidth.Location = new System.Drawing.Point(6, 246);
this.lblLineWidth.Name = "lblLineWidth";
this.lblLineWidth.Size = new System.Drawing.Size(132, 17);
this.lblLineWidth.TabIndex = 318;
......@@ -283,7 +369,8 @@
// lblSizeWidth
//
this.lblSizeWidth.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSizeWidth.Location = new System.Drawing.Point(11, 208);
this.lblSizeWidth.ForeColor = System.Drawing.Color.White;
this.lblSizeWidth.Location = new System.Drawing.Point(6, 215);
this.lblSizeWidth.Name = "lblSizeWidth";
this.lblSizeWidth.Size = new System.Drawing.Size(132, 17);
this.lblSizeWidth.TabIndex = 296;
......@@ -293,7 +380,8 @@
// lblSizeLength
//
this.lblSizeLength.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSizeLength.Location = new System.Drawing.Point(11, 177);
this.lblSizeLength.ForeColor = System.Drawing.Color.White;
this.lblSizeLength.Location = new System.Drawing.Point(6, 184);
this.lblSizeLength.Name = "lblSizeLength";
this.lblSizeLength.Size = new System.Drawing.Size(132, 17);
this.lblSizeLength.TabIndex = 317;
......@@ -313,7 +401,7 @@
"20",
"50",
"100"});
this.cmbStep.Location = new System.Drawing.Point(147, 262);
this.cmbStep.Location = new System.Drawing.Point(142, 269);
this.cmbStep.Name = "cmbStep";
this.cmbStep.Size = new System.Drawing.Size(134, 28);
this.cmbStep.TabIndex = 315;
......@@ -321,7 +409,8 @@
// lblStepValue
//
this.lblStepValue.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStepValue.Location = new System.Drawing.Point(11, 270);
this.lblStepValue.ForeColor = System.Drawing.Color.White;
this.lblStepValue.Location = new System.Drawing.Point(6, 277);
this.lblStepValue.Name = "lblStepValue";
this.lblStepValue.Size = new System.Drawing.Size(132, 17);
this.lblStepValue.TabIndex = 314;
......@@ -330,11 +419,13 @@
//
// btnDown
//
this.btnDown.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDown.Location = new System.Drawing.Point(357, 239);
this.btnDown.ForeColor = System.Drawing.Color.White;
this.btnDown.Location = new System.Drawing.Point(346, 243);
this.btnDown.Name = "btnDown";
this.btnDown.Size = new System.Drawing.Size(80, 36);
this.btnDown.Size = new System.Drawing.Size(45, 45);
this.btnDown.TabIndex = 309;
this.btnDown.Text = "下移";
this.btnDown.UseVisualStyleBackColor = true;
......@@ -342,23 +433,26 @@
//
// btnUp
//
this.btnUp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUp.Location = new System.Drawing.Point(357, 160);
this.btnUp.ForeColor = System.Drawing.Color.White;
this.btnUp.Location = new System.Drawing.Point(346, 197);
this.btnUp.Name = "btnUp";
this.btnUp.Size = new System.Drawing.Size(80, 36);
this.btnUp.Size = new System.Drawing.Size(45, 45);
this.btnUp.TabIndex = 308;
this.btnUp.Text = "上移";
this.btnUp.UseVisualStyleBackColor = true;
this.btnUp.Click += new System.EventHandler(this.btnUp_Click);
//
// btnLeft
//
this.btnLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnLeft.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLeft.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLeft.Location = new System.Drawing.Point(321, 199);
this.btnLeft.ForeColor = System.Drawing.Color.White;
this.btnLeft.Location = new System.Drawing.Point(300, 243);
this.btnLeft.Name = "btnLeft";
this.btnLeft.Size = new System.Drawing.Size(72, 36);
this.btnLeft.Size = new System.Drawing.Size(45, 45);
this.btnLeft.TabIndex = 307;
this.btnLeft.Text = "左移";
this.btnLeft.UseVisualStyleBackColor = true;
......@@ -366,11 +460,13 @@
//
// btnRight
//
this.btnRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnRight.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRight.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRight.Location = new System.Drawing.Point(397, 199);
this.btnRight.ForeColor = System.Drawing.Color.White;
this.btnRight.Location = new System.Drawing.Point(392, 243);
this.btnRight.Name = "btnRight";
this.btnRight.Size = new System.Drawing.Size(72, 36);
this.btnRight.Size = new System.Drawing.Size(45, 45);
this.btnRight.TabIndex = 306;
this.btnRight.Text = "右移";
this.btnRight.UseVisualStyleBackColor = true;
......@@ -388,37 +484,41 @@
"4=━━",
"5=□",
"6=○"});
this.cmbType.Location = new System.Drawing.Point(147, 108);
this.cmbType.Location = new System.Drawing.Point(461, 65);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(134, 28);
this.cmbType.Size = new System.Drawing.Size(32, 28);
this.cmbType.TabIndex = 303;
this.cmbType.Visible = false;
this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
//
// lbly
//
this.lbly.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbly.Location = new System.Drawing.Point(11, 84);
this.lbly.ForeColor = System.Drawing.Color.White;
this.lbly.Location = new System.Drawing.Point(206, 23);
this.lbly.Name = "lbly";
this.lbly.Size = new System.Drawing.Size(132, 17);
this.lbly.Size = new System.Drawing.Size(28, 17);
this.lbly.TabIndex = 302;
this.lbly.Text = "Y轴坐标:";
this.lbly.Text = "Y:";
this.lbly.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblx
//
this.lblx.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblx.Location = new System.Drawing.Point(11, 53);
this.lblx.ForeColor = System.Drawing.Color.White;
this.lblx.Location = new System.Drawing.Point(58, 23);
this.lblx.Name = "lblx";
this.lblx.Size = new System.Drawing.Size(132, 17);
this.lblx.Size = new System.Drawing.Size(28, 17);
this.lblx.TabIndex = 301;
this.lblx.Text = "X轴坐标:";
this.lblx.Text = "X:";
this.lblx.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnShowPoint
//
this.btnShowPoint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnShowPoint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnShowPoint.Location = new System.Drawing.Point(347, 110);
this.btnShowPoint.ForeColor = System.Drawing.Color.White;
this.btnShowPoint.Location = new System.Drawing.Point(354, 13);
this.btnShowPoint.Name = "btnShowPoint";
this.btnShowPoint.Size = new System.Drawing.Size(100, 37);
this.btnShowPoint.TabIndex = 293;
......@@ -429,13 +529,34 @@
// lbltype
//
this.lbltype.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbltype.Location = new System.Drawing.Point(11, 115);
this.lbltype.ForeColor = System.Drawing.Color.White;
this.lbltype.Location = new System.Drawing.Point(6, 71);
this.lbltype.Name = "lbltype";
this.lbltype.Size = new System.Drawing.Size(132, 17);
this.lbltype.TabIndex = 294;
this.lbltype.Text = "点形状:";
this.lbltype.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Location = new System.Drawing.Point(9, 54);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(508, 1);
this.groupBox1.TabIndex = 338;
this.groupBox1.TabStop = false;
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Location = new System.Drawing.Point(9, 171);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(508, 1);
this.groupBox2.TabIndex = 339;
this.groupBox2.TabStop = false;
//
// ProjectorControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -444,10 +565,16 @@
this.Controls.Add(this.group);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "ProjectorControl";
this.Size = new System.Drawing.Size(539, 310);
this.Size = new System.Drawing.Size(539, 335);
this.Load += new System.EventHandler(this.ProjectorControl_Load);
this.group.ResumeLayout(false);
this.group.PerformLayout();
((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.numSizeX)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numY)).EndInit();
......@@ -484,5 +611,13 @@
private System.Windows.Forms.Panel panImg;
private System.Windows.Forms.ComboBox cmbpolarities;
private System.Windows.Forms.Label lblPolarities;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
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.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
}
}
......@@ -24,7 +24,11 @@ namespace UserFromControl
public delegate bool ShowPointDelegate(ProjectorPInfo p);
public event ShowPointDelegate ShowPointEvent;
public ProjectorControl()
{
{
if (ImageManager.IsInit == false)
{
ImageManager.Init();
}
InitializeComponent();
if (LastStepIndexMap == null)
{
......@@ -44,6 +48,17 @@ namespace UserFromControl
PolaritiesType = 0;
numSizeX.Maximum = MaxX / 2;
numSizeY.Maximum=MaxY/ 2;
btnUp.BackgroundImage = ImageManager.imgUp;
btnDown.BackgroundImage = ImageManager.imgDown;
btnLeft.BackgroundImage = ImageManager.imgLeft;
btnRight.BackgroundImage = ImageManager.imgRight;
pictureBox1.Image = ImageManager.imgType1;
pictureBox2.Image = ImageManager.imgType2;
pictureBox3.Image = ImageManager.imgType3;
pictureBox4.Image = ImageManager.imgType4;
pictureBox5.Image = ImageManager.imgType5;
pictureBox6.Image = ImageManager.imgType6;
}
public void loadTypeList(string[] list, string[] dirlist,Dictionary<string,string> controlTextMap)
{
......@@ -80,6 +95,12 @@ namespace UserFromControl
btnLeft.Text = controlTextMap["btnLeft_Text"];
btnRight.Text = controlTextMap["btnRight_Text"];
lblPolarities.Text = controlTextMap["lblPolarities_Text"];
btnDown.Text = "";
btnUp.Text = "";
btnLeft.Text = "";
btnRight.Text = "";
//
}
public string GroupName
......@@ -203,9 +224,9 @@ namespace UserFromControl
if (!(cmbType.SelectedIndex + 1).Equals(lastType))
{
lastType = cmbType.SelectedIndex + 1;
DrawPoint(lastType,lastPolaritiesType);
DrawPoint(lastType,lastPolaritiesType);
ShowCurrPoint();
TypeUpdate(cmbType.SelectedIndex);
}
}
private int lastType=1;
......@@ -341,6 +362,10 @@ namespace UserFromControl
return 10;
}
private List<string> typeList = new List<string>();
private List<PictureBox> pictureBoxes = new List<PictureBox>();
private List<Image> picDefImages = new List<Image>();
private List<Image> picSelImages = new List<Image>();
private void ProjectorControl_Load(object sender, EventArgs e)
{
try
......@@ -385,7 +410,29 @@ namespace UserFromControl
{
cmbStep.SelectedIndex = cmbStep.Items.Count / 2;
}
pictureBoxes.Add(pictureBox1);
pictureBoxes.Add(pictureBox2);
pictureBoxes.Add(pictureBox3);
pictureBoxes.Add(pictureBox4);
pictureBoxes.Add(pictureBox5);
pictureBoxes.Add(pictureBox6);
picDefImages.Add(ImageManager.imgType1);
picDefImages.Add(ImageManager.imgType2);
picDefImages.Add(ImageManager.imgType3);
picDefImages.Add(ImageManager.imgType4);
picDefImages.Add(ImageManager.imgType5);
picDefImages.Add(ImageManager.imgType6);
picSelImages.Add(ImageManager.imgType1s);
picSelImages.Add(ImageManager.imgType2s);
picSelImages.Add(ImageManager.imgType3s);
picSelImages.Add(ImageManager.imgType4s);
picSelImages.Add(ImageManager.imgType5s);
picSelImages.Add(ImageManager.imgType6s);
TypeUpdate(cmbType.SelectedIndex);
}
catch (Exception ex)
{
......@@ -533,108 +580,7 @@ namespace UserFromControl
int pY = y + sizeY / 2 + lineLength + plusSize;
g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
}
//else if (type.Equals(7))
//{
// sizeX = 12;
// sizeY = 36;
// int plusSize = sizeX / 2;
// int pX = x;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(8))
//{
// sizeX = 12;
// sizeY = 36;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(9))
//{
// sizeX = 36;
// sizeY = 12;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeY / 2;
// int pX = x - sizeX / 2 - lineLength - plusSize;
// int pY = y;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(10))
//{
// sizeX = 36;
// sizeY = 12;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeY / 2;
// int pX = x + sizeX / 2 + lineLength + plusSize;
// int pY = y;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(11))
//{
// sizeX = 12;
// sizeY = 36;
// int plusSize = sizeX / 2;
// int pX = x-6;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(12))
//{
// sizeX = 12;
// sizeY = 36;
// int plusSize = sizeX / 2;
// int pX = x + 6;
// int pY = y - sizeY / 2 - lineLength - plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
//}
//else if (type.Equals(13))
//{
// sizeX = 12;
// sizeY = 36;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x-6;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else if (type.Equals(14))
//{
// sizeX = 12;
// sizeY = 36;
// g.DrawRectangle(pen, x - sizeX / 2, y - sizeY / 2, sizeX, sizeY);
// int plusSize = sizeX / 2;
// int pX = x + 6;
// int pY = y + sizeY / 2 + lineLength + plusSize;
// g.DrawLine(pen, new Point(pX - plusSize, pY), new Point(pX + plusSize, pY));
// g.DrawLine(pen, new Point(pX, pY - plusSize), new Point(pX, pY + plusSize));
//}
//else
//{
// g.FillEllipse(myBrush, new Rectangle(x - sizeX / 2, y - sizeY / 2, sizeX, sizeY));//画实心椭圆
//}
}
}
private void group_Paint(object sender, PaintEventArgs e)
......@@ -663,5 +609,50 @@ namespace UserFromControl
this.PenWidth = penWidth;
this.PolaritiesType = polaritiesType;
}
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)
{
PointType = 1;
}
private void pictureBox3_Click(object sender, EventArgs e)
{
PointType = 3;
}
private void pictureBox2_Click(object sender, EventArgs e)
{
PointType = 2;
}
private void pictureBox4_Click(object sender, EventArgs e)
{
PointType = 4;
}
private void pictureBox5_Click(object sender, EventArgs e)
{
PointType = 5;
}
private void pictureBox6_Click(object sender, EventArgs e)
{
PointType = 6;
}
}
}
......@@ -59,5 +59,15 @@ namespace UserFromControl.Properties {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap type1 {
get {
object obj = ResourceManager.GetObject("type1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
......@@ -117,4 +117,8 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="type1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\type1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file
......@@ -121,6 +121,7 @@
<Content Include="image\green1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Resources\type1.png" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!