public void WaitForAnotherPlayer() { // this.vm.VM_start(); // this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => // { this.vm.VM_start(); MultiPlayerMazeWindow win = new MultiPlayerMazeWindow(" start"); win.Show(); this.Close(); // })); }
private void JoinGameButton_Click(object sender, RoutedEventArgs e) { try { this.vm.VM_NameOfMaze = (string)comboBox.SelectedItem; this.vm.VM_join(); MultiPlayerMazeWindow win = new MultiPlayerMazeWindow(" Join"); win.Show(); this.Close(); } catch (Exception) { Message.ShowOKMessage("we are sorry, there is a problem with the connection, please try again later..", "ERROE"); } }