Beispiel #1
0
 private void JoinButton_Click(object sender, RoutedEventArgs e)
 {
     client.SendRoomConnect(RoomCodeTextBox.Text);
     if (joined)
     {
         WaitRoom wr = new WaitRoom(client);
         wr.roomcode = RoomCodeTextBox.Text;
         wr.Show();
         this.Close();
     }
 }
Beispiel #2
0
        public WaitRoom(Client client)
        {
            this.client = client;
            ClientRoom cr = new ClientRoom();

            InitializeComponent();
            waitr = this;

            DispatcherTimer dispatcherTimer = new DispatcherTimer();

            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
            dispatcherTimer.Start();
        }
Beispiel #3
0
 private void CreateButton_Click(object sender, RoutedEventArgs e)
 {
     if (nameSet == true)
     {
         WaitRoom wr = new WaitRoom(client);
         wr.Show();
         client.SendRoomCreate(UsernameTextBox.Text);
         this.Close();
     }
     else
     {
         UsernameTextBox.Text = "Set Name First";
     }
 }