Example #1
0
        private void NewGame_Click(object sender, RoutedEventArgs e) //начать новую игру
        {
            LevelSelect newGame = new LevelSelect();

            newGame.Show();
            this.Close();
        }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.newGame = ((NonoGramm.LevelSelect)(target));
                return;

            case 2:
                this.listBox = ((System.Windows.Controls.ListBox)(target));

            #line 10 "..\..\LevelSelect.xaml"
                this.listBox.Loaded += new System.Windows.RoutedEventHandler(this.ListBox_Loaded);

            #line default
            #line hidden
                return;

            case 3:
                this.button = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\LevelSelect.xaml"
                this.button.Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #3
0
 private void Ng_MouseUp(object sender, MouseButtonEventArgs e) //проверка правильного решения при отпускании кнопки мыши
 {
     convertToBitmapNg();
     if (proverka(bmp1, bmp2))
     {
         MessageBoxResult d = MessageBox.Show("Поздравляем с победой! Не желаете ли сохранить эту картинку на память?", "Победа", MessageBoxButton.YesNo, MessageBoxImage.Question);
         if (d == MessageBoxResult.Yes)
         {
             Microsoft.Win32.SaveFileDialog saveimg = new Microsoft.Win32.SaveFileDialog();
             saveimg.InitialDirectory = @"C:\Users\N\Desktop";
             saveimg.DefaultExt       = ".png";
             saveimg.Filter           = "Image (.png)|*.png";
             if (saveimg.ShowDialog() == true)
             {
                 ToImageSource(ng, saveimg.FileName);
             }
         }
         LevelSelect newGame = new LevelSelect();
         newGame.Show();
         this.Close();
     }
 }