예제 #1
0
        private void button_DY2_KaiGuan_Click(object sender, EventArgs e)
        {
            string vDianYuanID = textBox_DY2_ID.Text;

            if (CommHelper.IsMAC(vDianYuanID))
            {
                DataTable vSwitchTable = new DataTable();
                if (button_DY2_KaiGuan.Tag == null)
                {
                    vSwitchTable = m_WatchHouseConfig.GetSwitchTable(vDianYuanID);
                }
                else
                {
                    vSwitchTable = (DataTable)button_DY2_KaiGuan.Tag;
                }
                button_DY2_KaiGuan.Tag = vSwitchTable;
                SwitchConfigForm vSwitchConfigForm = new SwitchConfigForm();
                vSwitchConfigForm.SwitchTable = vSwitchTable;
                vSwitchConfigForm.DianYuanID  = vDianYuanID;
                vSwitchConfigForm.ShowDialog();
            }
            else
            {
                MessageBox.Show("请输入正确的电源ID", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
 private void button_DY2_PowerIP_Click(object sender, EventArgs e)
 {
     if (CommHelper.IsMAC(textBox_DY2_ID.Text))
     {
         PowerIPConfigForm vPowerIPConfigForm = new PowerIPConfigForm();
         vPowerIPConfigForm.DianYuanID = textBox_DY2_ID.Text;
         vPowerIPConfigForm.ShowDialog();
     }
     else
     {
         MessageBox.Show("请输入正确的电源ID", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }