Пример #1
0
        public void ShowChange8StatusRegDlg(uint uiAddr)
        {
            string[] aHiStatus = new string[8];
            string[] aLoStatus = new string[8];
            _device.GetContinuousInputStatus(uiAddr, ref aHiStatus, ref aLoStatus);
            frm8BitsSetting dlgBitsSetting = new frm8BitsSetting(uiAddr, aHiStatus, aLoStatus);

            dlgBitsSetting.Change8InputStatusReg = new frm8BitsSetting.DelegSetStatus(Change8InputStatus);
            dlgBitsSetting.Text = "修改输入状态寄存器设置";
            dlgBitsSetting.ShowDialog();
        }
Пример #2
0
        private void menuItemCont8Regs_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild == null)
            {
                MessageBox.Show("请先添加设备后再添加寄存器!", "添加输出状态寄存器", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            frm8BitsSetting frmBitsRegister = new frm8BitsSetting();

            frmBitsRegister._bOutputStatus      = false;
            frmBitsRegister.Add8InputStatusRegs = new frm8BitsSetting.DelegAddStatus(((frmDevice)(this.ActiveMdiChild)).AddContinuous8InputStatusRegs);
            frmBitsRegister.Text = "添加输入状态寄存器";
            frmBitsRegister.ShowDialog();
        }