Skip to content

Commit

Permalink
Now cancels if clicking on the "X"
Browse files Browse the repository at this point in the history
  • Loading branch information
R3FR4G authored and R3FR4G committed Apr 30, 2020
1 parent 258c7dc commit 43bdce4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Text-File-Displayer/Project1/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,12 @@ static void MenuIO_Options(object sender, EventArgs e)
{
previousFileName = fileName;
Thread.CurrentThread.IsBackground = true;
IOForm.ShowDialog();
if (IOForm.ShowDialog() == DialogResult.OK)
{
OkIO(null, null);
return;
}
CancelIO(null, null);
}
static void MenuSave()
{
Expand Down Expand Up @@ -656,7 +661,11 @@ static void MenuEdit_L(object sender, EventArgs e)
resetOutlineMenu();
updateGradientSettings();
updateLocationSettings();
EditForm.ShowDialog();
if(EditForm.ShowDialog() == DialogResult.OK)
{
return;
}
CancelEdit(null, null);
}
static void AddConstantLabel(string text, System.Drawing.Point location, Form form)
{
Expand Down

0 comments on commit 43bdce4

Please sign in to comment.