Пример #1
0
        private void LoadBoard()
        {
            string path = textBoxSource.Text;

            if (!File.Exists(path))
            {
                return;
            }

            _refreshDisabled = true;
            try
            {
                Reset();

                var lines = File.ReadAllLines(path);
                _board.Load(lines);

                foreach (var cell in _cells.Values)
                {
                    cell.SetColor(SudokuPanel.Colors.Basic);
                }

                panelBoard.Refresh();
            }
            finally
            {
                _refreshDisabled = false;
            }
        }