Esempio n. 1
0
        private void signOutButton_Click(object sender, EventArgs e)
        {
            this.client.SignOut();
            var f = new SignInForm(this.client);

            this.Close();
            f.Show();
        }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     failiureLabel.Visible   = false;
     connectingLabel.Visible = true;
     System.Net.IPAddress address;
     try
     {
         address = System.Net.IPAddress.Parse(addressTextBox.Text);
         var client = new SIMClient.Main(address);
         var f      = new SignInForm(client);
         this.Hide();
         f.Closed += (s, args) => this.Close();
         f.Show();
     }
     catch (Exception ex) when(ex is FormatException || ex is SIMClient.Main.InitializationFailiureException)
     {
         connectingLabel.Visible = false;
         failiureLabel.Visible   = true;
     }
 }