示例#1
0
 private void Clock_RemainSecondsChanged(object sender, TomatoClock.RemainSecondsChangedEventArgs e)
 {
     this.Invoke(new Action(() =>
     {
         if (e.newValue < 60 && lblRemain.ForeColor != Color.Red)
         {
             lblRemain.ForeColor = Color.Red;
         }
         int showValue = e.newValue >= 60 ? e.newValue / 60 : e.newValue;
         if (lblRemain.Text != showValue.ToString())
         {
             lblRemain.Text = showValue.ToString();
         }
     }));
 }
示例#2
0
 private void Clock_RemainSecondsChanged(object sender, TomatoClock.RemainSecondsChangedEventArgs e)
 {
     this.Invoke(new Action(() =>
     {
         if (e.newValue < 60 && lblRemain.ForeColor != Color.Red)
         {
             lblRemain.ForeColor = Color.Red;
             new ChDCToolsNotice.FrmNotification(this.Icon.ToBitmap(), this.Text, "Only One Minute!").Show();
             // downloadBackground
             new Action <int, int>(downloadBackGround).BeginInvoke(0, 10, null, null);
         }
         int showValue = e.newValue >= 60 ? e.newValue / 60 : e.newValue;
         if (lblRemain.Text != showValue.ToString())
         {
             lblRemain.Text = showValue.ToString();
         }
         if (notifyIcon.Visible)
         {
             notifyIcon.Text = showValue.ToString();
         }
     }));
 }