Skip to content

Commit

Permalink
=
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliviaophia committed Mar 4, 2018
1 parent 3008ea5 commit cd88a0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
12 changes: 6 additions & 6 deletions SmartTaskbar/SystemTray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public SystemTray()
{
Text = resource.GetString("exit")
};
exit.Click += (s, e) => Application.Exit();
exit.Click += (s, e) =>
{
switcher.Stop();
notifyIcon.Dispose();
Application.Exit();
};
contextMenuStrip = new ContextMenuStrip();
contextMenuStrip.Items.AddRange(new ToolStripItem[]
{
Expand Down Expand Up @@ -145,10 +150,5 @@ private void RadioChecked(ref ToolStripMenuItem tool)
Settings.Default.Save();
tool.Checked = true;
}

~SystemTray()
{
notifyIcon.Dispose();
}
}
}
7 changes: 1 addition & 6 deletions SmartTaskbar/TaskbarSwitcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void Resume()
Start();
}

private void Stop()
public void Stop()
{
if (isStop)
return;
Expand All @@ -85,10 +85,5 @@ private void Stop()
}
catch { }
}

~TaskbarSwitcher()
{
Stop();
}
}
}

0 comments on commit cd88a0d

Please sign in to comment.