Completata gestione hide/show in tray

This commit is contained in:
Samuele E. Locatelli
2017-10-18 15:21:07 +02:00
parent 3d56c03013
commit b05ff37a90
3 changed files with 8 additions and 4672 deletions
+5 -4
View File
@@ -29,7 +29,6 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.gather = new System.Windows.Forms.Timer(this.components);
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lblApp = new System.Windows.Forms.ToolStripStatusLabel();
@@ -120,14 +119,17 @@
//
// notifyIcon1
//
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.ContextMenuStrip = this.trayMenu;
this.notifyIcon1.Text = "IOB-WIN";
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick);
//
// trayMenu
//
this.trayMenu.ImageScalingSize = new System.Drawing.Size(20, 20);
this.trayMenu.Name = "trayMenu";
this.trayMenu.Size = new System.Drawing.Size(61, 4);
this.trayMenu.Size = new System.Drawing.Size(176, 32);
this.trayMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.trayMenu_ItemClicked);
//
// MainForm
//
@@ -136,7 +138,6 @@
this.ClientSize = new System.Drawing.Size(643, 468);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Name = "MainForm";
this.Text = "IOB-WIN";
+3 -3
View File
@@ -132,7 +132,7 @@ namespace IOB_WIN
lastStartTry = DateTime.Now;
// fix icon!
notifyIcon1.Text = string.Format("MTC Adapter | {0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
notifyIcon1.Text = string.Format("IOB-WIN | {0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
Icon = Icon.ExtractAssociatedIcon(utils.defIconFilePath);
notifyIcon1.Icon = Icon.ExtractAssociatedIcon(utils.defIconFilePath);
@@ -236,12 +236,12 @@ namespace IOB_WIN
// SE permessa massimizzazione...
if (utils.CRB("windowCanMax"))
{
trayMenu.Items.Add("Show MTC Adapter");
trayMenu.Items.Add("Show IOB-WIN");
}
// se è permesso tray close...
if (utils.CRB("trayClose"))
{
trayMenu.Items.Add("Close MTC Adapter");
trayMenu.Items.Add("Close IOB-WIN");
}
}
File diff suppressed because it is too large Load Diff