Esempio n. 1
0
        public sudokuWindow()
        {
            InitializeComponent();
            sudoku             = new SudokuC(this);
            mainTimer          = new System.Timers.Timer();
            openFile           = new OpenFileDialog();
            saveFile           = new SaveFileDialog();
            mainTimer.Interval = 1;
            mainTimer.Stop();
            mainTimer.Elapsed += mainTimer_Tick;


            for (int i = 0; i < 81; ++i)
            {
                fromIndexCombo.Items.Add(Convert.ToString(i));
            }

            fromIndexRadio.IsChecked     = true;
            fromIndexCombo.SelectedIndex = 0;
            // --------------------------------------------------------------
            // ------------   OPEN / SAVE DIALOG SETTINGS -------------------
            // --------------------------------------------------------------
            openFile.Title = "Open sudoku file";
            saveFile.Title = "Save sudoku file";
        }
Esempio n. 2
0
 /* Constructor. */
 public SudokuField(int xPos, int yPos, int _index, SudokuC _parent)
 {
     parent                   = _parent;
     myIndex                  = _index;
     Margin                   = new System.Windows.Thickness(xPos, yPos, 10, 10);
     TextAlignment            = System.Windows.TextAlignment.Center;
     Width                    = 25;
     Height                   = 25;
     MaxLength                = 1;
     FontFamily               = new System.Windows.Media.FontFamily("Kristen ITC, Arial");
     FontSize                 = 14;
     VerticalContentAlignment = VerticalAlignment.Center;
     TextAlignment            = TextAlignment.Center;
     Background               = Brushes.White;
     TextChanged             += SetFieldBackColor;
     PreviewKeyDown          += SudokuFieldPKeyDown;
     MouseEnter              += mouseEnterSudokuField;
 }
Esempio n. 3
0
 public FromIndexHeuristic(SudokuC _sudokuTable)
 {
     sudokuTable = _sudokuTable;
     state       = sudokuTable.state; //State.Running;
 }
Esempio n. 4
0
 public RandomIndexHeuristic(SudokuC _sudokuTable) : base(_sudokuTable)
 {
 }
Esempio n. 5
0
 public BestPositionHeuristic(SudokuC _sudokuTable)
 {
     sudokuTable = _sudokuTable;
     state       = sudokuTable.state;
 }