示例#1
0
 private void CheckSaveGames()
 {
     for (int i = 0; i < loadItems.Count; i++)
     {
         string name = Levelmanager.CheckSaveGame(i + 1);
         if (name != null)
         {
             loadItems[i].Text    = name;
             loadItems[i].Enabled = true;
             saveItems[i].Text    = name;
         }
     }
 }
示例#2
0
        private void LoadSaveGame(int slot)
        {
            int[][] field  = new int[9][];
            int[][] preset = new int[9][];
            string  diff   = "";

            Levelmanager.LoadSaveGame(slot, ref diff, ref field, ref preset);

            sudoku = new Sudoku(spielfeld.Width, log, preset, diff, field);
            sudoku.fieldNumberHints = möglicheEingabenToolStripMenuItem.Checked;
            sudoku.wrongNumberHints = fehlerhafteEingabeToolStripMenuItem.Checked;
            log.BeginInvoke(new Action(() => Toolbox.LogTextEvent(log, Color.Black, "Spielstand " + slot + ": " + diff + " wurde geladen.")));
            spielfeld.Refresh();
        }
示例#3
0
        private void NewLevel(string difficulty, bool logAcitv = true)
        {
            log.Clear();
            tippToolStripMenuItem.Enabled = true;
            int[][] level = Levelmanager.GetLevel(difficulty);
            sudoku = new Sudoku(minSize, log, level, difficulty);
            sudoku.fieldNumberHints  = möglicheEingabenToolStripMenuItem.Checked;
            sudoku.wrongNumberHints  = fehlerhafteEingabeToolStripMenuItem.Checked;
            sudoku.uniqueNumberHints = eindeutigeFelderToolStripMenuItem.Checked;

            zurückToolStripMenuItem.Enabled = false;

            if (logAcitv)
            {
                log.BeginInvoke(new Action(() => Toolbox.LogTextEvent(log, Color.Black, "Neues " + difficulty + " Sudoku geladen")));
            }
            spielfeld.Refresh();
        }
示例#4
0
 private void spielstand3ToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     log.BeginInvoke(new Action(() => Toolbox.LogTextEvent(log, Color.Black, "Spielstand 3: " + sudoku.difficulty + " wurde gespeichert.")));
     Levelmanager.SaveGame(3, sudoku.map, sudoku.difficulty, sudoku.presetMap);
     CheckSaveGames();
 }