示例#1
0
        private void atimer_Tick(object sender, EventArgs e)
        {
            duration--;
            //lblCountdown.Text = duration.ToString();
            //if (duration == ticks) timeup = true;

            DateTime dtNow = DateTime.Now;

            if ((dtNow.Hour == h) && (dtNow.Minute == m))
            {
                timeup = true;                                           //BNJ
            }
            if (timeup)
            {
                //Microsoft.VisualBasic.Interaction.Beep();
                Console.Beep();


                try
                {
                    if (FrmKaffET.Visible == false)
                    {
                        FrmKaffET.Visible = true;
                    }
                    ;
                }

                catch (ObjectDisposedException Er)
                {
                    //MessageBox.Show  ("ODisp   " + Er.ToString());
                    SingletonNotificationIcon.Instance.AlarmKaffET.Stop();
                    frmKaffET = new FrmKaffETalarm();
                }

                catch (Exception Er)
                {
                    MessageBox.Show(Er.ToString());
                    //frmKaffET = new FrmKaffETalarm();
                }
            }
        }
示例#2
0
文件: Alarm.cs 项目: bjorn76/VS
        private void atimer_Tick(object sender, EventArgs e)
        {
            duration--;
            //lblCountdown.Text = duration.ToString();
            //if (duration == ticks) timeup = true;

            DateTime dtNow = DateTime.Now;
            if ((dtNow.Hour == h) && (dtNow.Minute == m)) timeup = true; //BNJ

            if(timeup)
            {
             	//Microsoft.VisualBasic.Interaction.Beep();
             	Console.Beep();

             	try
                {
             		if (FrmKaffET.Visible==false) FrmKaffET.Visible=true;;
             	}

             	catch (ObjectDisposedException Er)
             	{
             		//MessageBox.Show  ("ODisp   " + Er.ToString());
             		SingletonNotificationIcon.Instance.AlarmKaffET.Stop();
             		frmKaffET = new FrmKaffETalarm();

             	}

             	catch (Exception Er)
                {
             		MessageBox.Show (Er.ToString());
             		//frmKaffET = new FrmKaffETalarm();
                }

            }
        }
示例#3
0
		private void menuKaffETClick(object sender, EventArgs e)
		{
			FrmKaffETalarm fka = new FrmKaffETalarm();
			fka.Visible=true;
		}
示例#4
0
        private void menuKaffETClick(object sender, EventArgs e)
        {
            FrmKaffETalarm fka = new FrmKaffETalarm();

            fka.Visible = true;
        }