private void ToggleDownloadReplayUI() { if (DownloadReplayUrlText.InvokeRequired || DownloadReplayButton.InvokeRequired) { DownloadReplayUrlText.BeginInvoke((MethodInvoker) delegate() { DownloadReplayUrlText.Enabled = !DownloadReplayUrlText.Enabled; }); DownloadReplayButton.BeginInvoke((MethodInvoker) delegate() { DownloadReplayButton.Enabled = !DownloadReplayButton.Enabled; }); } else { DownloadReplayUrlText.Enabled = !DownloadReplayUrlText.Enabled; DownloadReplayButton.Enabled = !DownloadReplayButton.Enabled; } }
private void ResetDownloadReplayUI() { this.SetDownloadReplayStatus("Idle"); if (DownloadReplayUrlText.InvokeRequired || DownloadReplayProgress.InvokeRequired) { DownloadReplayUrlText.BeginInvoke((MethodInvoker) delegate() { DownloadReplayUrlText.Text = String.Empty; }); DownloadReplayProgress.BeginInvoke((MethodInvoker) delegate() { DownloadReplayProgress.Value = 0; DownloadReplayProgress.Maximum = 100; }); } else { DownloadReplayUrlText.Text = String.Empty; DownloadReplayProgress.Value = 0; DownloadReplayProgress.Maximum = 100; } }