private void em_BUTTON_CLICK(object sender, RoutedEventArgs e) { if (p_isGameOver) { sm_InicjalizujListe(); stopwatch.Reset(); //Bo cos sie tam fixuje timerMain.Start(); xe_BUTTON_Label_text.Visibility = Visibility.Collapsed; xe_BUTTON_face_img.Visibility = Visibility.Visible; xe_KWADRAT_textBlock.Text = v_hintGetReady; xe_Label_NumberLeft.Content = p_clicksLeft.ToString(); xe_DUZY_ZIELONY_KWADRAT.Fill = Brushes.LightGreen; p_isGameOver = false; stopwatch.Start(); } else { if (p_czyMierzyCzas) { //WYLOSUJ OKRES v_odstep = sm_LosujZPrzedzialu(); //STOP LICZENIA CZASU stopwatch.Stop(); //ZMIANA Z CZERWONEGO NA ZIELONY xe_DUZY_ZIELONY_KWADRAT.Fill = Brushes.LightGreen; xe_KWADRAT_textBlock.Text = v_hintGetReady; //ZMIANA TEJ PROPRTY p_czyMierzyCzas = false; //ZAPISANIE WYNIKU DO LISTY v_listaWynikow[p_clicksLeft - 1] = (int)stopwatch.ElapsedMilliseconds; //AKTUALIZACJA CLICK LEFT p_clicksLeft--; xe_Label_NumberLeft.Content = p_clicksLeft.ToString(); stopwatch.Reset(); stopwatch.Start(); if (p_clicksLeft == 0)//KONIEC GRY { p_isGameOver = true; timerMain.Stop(); xe_KWADRAT_textBlock.Text = v_hintGratz; xe_DUZY_ZIELONY_KWADRAT.Fill = Brushes.Orange; Wynik oknoWynik = new Wynik(v_listaWynikow); oknoWynik.ShowDialog(); p_clicksLeft = Properties.Settings.Default.ileKlikniec; xe_BUTTON_face_img.Visibility = Visibility.Collapsed; xe_BUTTON_Label_text.Content = v_hintPlayAgain; xe_BUTTON_Label_text.Visibility = Visibility.Visible; } } else { //NOTHING HAPPENS... //Cw_3_RAD.Properties.Resources //Cw_3_RAD.Properties.Settings.Default.Save() } } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.xe_Window = ((Cw_3_RAD.Wynik)(target)); return; case 2: this.xe_MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.xe_Grid_TitleBar = ((System.Windows.Controls.Grid)(target)); #line 38 "..\..\Wynik.xaml" this.xe_Grid_TitleBar.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.em_TitleBar_Grid_OnClick); #line default #line hidden return; case 4: #line 41 "..\..\Wynik.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Losuj_kolor); #line default #line hidden return; case 5: this.xe_TitleBar_label_Title = ((System.Windows.Controls.Label)(target)); return; case 6: this.xe_TitleBar_TextBlock_Close = ((System.Windows.Controls.TextBlock)(target)); #line 61 "..\..\Wynik.xaml" this.xe_TitleBar_TextBlock_Close.MouseEnter += new System.Windows.Input.MouseEventHandler(this.em_Close_OnMouseEnter); #line default #line hidden #line 61 "..\..\Wynik.xaml" this.xe_TitleBar_TextBlock_Close.MouseLeave += new System.Windows.Input.MouseEventHandler(this.em_Close_OnMouseLeave); #line default #line hidden #line 61 "..\..\Wynik.xaml" this.xe_TitleBar_TextBlock_Close.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.em_Close_OnClick); #line default #line hidden return; case 7: this.xe_Button_ZapiszWynik = ((System.Windows.Controls.Button)(target)); #line 63 "..\..\Wynik.xaml" this.xe_Button_ZapiszWynik.Click += new System.Windows.RoutedEventHandler(this.em_ZapiszWynik_OnClick); #line default #line hidden return; case 8: this.xe_Label_name = ((System.Windows.Controls.Label)(target)); return; case 9: this.xe_Button_NieZapisuj = ((System.Windows.Controls.Button)(target)); #line 65 "..\..\Wynik.xaml" this.xe_Button_NieZapisuj.Click += new System.Windows.RoutedEventHandler(this.em_Button_NieTymRazem); #line default #line hidden return; case 10: this.xe_TextBox_name = ((System.Windows.Controls.TextBox)(target)); #line 66 "..\..\Wynik.xaml" this.xe_TextBox_name.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.em_TextBox_OnTextChange); #line default #line hidden #line 66 "..\..\Wynik.xaml" this.xe_TextBox_name.KeyDown += new System.Windows.Input.KeyEventHandler(this.em_TextBox_OnKeyDown); #line default #line hidden return; case 11: this.xe_Label_Wyniki = ((System.Windows.Controls.Label)(target)); return; case 12: this.xe_ScrollViewer = ((System.Windows.Controls.ScrollViewer)(target)); return; case 13: this.xe_TextBlock_wyniki = ((System.Windows.Controls.TextBlock)(target)); return; case 14: this.xe_Wynik_Sredni = ((System.Windows.Controls.Label)(target)); return; case 15: this.xe_WYNIK = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }