mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 17:05:39 +02:00
Removed NativeMethods - not used as we allow multiple instances now; changed tray icon hover text
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user