示例#1
0
文件: DamoANT.cs 项目: dgets/DANT
        /*
         * Method is used to verify that a timer has been selected for
         * editing when the Edit Timer button is clicked, and for opening
         * the appropriate form/winder to edit the data if necessary
         */
        private void btnEditTimer_Click(object sender, EventArgs e)
        {
            if (chklstTimers.SelectedIndex == -1) {
                MessageBox.Show("You must check a timer before trying to " +
                    "edit it!");
            } else {
                if (anyRunning(false, true)) {
                    tmrOneSec.Enabled = false;
                    tmrOneSec.Stop();
                }

                editWindow = new frmEditWindow(this, false);
                editWindow.Show();

            }
        }
示例#2
0
文件: DamoANT.cs 项目: dgets/DANT
        /*
         * Method is invoked when the Edit Alarm button is clicked,
         * verifies that an alarm is checked for editing, and if so, opens
         * the appropriate editing form/winder
         */
        private void btnEditAlarm_Click(object sender, EventArgs e)
        {
            //trying out selection-based editing to avoid some confusion
            if (chklstAlarms.SelectedIndex == -1) {
                MessageBox.Show("You must select an alarm before trying to " +
                    "edit it!");
            } else {
                /*if (anyRunning(false, true)) {
                    tmrOneSec.Enabled = false;
                    tmrOneSec.Stop();
                }*/     //maybe make this shit user configurable at some point

                editWindow = new frmEditWindow(this, true);
                editWindow.Show();
            }
        }