Skip to content

Instantly share code, notes, and snippets.

@Avalarion
Created January 11, 2013 23:53
Show Gist options
  • Save Avalarion/4515015 to your computer and use it in GitHub Desktop.
Save Avalarion/4515015 to your computer and use it in GitHub Desktop.
private void loadGame() {
OpenFileDialog fd = new OpenFileDialog();
fd.Filter = "sudoku files (*.sudoku)|*.sudoku";
if (fd.ShowDialog() == DialogResult.OK)
{
String[,] csvFields = GDK.CSV.read(fd.FileName);
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 9; j++) {
if (csvFields[i, j] != "x")
{
fields[i, j].Text = csvFields[i, j];
fields[i, j].Enabled = false;
}
else
{
fields[i, j].Text = "";
fields[i, j].Enabled = true;
}
}
}
}
else loadGame();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment