private void ButtonBase3_OnClick(object sender, RoutedEventArgs e)
        {
            //处理倒计时的类
            processCount = new ProcessCount(hour * 3600 + minute * 60 + second);
            CountDown += new CountDownHandler(processCount.ProcessCountDown);

            //开启定时器
            timer.Start();
        }
Example #2
0
        private void ButtonBase3_OnClick(object sender, RoutedEventArgs e)
        {
            //处理倒计时的类
            processCount = new ProcessCount(hour * 3600 + minute * 60 + second);
            CountDown   += new CountDownHandler(processCount.ProcessCountDown);


            //开启定时器
            timer.Start();
        }
Example #3
0
        /// 窗口加载事件 
/// </summary> 
/// <param name="sender"></param> 
/// <param name="e"></param> 
private void MainWin_Loaded(object sender, RoutedEventArgs e) 
{ 
//设置定时器 
timer = new DispatcherTimer(); 
timer.Interval = new TimeSpan(10000000); //时间间隔为一秒 
timer.Tick += new EventHandler(timer_Tick); 
//转换成秒数 
Int32 hour= Convert.ToInt32(HourArea.Text); 
Int32 minute = Convert.ToInt32(MinuteArea.Text); 
Int32 second = Convert.ToInt32(SecondArea.Text); 
//处理倒计时的类 
processCount = new ProcessCount(hour*3600+minute*60+second); 
CountDown += new CountDownHandler(processCount.ProcessCountDown); 
//开启定时器 
timer.Start(); 
} 
Example #4
0
        /// 窗口加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWin_Loaded(object sender, RoutedEventArgs e)
        {
            //设置定时器
            timer          = new DispatcherTimer();
            timer.Interval = new TimeSpan(10000000); //时间间隔为一秒
            timer.Tick    += new EventHandler(timer_Tick);
            //转换成秒数
            Int32 hour   = Convert.ToInt32(HourArea.Text);
            Int32 minute = Convert.ToInt32(MinuteArea.Text);
            Int32 second = Convert.ToInt32(SecondArea.Text);

            //处理倒计时的类
            processCount = new ProcessCount(hour * 3600 + minute * 60 + second);
            CountDown   += new CountDownHandler(processCount.ProcessCountDown);
            //开启定时器
            timer.Start();
        }
Example #5
0
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            timer.IsEnabled = true;
            //转换成秒数

            hour   = Convert.ToInt32(HourArea.Text);
            minute = Convert.ToInt32(MinuteArea.Text);
            second = Convert.ToInt32(SecondArea.Text);


            //处理倒计时的类
            processCount = new ProcessCount(hour * 3600 + minute * 60 + second);
            CountDown   += new CountDownHandler(processCount.ProcessCountDown);


            //开启定时器
            timer.Start();
        }
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            timer.IsEnabled = true;
            //转换成秒数

            hour = Convert.ToInt32(HourArea.Text);
            minute = Convert.ToInt32(MinuteArea.Text);
            second = Convert.ToInt32(SecondArea.Text);

            //处理倒计时的类
            processCount = new ProcessCount(hour * 3600 + minute * 60 + second);
            CountDown += new CountDownHandler(processCount.ProcessCountDown);

            //开启定时器
            timer.Start();
        }