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

@ -155,7 +155,7 @@ namespace OWTrack
else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
srTextBox.Text = null;
saveManeger.SaveJSON(tr);
}
}
#region Events
private void timer1_Tick(object sender, EventArgs e) => checkStatus();
@ -242,6 +242,12 @@ namespace OWTrack
tr.gamePath = getGamePath();
update();
}
#endregion
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
notifyIcon1.Icon = null;
notifyIcon1.Dispose();
}
#endregion
}
}