private void OnConnect(object sender, EventArgs e) { string serverName = localServerButton.Checked ? "localhost" : serverTextBox.Text; int port = int.Parse(portTextBox.Text); string serverAddress = string.Format("http://{0}:{1}/ChannelInformationRetriever", serverName, port); ImportProgressForm dlg = new ImportProgressForm(serverAddress); if (dlg.ShowDialog(this) == DialogResult.OK) { groupBox1.Enabled = false; connectButton.Enabled = false; FillChannels(dlg.Channels); } else { statusTextBox.Text += dlg.ErrorMessage; } }
public ChannelInfoRetriever(Label statusLabel, ProgressBar progressBar, ImportProgressForm form) { this.statusLabel = statusLabel; this.progressBar = progressBar; this.form = form; }
public void NotifyOperationCompleteSync(ImportProgressForm form, bool isSuccess, ChannelInfo[] channels, string errorMessage) { form.OnChannelRetrievedComplete(isSuccess, channels, errorMessage); }