Commit 47b3b238 LN

1

1 个父辈 f0dd7bd2
......@@ -246,9 +246,12 @@ namespace SmartShelf.DeviceLibrary
public class Light
{
public static byte defaultR = 0;
public static byte defaultG = 50;
public static byte defaultB = 0;
public static Light DefaultLight(int dmxId, int index)
{
return new Light(dmxId, index, 0, 50, 0,200);
return new Light(dmxId, index, defaultR, defaultG, defaultB,200);
}
public static Light GetLight(int dmxId,int index, string color="green")
{
......@@ -323,14 +326,7 @@ namespace SmartShelf.DeviceLibrary
public byte Red { get; set; }
public byte Green { get; set; }
public byte Blue { get; set; }
///// <summary>
///// 单色灯
///// </summary>
//public static Light DefaultLight(int dmx, int index)
//{
// return new Light(dmx, index, LEDManager.DefaultLight);
//}
/// <summary>
/// 单色灯
/// </summary>
......
......@@ -32,6 +32,9 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSMStore));
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.numYu = new System.Windows.Forms.NumericUpDown();
this.button5 = new System.Windows.Forms.Button();
this.btnCloseSLed = new System.Windows.Forms.Button();
this.btnOpenSLed = new System.Windows.Forms.Button();
......@@ -58,13 +61,28 @@
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.panel1 = new System.Windows.Forms.Panel();
this.lblLedInfo = new System.Windows.Forms.Label();
this.numYu = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.groupTest = new System.Windows.Forms.GroupBox();
this.txtIp2 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.btnCAll = new System.Windows.Forms.Button();
this.btOAll = new System.Windows.Forms.Button();
this.trackBar1 = new System.Windows.Forms.TrackBar();
this.trackBar2 = new System.Windows.Forms.TrackBar();
this.trackBar3 = new System.Windows.Forms.TrackBar();
this.lblR = new System.Windows.Forms.Label();
this.lblG = new System.Windows.Forms.Label();
this.lblB = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numYu)).BeginInit();
this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numYu)).BeginInit();
this.groupTest.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar3)).BeginInit();
this.SuspendLayout();
//
// timer1
......@@ -77,9 +95,6 @@
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.numYu);
this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Controls.Add(this.btnCloseSLed);
this.groupBox2.Controls.Add(this.btnOpenSLed);
......@@ -87,9 +102,6 @@
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.txtDmxId);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.btnCloseLed);
this.groupBox2.Controls.Add(this.txtLedIndex);
this.groupBox2.Controls.Add(this.button4);
this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button2);
this.groupBox2.Controls.Add(this.button1);
......@@ -102,17 +114,49 @@
this.groupBox2.Controls.Add(this.cmbPositionList);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox2.Location = new System.Drawing.Point(12, 4);
this.groupBox2.Location = new System.Drawing.Point(8, 4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(329, 473);
this.groupBox2.Size = new System.Drawing.Size(349, 340);
this.groupBox2.TabIndex = 106;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "门锁操作测试";
this.groupBox2.Text = "库位操作测试";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(18, 63);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(66, 20);
this.label3.TabIndex = 115;
this.label3.Text = "区域ID:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(18, 102);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(65, 20);
this.label4.TabIndex = 114;
this.label4.Text = "灯地址:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// numYu
//
this.numYu.Location = new System.Drawing.Point(87, 60);
this.numYu.Maximum = new decimal(new int[] {
15,
0,
0,
0});
this.numYu.Name = "numYu";
this.numYu.Size = new System.Drawing.Size(89, 26);
this.numYu.TabIndex = 113;
//
// button5
//
this.button5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button5.Location = new System.Drawing.Point(106, 421);
this.button5.Location = new System.Drawing.Point(126, 291);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(95, 35);
this.button5.TabIndex = 112;
......@@ -123,7 +167,7 @@
// btnCloseSLed
//
this.btnCloseSLed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseSLed.Location = new System.Drawing.Point(202, 421);
this.btnCloseSLed.Location = new System.Drawing.Point(222, 291);
this.btnCloseSLed.Name = "btnCloseSLed";
this.btnCloseSLed.Size = new System.Drawing.Size(95, 35);
this.btnCloseSLed.TabIndex = 111;
......@@ -134,7 +178,7 @@
// btnOpenSLed
//
this.btnOpenSLed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenSLed.Location = new System.Drawing.Point(9, 421);
this.btnOpenSLed.Location = new System.Drawing.Point(29, 291);
this.btnOpenSLed.Name = "btnOpenSLed";
this.btnOpenSLed.Size = new System.Drawing.Size(95, 35);
this.btnOpenSLed.TabIndex = 110;
......@@ -167,15 +211,15 @@
//
this.txtDmxId.Enabled = false;
this.txtDmxId.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDmxId.Location = new System.Drawing.Point(126, 144);
this.txtDmxId.Location = new System.Drawing.Point(109, 144);
this.txtDmxId.Name = "txtDmxId";
this.txtDmxId.Size = new System.Drawing.Size(143, 26);
this.txtDmxId.Size = new System.Drawing.Size(59, 26);
this.txtDmxId.TabIndex = 38;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(56, 150);
this.label1.Location = new System.Drawing.Point(56, 149);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(57, 17);
this.label1.TabIndex = 37;
......@@ -185,7 +229,7 @@
// btnCloseLed
//
this.btnCloseLed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseLed.Location = new System.Drawing.Point(170, 366);
this.btnCloseLed.Location = new System.Drawing.Point(182, 93);
this.btnCloseLed.Name = "btnCloseLed";
this.btnCloseLed.Size = new System.Drawing.Size(115, 35);
this.btnCloseLed.TabIndex = 36;
......@@ -196,7 +240,7 @@
// txtLedIndex
//
this.txtLedIndex.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtLedIndex.Location = new System.Drawing.Point(75, 370);
this.txtLedIndex.Location = new System.Drawing.Point(87, 97);
this.txtLedIndex.Name = "txtLedIndex";
this.txtLedIndex.Size = new System.Drawing.Size(89, 26);
this.txtLedIndex.TabIndex = 35;
......@@ -205,7 +249,7 @@
// button4
//
this.button4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button4.Location = new System.Drawing.Point(170, 327);
this.button4.Location = new System.Drawing.Point(182, 54);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(115, 35);
this.button4.TabIndex = 34;
......@@ -216,7 +260,7 @@
// button3
//
this.button3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button3.Location = new System.Drawing.Point(155, 274);
this.button3.Location = new System.Drawing.Point(174, 239);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(115, 35);
this.button3.TabIndex = 33;
......@@ -227,7 +271,7 @@
// button2
//
this.button2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button2.Location = new System.Drawing.Point(155, 229);
this.button2.Location = new System.Drawing.Point(174, 194);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(115, 35);
this.button2.TabIndex = 32;
......@@ -238,7 +282,7 @@
// button1
//
this.button1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(34, 229);
this.button1.Location = new System.Drawing.Point(53, 194);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(115, 35);
this.button1.TabIndex = 31;
......@@ -249,7 +293,7 @@
// btnOpenAll
//
this.btnOpenAll.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAll.Location = new System.Drawing.Point(34, 274);
this.btnOpenAll.Location = new System.Drawing.Point(53, 239);
this.btnOpenAll.Name = "btnOpenAll";
this.btnOpenAll.Size = new System.Drawing.Size(115, 35);
this.btnOpenAll.TabIndex = 28;
......@@ -261,15 +305,15 @@
//
this.txtNum.Enabled = false;
this.txtNum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtNum.Location = new System.Drawing.Point(126, 183);
this.txtNum.Location = new System.Drawing.Point(230, 144);
this.txtNum.Name = "txtNum";
this.txtNum.Size = new System.Drawing.Size(143, 26);
this.txtNum.Size = new System.Drawing.Size(59, 26);
this.txtNum.TabIndex = 24;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(57, 189);
this.label11.Location = new System.Drawing.Point(178, 149);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(56, 17);
this.label11.TabIndex = 23;
......@@ -341,9 +385,9 @@
this.lblData.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblData.ForeColor = System.Drawing.Color.Red;
this.lblData.Location = new System.Drawing.Point(12, 574);
this.lblData.Location = new System.Drawing.Point(12, 691);
this.lblData.Name = "lblData";
this.lblData.Size = new System.Drawing.Size(329, 169);
this.lblData.Size = new System.Drawing.Size(329, 106);
this.lblData.TabIndex = 109;
this.lblData.Text = "label4";
this.lblData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -354,9 +398,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.panel1);
this.groupBox1.Location = new System.Drawing.Point(348, 3);
this.groupBox1.Location = new System.Drawing.Point(363, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(742, 797);
this.groupBox1.Size = new System.Drawing.Size(727, 797);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "亮灯信息";
......@@ -368,7 +412,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 22);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(736, 772);
this.panel1.Size = new System.Drawing.Size(721, 772);
this.panel1.TabIndex = 0;
//
// lblLedInfo
......@@ -382,37 +426,174 @@
this.lblLedInfo.TabIndex = 0;
this.lblLedInfo.Text = "label3";
//
// numYu
//
this.numYu.Location = new System.Drawing.Point(75, 333);
this.numYu.Maximum = new decimal(new int[] {
15,
0,
0,
0});
this.numYu.Name = "numYu";
this.numYu.Size = new System.Drawing.Size(89, 23);
this.numYu.TabIndex = 113;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(6, 336);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 17);
this.label3.TabIndex = 115;
this.label3.Text = "区域ID:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(6, 375);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 114;
this.label4.Text = "灯地址:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// groupTest
//
this.groupTest.Controls.Add(this.label7);
this.groupTest.Controls.Add(this.label8);
this.groupTest.Controls.Add(this.label12);
this.groupTest.Controls.Add(this.lblB);
this.groupTest.Controls.Add(this.lblG);
this.groupTest.Controls.Add(this.lblR);
this.groupTest.Controls.Add(this.trackBar3);
this.groupTest.Controls.Add(this.trackBar2);
this.groupTest.Controls.Add(this.trackBar1);
this.groupTest.Controls.Add(this.btnCAll);
this.groupTest.Controls.Add(this.btOAll);
this.groupTest.Controls.Add(this.txtIp2);
this.groupTest.Controls.Add(this.label6);
this.groupTest.Controls.Add(this.label3);
this.groupTest.Controls.Add(this.button4);
this.groupTest.Controls.Add(this.label4);
this.groupTest.Controls.Add(this.txtLedIndex);
this.groupTest.Controls.Add(this.numYu);
this.groupTest.Controls.Add(this.btnCloseLed);
this.groupTest.Location = new System.Drawing.Point(8, 350);
this.groupTest.Name = "groupTest";
this.groupTest.Size = new System.Drawing.Size(349, 338);
this.groupTest.TabIndex = 110;
this.groupTest.TabStop = false;
this.groupTest.Text = "灯条测试";
this.groupTest.Enter += new System.EventHandler(this.groupTest_Enter);
//
// txtIp2
//
this.txtIp2.Enabled = false;
this.txtIp2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtIp2.Location = new System.Drawing.Point(87, 22);
this.txtIp2.Name = "txtIp2";
this.txtIp2.Size = new System.Drawing.Size(143, 26);
this.txtIp2.TabIndex = 117;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(19, 28);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(64, 20);
this.label6.TabIndex = 116;
this.label6.Text = "模块IP:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnCAll
//
this.btnCAll.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCAll.Location = new System.Drawing.Point(182, 134);
this.btnCAll.Name = "btnCAll";
this.btnCAll.Size = new System.Drawing.Size(115, 35);
this.btnCAll.TabIndex = 119;
this.btnCAll.Text = "全关";
this.btnCAll.UseVisualStyleBackColor = true;
this.btnCAll.Click += new System.EventHandler(this.btnCAll_Click);
//
// btOAll
//
this.btOAll.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btOAll.Location = new System.Drawing.Point(61, 134);
this.btOAll.Name = "btOAll";
this.btOAll.Size = new System.Drawing.Size(115, 35);
this.btOAll.TabIndex = 118;
this.btOAll.Text = "全开";
this.btOAll.UseVisualStyleBackColor = true;
this.btOAll.Click += new System.EventHandler(this.btOAll_Click);
//
// trackBar1
//
this.trackBar1.LargeChange = 10;
this.trackBar1.Location = new System.Drawing.Point(51, 191);
this.trackBar1.Maximum = 255;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(257, 45);
this.trackBar1.TabIndex = 120;
this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None;
this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged);
//
// trackBar2
//
this.trackBar2.LargeChange = 10;
this.trackBar2.Location = new System.Drawing.Point(51, 239);
this.trackBar2.Maximum = 255;
this.trackBar2.Name = "trackBar2";
this.trackBar2.Size = new System.Drawing.Size(257, 45);
this.trackBar2.TabIndex = 121;
this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None;
this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_ValueChanged);
//
// trackBar3
//
this.trackBar3.LargeChange = 10;
this.trackBar3.Location = new System.Drawing.Point(51, 287);
this.trackBar3.Maximum = 255;
this.trackBar3.Name = "trackBar3";
this.trackBar3.Size = new System.Drawing.Size(257, 45);
this.trackBar3.TabIndex = 122;
this.trackBar3.TickStyle = System.Windows.Forms.TickStyle.None;
this.trackBar3.ValueChanged += new System.EventHandler(this.trackBar3_ValueChanged);
//
// lblR
//
this.lblR.AutoSize = true;
this.lblR.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblR.Location = new System.Drawing.Point(312, 197);
this.lblR.Name = "lblR";
this.lblR.Size = new System.Drawing.Size(15, 17);
this.lblR.TabIndex = 123;
this.lblR.Text = "0";
this.lblR.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblG
//
this.lblG.AutoSize = true;
this.lblG.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblG.Location = new System.Drawing.Point(312, 245);
this.lblG.Name = "lblG";
this.lblG.Size = new System.Drawing.Size(15, 17);
this.lblG.TabIndex = 124;
this.lblG.Text = "0";
this.lblG.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// lblB
//
this.lblB.AutoSize = true;
this.lblB.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblB.Location = new System.Drawing.Point(312, 293);
this.lblB.Name = "lblB";
this.lblB.Size = new System.Drawing.Size(15, 17);
this.lblB.TabIndex = 125;
this.lblB.Text = "0";
this.lblB.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(6, 287);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(33, 17);
this.label7.TabIndex = 128;
this.label7.Text = "Blue";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(6, 239);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(43, 17);
this.label8.TabIndex = 127;
this.label8.Text = "Green";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.Location = new System.Drawing.Point(6, 191);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(31, 17);
this.label12.TabIndex = 126;
this.label12.Text = "Red";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// FrmSMStore
//
......@@ -420,6 +601,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1111, 812);
this.Controls.Add(this.groupTest);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.lblData);
this.Controls.Add(this.lblMsg);
......@@ -433,10 +615,15 @@
this.Shown += new System.EventHandler(this.FrmSMStore_Shown);
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numYu)).EndInit();
this.groupBox1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numYu)).EndInit();
this.groupTest.ResumeLayout(false);
this.groupTest.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackBar3)).EndInit();
this.ResumeLayout(false);
}
......@@ -473,5 +660,19 @@
private System.Windows.Forms.NumericUpDown numYu;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.GroupBox groupTest;
private System.Windows.Forms.TextBox txtIp2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button btnCAll;
private System.Windows.Forms.Button btOAll;
private System.Windows.Forms.TrackBar trackBar2;
private System.Windows.Forms.TrackBar trackBar1;
private System.Windows.Forms.TrackBar trackBar3;
private System.Windows.Forms.Label lblB;
private System.Windows.Forms.Label lblG;
private System.Windows.Forms.Label lblR;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label12;
}
}
\ No newline at end of file
......@@ -51,7 +51,10 @@ namespace SmartShelf
{
cmbNum.Items.Add(i);
}
cmbNum.SelectedIndex = 0;
cmbNum.SelectedIndex = 0;
trackBar1.Value = Light.defaultR;
trackBar2.Value = Light.defaultG;
trackBar3.Value = Light.defaultB;
}
private void cmbPositionList_SelectedIndexChanged(object sender, EventArgs e)
......@@ -63,6 +66,7 @@ namespace SmartShelf
}
BoxPosition posi = PMap[text];
txtAddr.Text = posi.DeviceIp.ToString();
txtIp2.Text = posi.DeviceIp.ToString();
txtNum.Text = posi.LedIndex.ToString();
txtDmxId.Text = posi.DmxId.ToString();
}
......@@ -179,7 +183,7 @@ namespace SmartShelf
private void button4_Click(object sender, EventArgs e)
{
string ip = txtAddr.Text;
string ip = txtIp2.Text;
int index = FormUtil.GetIntValue(txtLedIndex);
int dmxId =(int) numYu.Value;
LEDManager.GetLedModule(ip).LightOn(Light.DefaultLight(dmxId, index));
......@@ -187,7 +191,7 @@ namespace SmartShelf
private void btnCloseLed_Click(object sender, EventArgs e)
{
string ip = txtAddr.Text;
string ip = txtIp2.Text;
int index = FormUtil.GetIntValue(txtLedIndex);
int dmxId = (int)numYu.Value;
LEDManager.GetLedModule(ip).LightOff( dmxId, index);
......@@ -239,5 +243,52 @@ namespace SmartShelf
{
LEDManager.OpenStatusLights("yellow");
}
private void btOAll_Click(object sender, EventArgs e)
{
string ip = txtIp2.Text;
LEDManager.GetLedModule(ip).AllLightOn(Light.DefaultLight(0,0));
}
private void btnCAll_Click(object sender, EventArgs e)
{
string ip = txtIp2.Text;
LEDManager.GetLedModule(ip).AllLightOff();
}
private void trackBar1_ValueChanged(object sender, EventArgs e)
{
if (!trackBar1.Value.Equals(Light.defaultR))
{
Light.defaultR =(byte) trackBar1.Value;
}
lblR.Text = Light.defaultR.ToString();
}
private void trackBar2_ValueChanged(object sender, EventArgs e)
{
if (!trackBar2.Value.Equals(Light.defaultG))
{
Light.defaultG = (byte)trackBar2.Value;
}
lblG.Text = Light.defaultG.ToString();
}
private void trackBar3_ValueChanged(object sender, EventArgs e)
{
if (!trackBar3.Value.Equals(Light.defaultB))
{
Light.defaultB = (byte)trackBar3.Value;
}
lblB.Text = Light.defaultB.ToString();
}
private void groupTest_Enter(object sender, EventArgs e)
{
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!