public helper(MainWindow _w) { IsMainWindow = true; w = _w; InitializeComponent(); Initial(w.VoatingBackgroundBrush.Opacity); }
public helper(rooms _r, MainWindow _w) { IsMainWindow = true; w = _w; r = _r; InitializeComponent(); Initial(_w.VoatingBackgroundBrush.Opacity); }
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; }
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(); })); }