Exemple #1
0
        private void ToolStripMenuItem_add_Click(object sender, EventArgs e)
        {
            UPSList        _tmpData          = null;
            Add_Modify_UPS tmpAdd_Modify_UPS = new Add_Modify_UPS(_tmpData);

            tmpAdd_Modify_UPS.ShowDialog();
            if (tmpAdd_Modify_UPS.result == DialogResult.OK)
            {
                GetUPSList();
            }
        }
Exemple #2
0
        private void ToolStripMenuItem_edittype_Click(object sender, EventArgs e)
        {
            UPSList _tmpData = new UPSList();

            for (int i = 0; i < tmpListUPS.Count; i++)
            {
                if (tmpListUPS[i].DeviceID == _tmpUPSList.DeviceID)
                {
                    _tmpData = tmpListUPS[i];
                    break;
                }
            }

            Add_Modify_UPS tmpAdd_Modify_UPS = new Add_Modify_UPS(_tmpData);

            tmpAdd_Modify_UPS.ShowDialog();
            if (tmpAdd_Modify_UPS.result == DialogResult.OK)
            {
                GetUPSList();
            }
        }