Exemplo n.º 1
0
 public helper(MainWindow _w)
 {
     IsMainWindow = true;
     w = _w;
     InitializeComponent();
     Initial(w.VoatingBackgroundBrush.Opacity);
 }
Exemplo n.º 2
0
 public helper(rooms _r, MainWindow _w)
 {
     IsMainWindow = true;
     w = _w;
     r = _r;
     InitializeComponent();
     Initial(_w.VoatingBackgroundBrush.Opacity);
 }
Exemplo n.º 3
0
 public rooms(MainWindow wnd, double opacity)
 {
     InitializeComponent();
     w = wnd;
     w.client.refreshRooms += client_refreshRooms;
     w.client.refreshWaitingUsers += new EventHandler(client_refreshWaitingUsers);
     w.client.chatMsgWaiting += new EventHandler(client_chatMsgWaiting);
     txt = new TextBlock();
     txt.FontWeight = FontWeights.Bold;
     txt.Text = "Выберите комнату!";
     this.Tag = txt;
     //IsSoundEnabled = wnd.IsSoundEnabled;
     UsersGridBackgroundBrush.Opacity = opacity;
     ChatBackgroundBrush.Opacity = opacity;
     RoomsGridBackgroundBrush.Opacity = opacity;
 }
Exemplo n.º 4
0
 void client_connectSuccess(object sender, EventArgs e)
 {
     Dispatcher.Invoke((Action)(() =>
     {
         txt.Text = "Успешное подключение";
         if (IsSoundEnabled)
             playSound(new Uri(@"sounds\\connect.mp3", UriKind.Relative));
         w = new MainWindow(loginTextBox.Text, client, opacity, IsSoundEnabled, m);
         m.Dispatcher.Invoke((Action)(() =>
             {
                 m.SetLogin(loginTextBox.Text);
             }));
         this.Close();
     }));
 }