コード例 #1
0
        public Form1()
        {
            InitializeComponent();
            NotifyItem Notifycation = new NotifyItem();

            Notifycation.Notify();
            DateTimes       = "23:00";
            timer1.Interval = 1000;
            timer1.Enabled  = true;
        }
コード例 #2
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            string pickTime = DateTime.Now.ToShortTimeString();

            if (notifycount == 0)
            {
                if (pickTime == DateTimes)
                {
                    NotifyItem Notifycation = new NotifyItem();
                    Notifycation.Notify();
                    notifycount = 1;
                }
            }
            if (pickTime != DateTimes)
            {
                notifycount = 0;
            }
        }