Ejemplo n.º 1
0
        private void btnAddMOXA_Click(object sender, EventArgs e)
        {
            int serialno = GetNewSerialNo();

            SetMOXA s = new SetMOXA(serialno.ToString());

            if (s.ShowDialog() == DialogResult.OK)
            {
                InsertMCCConfig(serialno.ToString(), s.Model, s.IP, s.Group);
                LoadMOXAGroup();
                LoadMCCConfig();
            }
        }
Ejemplo n.º 2
0
        private void btnChangeMOXA_Click(object sender, EventArgs e)
        {
            if (lvServer.SelectedItems.Count == 0)
            {
                MessageBox.Show("选项为空");
                return;
            }

            int    serialno = Convert.ToInt32(lvServer.SelectedItems[0].SubItems[0].Text);
            string Model    = lvServer.SelectedItems[0].SubItems[1].Text;
            string IP       = lvServer.SelectedItems[0].SubItems[2].Text;
            string Group    = lvServer.SelectedItems[0].SubItems[3].Text;

            SetMOXA s = new SetMOXA(serialno.ToString(), Model, IP, Group);

            if (s.ShowDialog() == DialogResult.OK)
            {
                ModifyMCCConfig(serialno.ToString(), s.Model, s.IP, s.Group);
                LoadMOXAGroup();
                LoadMCCConfig();
            }
        }