Removed NativeMethods - not used as we allow multiple instances now; changed tray icon hover text

This commit is contained in:
szporowolik
2019-10-20 13:40:53 +02:00
parent c35c216c78
commit 2ad1a531b8
4 changed files with 4 additions and 25 deletions

View File

@@ -497,7 +497,6 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "form_Main";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Perun for DCS World";

View File

@@ -187,6 +187,9 @@ namespace Perun_v1
// Set title bar
this.Text = "[#"+ con_txt_dcs_instance.Text + "] " + Globals.strPerunTitleText;
// Set notification icon text
trayIconMain.Text = this.Text;
}
private void con_Button_Listen_OFF_Click(object sender, EventArgs e)
@@ -232,6 +235,7 @@ namespace Perun_v1
// Set title bar
this.Text = Globals.strPerunTitleText;
trayIconMain.Text = this.Text;
// Set globals
Globals.intInstanceId = 0;
@@ -300,16 +304,6 @@ namespace Perun_v1
}
}
protected override void WndProc(ref Message m)
{
// Try to run of 2nd instance
if (m.Msg == NativeMethods.WM_SHOWME)
{
form_Main_BringFromTray();
}
base.WndProc(ref m);
}
private void form_Main_SendToTray()
{
// Sends app to system tray