Skip to content

Commit 371d50c

Browse files
R3FR4GR3FR4G
authored andcommitted
Now asks where to save if the previous layout couldn't be load
1 parent 08b598d commit 371d50c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Text-File-Displayer/Project1/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ static void MenuLoad_L(object sender, EventArgs e)
541541
openFileDialog1.RestoreDirectory = true;
542542
if (openFileDialog1.ShowDialog() == DialogResult.OK)
543543
{
544-
LoadFile(openFileDialog1.FileName);
545544
File.WriteAllText(PREVIOUS_INI_NAME, openFileDialog1.FileName);
545+
LoadFile(openFileDialog1.FileName);
546546
}
547547
}
548548
}
@@ -627,6 +627,7 @@ static void LoadFile(string file)
627627
{
628628
textXUpDown.Value = 30;
629629
textYUpDown.Value = 30;
630+
File.WriteAllText(PREVIOUS_INI_NAME, "");
630631
System.Windows.Forms.MessageBox.Show("Couldn't load the layout file");
631632
}
632633
//UpdateText();

0 commit comments

Comments
 (0)