diff --git a/ControlMonitorClient/FrmClient.designer.cs b/ControlMonitorClient/FrmClient.designer.cs index ab5a3ef..d368c05 100644 --- a/ControlMonitorClient/FrmClient.designer.cs +++ b/ControlMonitorClient/FrmClient.designer.cs @@ -524,7 +524,7 @@ // // MMServerStatus // - this.MMServerStatus.Image = global::wcfControlMonitorClient.Properties.Resources.linkok; + this.MMServerStatus.Image = global::wcfControlMonitorClient.Properties.Resources.linkerror; this.MMServerStatus.Name = "MMServerStatus"; this.MMServerStatus.Size = new System.Drawing.Size(89, 36); this.MMServerStatus.Text = "Server"; diff --git a/ControlMonitorClient/FrmControlMonitor.cs b/ControlMonitorClient/FrmControlMonitor.cs index 1a80e96..7fb40d2 100644 --- a/ControlMonitorClient/FrmControlMonitor.cs +++ b/ControlMonitorClient/FrmControlMonitor.cs @@ -398,8 +398,6 @@ namespace wcfControlMonitorClient 905 - (430 - 6) * (device.XCoor - iStartColum) / (iEndColum - iStartColum),596); tw1.Location = new Point(stack1.Location.X + 13, stack1.Location.Y + 8); - - break; case 11002: stack2.Location = @@ -978,7 +976,7 @@ namespace wcfControlMonitorClient //} foreach (Control ctrl in this.plAccessorial1.Controls) { - + if ((ctrl.GetType().ToString() == "System.Windows.Forms.Button") && (ctrl.Tag != null)) { ctrl.Click += new EventHandler(ctrl_Click); @@ -1015,23 +1013,37 @@ namespace wcfControlMonitorClient { try { - PictureBox btn = (PictureBox)sender; - int DeviceIndex = Convert.ToInt32(btn.Tag); - Model.MDevice device; - device = Model.CGetInfo.GetDeviceInfo(DeviceIndex); - string bost = ""; - if (device.SplitByte_6 == 1) + if (MessageBox.Show("你确定要修改设备禁用状态吗?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - bost = "0"; // + PictureBox btn = (PictureBox)sender; + int DeviceIndex = Convert.ToInt32(btn.Tag); + Model.MDevice device; + device = Model.CGetInfo.GetDeviceInfo(DeviceIndex); + + string bost = ""; + if (device.SplitByte_6 == 1) + { + bost = "0"; // + } + else + { + bost = "1";// + } + + string errtxt = string.Empty; + var isOK=CStaticClass.WcfControl.WriteDBData(out errtxt, DeviceIndex, "DB1", bost); + if (!isOK) + { + MessageBox.Show("发送失败,返回消息:"+errtxt); + } } else { - bost = "1";// + } - string errtxt = string.Empty; - CStaticClass.WcfControl.WriteDBData(out errtxt, DeviceIndex, "DB1", bost); + } catch (Exception ex) { diff --git a/ControlMonitorClient/FrmControlMonitor.designer.cs b/ControlMonitorClient/FrmControlMonitor.designer.cs index f45bb03..c6a6d8f 100644 --- a/ControlMonitorClient/FrmControlMonitor.designer.cs +++ b/ControlMonitorClient/FrmControlMonitor.designer.cs @@ -1597,6 +1597,8 @@ this.plAccessorial1.Controls.Add(this.label67); this.plAccessorial1.Controls.Add(this.label88); this.plAccessorial1.Controls.Add(this.label87); + this.plAccessorial1.Controls.Add(this.label106); + this.plAccessorial1.Controls.Add(this.label115); this.plAccessorial1.Controls.Add(this.label24); this.plAccessorial1.Controls.Add(this.label94); this.plAccessorial1.Controls.Add(this.label64); @@ -1654,6 +1656,7 @@ this.plAccessorial1.Name = "plAccessorial1"; this.plAccessorial1.Size = new System.Drawing.Size(1478, 814); this.plAccessorial1.TabIndex = 5825; + this.plAccessorial1.Tag = "17008"; // // back3 // @@ -2788,7 +2791,7 @@ this.textBox85.Name = "textBox85"; this.textBox85.Size = new System.Drawing.Size(13, 13); this.textBox85.TabIndex = 5962; - this.textBox85.Tag = "12030.0"; + this.textBox85.Tag = "12008.0"; this.textBox85.Visible = false; // // textBox5 @@ -3784,7 +3787,7 @@ this.button68.Name = "button68"; this.button68.Size = new System.Drawing.Size(31, 42); this.button68.TabIndex = 5897; - this.button68.Tag = "12005"; + this.button68.Tag = "12008"; this.button68.Text = "12005"; this.button68.UseVisualStyleBackColor = false; //