|
|
@ -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) |
|
|
|
{ |
|
|
|