private void playAgain_Click(object sender, RoutedEventArgs e) { AwaleGameWindo awaleGameWindo = new AwaleGameWindo(); App.Current.MainWindow = awaleGameWindo; awaleGameWindo.Show(); }
private void StartGame_Click(object sender, RoutedEventArgs e) { //MessageBox.Show(this.pseudo1.Text); this.awaleGame.awale.Joueurs.Add(new Joueur(this.pseudo1.Text)); this.awaleGame.awale.Joueurs.Add(new Joueur(this.pseudo2.Text)); AwaleGameWindo awaleGameWindo = new AwaleGameWindo(); App.Current.MainWindow = awaleGameWindo; this.Close(); awaleGameWindo.Show(); }
private void backgroundWorker4_DoWork(object sender, DoWorkEventArgs e) { if (client.Connected) { STW.WriteLine(this.ready); Application.Current.Dispatcher.Invoke((Action) delegate { AwaleGameWindo awaleGameWindo = new AwaleGameWindo(); App.Current.MainWindow = awaleGameWindo; awaleGameWindo.Show(); this.Close(); //MessageBox.Show(this.receiveTextBox.ToString()); }); } backgroundWorker4.CancelAsync(); }
//lancer le jeu ...Plateau private void backgroundWorker3_DoWork(object sender, DoWorkEventArgs e) { while (client.Connected) { try { receive = STR.ReadLine(); if (receive != "true") { Application.Current.Dispatcher.Invoke((Action) delegate { AwaleGameWindo awaleGameWindo = new AwaleGameWindo(); App.Current.MainWindow = awaleGameWindo; awaleGameWindo.Show(); this.Close(); //MessageBox.Show(this.receiveTextBox.ToString()); }); } receive = ""; } catch (Exception x) { MessageBox.Show(x.Message.ToString()); } } /* if (client.Connected) * { * Application.Current.Dispatcher.Invoke((Action)delegate { * * AwaleGameWindo awaleGameWindo = new AwaleGameWindo(); * App.Current.MainWindow = awaleGameWindo; * awaleGameWindo.Show(); * this.Close(); * * }); * * }*/ }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.myWin = ((Rudo.AwaleGameWindo)(target)); return; case 2: this.score2 = ((System.Windows.Controls.Label)(target)); return; case 3: this.label = ((System.Windows.Controls.Label)(target)); return; case 4: this.e1 = ((System.Windows.Controls.Canvas)(target)); return; case 5: this.e25 = ((System.Windows.Controls.Button)(target)); #line 48 "..\..\AwaleGameWindo.xaml" this.e25.Click += new System.Windows.RoutedEventHandler(this.e25_Click); #line default #line hidden return; case 6: this.e2 = ((System.Windows.Controls.Canvas)(target)); return; case 7: #line 53 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e10_Click); #line default #line hidden return; case 8: this.e3 = ((System.Windows.Controls.Canvas)(target)); return; case 9: #line 58 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e24_Click); #line default #line hidden return; case 10: this.e4 = ((System.Windows.Controls.Canvas)(target)); return; case 11: #line 63 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e11_Click); #line default #line hidden return; case 12: this.e5 = ((System.Windows.Controls.Canvas)(target)); return; case 13: #line 68 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e23_Click); #line default #line hidden return; case 14: this.e6 = ((System.Windows.Controls.Canvas)(target)); return; case 15: #line 73 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e12_Click); #line default #line hidden return; case 16: this.e7 = ((System.Windows.Controls.Canvas)(target)); return; case 17: #line 78 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e22_Click); #line default #line hidden return; case 18: this.e8 = ((System.Windows.Controls.Canvas)(target)); return; case 19: #line 83 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e13_Click); #line default #line hidden return; case 20: this.e9 = ((System.Windows.Controls.Canvas)(target)); return; case 21: #line 89 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e21_Click); #line default #line hidden return; case 22: this.e10 = ((System.Windows.Controls.Canvas)(target)); return; case 23: #line 94 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e14_Click); #line default #line hidden return; case 24: this.e11 = ((System.Windows.Controls.Canvas)(target)); return; case 25: #line 99 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e20_Click); #line default #line hidden return; case 26: this.e12 = ((System.Windows.Controls.Canvas)(target)); return; case 27: #line 104 "..\..\AwaleGameWindo.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.e15_Click); #line default #line hidden return; case 28: this.joueur1 = ((System.Windows.Controls.Label)(target)); return; case 29: this.label1 = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }