Пример #1
0
        private void QwikText_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                //Application.Exit();
                //Process.GetCurrentProcess().Kill();
                this.MinimizeBox    = true;
                this.Visible        = false;
                notifyIcon1.Visible = true;
            }

            if (e.KeyCode == Keys.Enter)//testing the entries in listview
            {
                string commandline;
                string message;
                commandline = QwikText.Text;
                if (!string.IsNullOrWhiteSpace(commandline))
                {
                    message = ProcessCommandline(commandline);
                    if (message != null)
                    {
                        DLabel.Text = message;
                    }
                    QwikText.Clear();
                }
            }
            if (e.Control && e.KeyCode == Keys.Z)
            {
                DLabel.Text = Undo();
            }
        }
Пример #2
0
 public NewUi()
 {
     InitializeComponent();
     //icon = new NotifyIcon();
     //icon.Visible = true;
     //icon.Icon = new Icon("icon.ico");
     AlarmIndex = 0;
     WindowFadeIn(50, 0.1F);
     DLabel.Text = null;
     ShowDefaultList();
     QwikText.Select();
     timer.Interval       = 1000000;
     timer.Enabled        = false;
     alarmCheck.Enabled   = true;
     alarmCheck.AutoReset = false;
     alarmCheck.Elapsed  += new ElapsedEventHandler(CheckAlarmDone);
     timer.Elapsed       += new ElapsedEventHandler(OnTimedEvent);
     ProcessAlarm();
 }