public FrmAddNewCard(byte[] arayuid, object obj, int devicetype, string strname, int casenum, int index) { InitializeComponent(); string strDevName = strname.Split('\\')[0].ToString(); strRemark = strname.Split('\\')[1].ToString(); SubnetID = Convert.ToByte(strDevName.Split('-')[0]); DeviceID = Convert.ToByte(strDevName.Split('-')[1]); DeviceType = devicetype; MyActiveObj = obj; oDS = null; oNewDS = null; if (MyActiveObj is DS) { if (CsConst.myDS != null) { foreach (DS oTmp in CsConst.myDS) { if (oTmp.DIndex == (MyActiveObj as DS).DIndex) { oDS = oTmp; break; } } } } else if (MyActiveObj is NewDS) { if (CsConst.myNewDS != null) { foreach (NewDS oTmp in CsConst.myNewDS) { if (oTmp.DIndex == (MyActiveObj as NewDS).DIndex) { oNewDS = oTmp; break; } } } } lbSubValue.Text = SubnetID.ToString(); lbDevValue.Text = DeviceID.ToString(); lbRemarkValue.Text = strRemark; arayUID = arayuid; CaseNum = casenum; ID = index; }
public UserForNewDoor(NewDS newds, int id, int devicetype, int showtype, string strname, System.Windows.Forms.Panel pnl, int tag, Form frm) { InitializeComponent(); ID = id; oNewDS = newds; DeviceType = devicetype; ShowType = showtype; StrName = strname; Pnl = pnl; string strDevName = strname.Split('\\')[0].ToString(); SubNetID = Convert.ToByte(strDevName.Split('-')[0]); DeviceID = Convert.ToByte(strDevName.Split('-')[1]); intTag = tag; Frm = frm; }
public FrmNewDS(NewDS newds, string strName, int intDIndex, int intDeviceType) { InitializeComponent(); this.myDevName = strName; this.mintIDIndex = intDIndex; string strDevName = strName.Split('\\')[0].ToString(); this.MyintDeviceType = intDeviceType; this.oNewDS = newds; HDLSysPF.DisplayDeviceNameModeDescription(strName, MyintDeviceType, cboDevice, tbModel, tbDescription); SubNetID = Convert.ToByte(strDevName.Split('-')[0]); DevID = Convert.ToByte(strDevName.Split('-')[1]); tsl3.Text = strName; this.Text = strName; Control.CheckForIllegalCrossThreadCalls = false; }
public FrmColorForDS(int tag, object obj, int index) { InitializeComponent(); MyActiveObj = obj; oNewDS = null; oDS = null; if (MyActiveObj is DS) { if (CsConst.myDS != null) { foreach (DS oTmp in CsConst.myDS) { if (oTmp.DIndex == (MyActiveObj as DS).DIndex) { oDS = oTmp; break; } } } } else if (MyActiveObj is NewDS) { if (CsConst.myNewDS != null) { foreach (NewDS oTmp in CsConst.myNewDS) { if (oTmp.DIndex == (MyActiveObj as NewDS).DIndex) { oNewDS = oTmp; break; } } } } Tag = tag; Index = index; }