Small fixes am icon

This commit is contained in:
BlubbFish 2010-06-02 09:08:02 +00:00
parent eb90eb773d
commit e0f0a32129
2 changed files with 13 additions and 2 deletions

View File

@ -176,7 +176,7 @@
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
this.Name = "Netzmonitor"; this.Name = "Netzmonitor";
this.ShowInTaskbar = false; this.Resize += new System.EventHandler(Netzmonitor_Resize);
this.Text = "Netzmonitor"; this.Text = "Netzmonitor";
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();

View File

@ -6,6 +6,7 @@ using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Collections;
namespace NetMonitorClient namespace NetMonitorClient
{ {
@ -19,9 +20,19 @@ namespace NetMonitorClient
this.sc = new ServiceControl("NetMonitorServer"); this.sc = new ServiceControl("NetMonitorServer");
} }
private void Netzmonitor_Resize(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.ShowInTaskbar = false;
this.WindowState = FormWindowState.Minimized;
}
}
private void trayIcon_MouseDoubleClick(object sender, MouseEventArgs e) private void trayIcon_MouseDoubleClick(object sender, MouseEventArgs e)
{ {
this.WindowState = System.Windows.Forms.FormWindowState.Normal; this.WindowState = FormWindowState.Normal;
this.ShowInTaskbar = true;
} }
private void TrayMenuNet_Click(object sender, EventArgs e) private void TrayMenuNet_Click(object sender, EventArgs e)