Skip to content

Commit

Permalink
Don't exit through menu when device is syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
koyuawsmbrtn committed Nov 28, 2023
1 parent 06d0eac commit fda2d5a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion PlaySync/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ private void Main_FormClosing(object sender, FormClosingEventArgs e)

private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
if (syncing)
{
MessageBox.Show("Cannot close window. Device is syncing.", "Device is syncing", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else
{
Application.Exit();
}
}

private void readLocalToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down

0 comments on commit fda2d5a

Please sign in to comment.