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;
            }
        }
示例#2
0
 public ChannelInfoRetriever(Label statusLabel, ProgressBar progressBar, ImportProgressForm form)
 {
     this.statusLabel = statusLabel;
     this.progressBar = progressBar;
     this.form        = form;
 }
示例#3
0
 public void NotifyOperationCompleteSync(ImportProgressForm form, bool isSuccess, ChannelInfo[] channels, string errorMessage)
 {
     form.OnChannelRetrievedComplete(isSuccess, channels, errorMessage);
 }