예제 #1
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            frmScheduleAddDevice frm    = new frmScheduleAddDevice();
            DialogResult         result = frm.ShowDialog(this);


            if (result == DialogResult.OK)
            {
                ListViewItem item = lvwDevices.Items.Add(frm.SelectedDevice.Name);
                item.SubItems.Add(frm.SelectedDeviceAction == 0 ? Localization.GetString("uniton") : Localization.GetString("unitoff"));
                item.Tag = frm.SelectedDevice;
            }

            frm.Close();
        }
예제 #2
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            frmScheduleAddDevice frm = new frmScheduleAddDevice();
            DialogResult result = frm.ShowDialog(this);

            if (result == DialogResult.OK)
            {

                ListViewItem item = lvwDevices.Items.Add(frm.SelectedDevice.Name);
                item.SubItems.Add(frm.SelectedDeviceAction == 0 ? Localization.GetString("uniton") : Localization.GetString("unitoff"));
                item.Tag = frm.SelectedDevice;
            }

            frm.Close();
        }