private void ButtonStopBackup_Click(object sender, EventArgs e) { if (ButtonStopBackup.Text == "停止備份") { ButtonStopBackup.Text = "繼續備份"; TimerFreq.Stop(); TimerCountDown.Stop(); } else { ButtonStopBackup.Text = "停止備份"; TimerFreq.Start(); TimerCountDown.Start(); } }
private void Finished() { TimerFreq.Enabled = true; TimerFreq.Interval = Frequency; TimerFreq.Start(); TimerCountDown.Enabled = true; TimerCountDown.Interval = 1000; TimerCountDown.Start(); ButtonStopBackup.Enabled = true; sFrequency = Frequency / 1000; FromPath = TextBoxFrom.Text; ToPath = TextBoxTo.Text; MessageBox.Show("已完成設定,目前會以「" + ComboBoxFreq.SelectedItem + "」的頻率備份。", "完成"); }//Run this after backup setup