Пример #1
0
 public External(Grid sudoku, int[,] buffer, int[,] tab)
 {
     InitializeComponent();
     this.sudoku = sudoku;
     this.buffer = buffer;
     this.tab    = tab;
     backgrd.ColumnDefinitions.Add(new ColumnDefinition());
     backgrd.ColumnDefinitions.Add(new ColumnDefinition());
     backgrd.RowDefinitions.Add(new RowDefinition());
     backgrd.RowDefinitions.Add(new RowDefinition());
     pns.Draw(grid);
     Grid.SetColumn(grid, 1);
     Grid.SetRow(grid, 0);
     Grid.SetRowSpan(grid, 2);
     backgrd.Children.Add(grid);
     nr1.Content            = GUIElementsDescriptions.one;
     nr2.Content            = GUIElementsDescriptions.two;
     nr3.Content            = GUIElementsDescriptions.three;
     nr4.Content            = GUIElementsDescriptions.four;
     nr5.Content            = GUIElementsDescriptions.five;
     nr6.Content            = GUIElementsDescriptions.six;
     nr7.Content            = GUIElementsDescriptions.seven;
     nr8.Content            = GUIElementsDescriptions.eight;
     nr9.Content            = GUIElementsDescriptions.nine;
     button_save.Content    = GUIElementsDescriptions.save;
     button_cancel.Content  = GUIElementsDescriptions.cancel;
     button_clear.Content   = GUIElementsDescriptions.clear;
     button_cancel.IsCancel = true;
 }
Пример #2
0
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            drawer.Clear(Color.Background);

            // TODO: Add your drawing code here
            drawer.BeginDraw();
            board.Draw(drawer);
            drawer.EndDraw();

            base.Draw(gameTime);
        }
Пример #3
0
 public MainWindow()
 {
     InitializeComponent();
     board.Draw(siatka);
     nr1.Content           = GUIElementsDescriptions.one;
     nr2.Content           = GUIElementsDescriptions.two;
     nr3.Content           = GUIElementsDescriptions.three;
     nr4.Content           = GUIElementsDescriptions.four;
     nr5.Content           = GUIElementsDescriptions.five;
     nr6.Content           = GUIElementsDescriptions.six;
     nr7.Content           = GUIElementsDescriptions.seven;
     nr8.Content           = GUIElementsDescriptions.eight;
     nr9.Content           = GUIElementsDescriptions.nine;
     button_clear.Content  = GUIElementsDescriptions.clear;
     button_save.Content   = GUIElementsDescriptions.save;
     button_load.Content   = GUIElementsDescriptions.load;
     button_hint.Content   = GUIElementsDescriptions.hint;
     combo_difficulty.Text = GUIElementsDescriptions.difficulty;
     list.Fill_Combo(combo_difficulty);
     button_print.Content = GUIElementsDescriptions.print;
     tab = solver.Solve_Empty(tab, 0, 0);
 }