예제 #1
0
파일: Progress.cs 프로젝트: Luigifan/Skynet
        public Progress(string address)
        {
            InitializeComponent();

            MainForm m = new MainForm(address);
            m.Show();
            this.Hide();
        }
예제 #2
0
 private void connectButton_Click(object sender, EventArgs e)
 {
     connectButton.Enabled = false;
     connectButton.Text = "Connecting..";
     connectButton.Update();
     if(addressTextBox.Text.Trim() != string.Empty)
     {
         //Progress p = new Progress(addressTextBox.Text);
         MainForm m = new MainForm(addressTextBox.Text.Trim());
         settings.LastConnected = addressTextBox.Text;
         settings.Save();
         m.ConnectToWebSocket();
         this.Hide();
         if (m.IsDisposed)
         {
             this.Show();
             connectButton.Enabled = true;
             connectButton.Text = "Connect";
         }
         else
             m.Show();
     }
 }