fixed notify icon bug

This commit is contained in:
HeshamTB 2018-12-13 22:32:33 +03:00
parent 5818104335
commit ece2a122dd
2 changed files with 9 additions and 2 deletions

View File

@ -322,6 +322,7 @@
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "OWTrack";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
this.SettingsGroup.ResumeLayout(false);
this.SettingsGroup.PerformLayout();
this.ResumeLayout(false);

View File

@ -242,6 +242,12 @@ namespace OWTrack
tr.gamePath = getGamePath();
update();
}
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
notifyIcon1.Icon = null;
notifyIcon1.Dispose();
}
#endregion
}
}