コード例 #1
0
 /// <summary> Runs on main thread when the work has been completed </summary>
 private void RunWorkerCompleted_Event(object sender, RunWorkerCompletedEventArgs e)
 {
     this.Invoke(new Action(() =>
     {
         LastCopied         = DateTime.Now;
         Feedback.Text      = "Last transfered: " + LastCopied.ToString("hh:mm:ss tt", System.Globalization.DateTimeFormatInfo.InvariantInfo);
         Feedback.ForeColor = Color.LightGreen;
         CopyCancel.Text    = "Copy Now";
         ProgressBar.Value  = 0;
     }));
     _log.Info("File transfer is completed.");
 }
コード例 #2
0
 /// <summary> Button to set the time to transfer files </summary>
 private void BtnSetTime_Click(object sender, EventArgs e)
 {
     LastSetTime = DateTimePicker.Value;
     _log.Info("Timer Set to: " + LastCopied.ToString("hh:mm:ss tt", System.Globalization.DateTimeFormatInfo.InvariantInfo));
     ToggleTimerLabel(true);
 }