public void check(string str, string wersja, MainWindow con)
 {
     if (str != wersja)
     {
         if (!con.CheckAccess())
         {
             con.Dispatcher.Invoke(DispatcherPriority.Send,
             (Action)delegate
             {
                 con.Hide();
             });
         }
         else
             con.Hide();
         MessageBox.Show("Wersja chatu jest nieaktualna!", "Wymagany update");
         //tcpclnt.Close();
         Environment.Exit(0);
     }
 }
Example #2
0
 public void fill(MainWindow con, TextBox tdo, string str)
 {
     if (!con.CheckAccess())
     {
         con.Dispatcher.Invoke(DispatcherPriority.Send,
         (Action)delegate
         {
             if (tdo.Text == "")
             {
                 tdo.Text = str;
             }
         });
     }
     else
     {
         if (tdo.Text == "")
         {
             tdo.Text = str;
         }
     }
 }