fix chiusura --> send tray
This commit is contained in:
Generated
+11
-10
@@ -23,6 +23,7 @@
|
||||
this.btnSetQueuePrinter = new System.Windows.Forms.Button();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.lblAppName = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lblVers = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.progBar = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lblUptime = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
@@ -47,7 +48,6 @@
|
||||
this.backupConfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.getServerConfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuEnableDemo = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.lblVers = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.trayMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.statusStrip1.SuspendLayout();
|
||||
@@ -100,6 +100,12 @@
|
||||
this.lblAppName.Size = new System.Drawing.Size(62, 17);
|
||||
this.lblAppName.Text = "AppName";
|
||||
//
|
||||
// lblVers
|
||||
//
|
||||
this.lblVers.Name = "lblVers";
|
||||
this.lblVers.Size = new System.Drawing.Size(42, 17);
|
||||
this.lblVers.Text = "a.b.c.d";
|
||||
//
|
||||
// progBar
|
||||
//
|
||||
this.progBar.Name = "progBar";
|
||||
@@ -159,7 +165,7 @@
|
||||
this.tabStatus.Controls.Add(this.dgvQueueStatus);
|
||||
this.tabStatus.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabStatus.Name = "tabStatus";
|
||||
this.tabStatus.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tabStatus.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabStatus.Size = new System.Drawing.Size(753, 373);
|
||||
this.tabStatus.TabIndex = 0;
|
||||
this.tabStatus.Text = "Status";
|
||||
@@ -185,7 +191,7 @@
|
||||
this.tabSetup.Controls.Add(this.lbPrintQueue);
|
||||
this.tabSetup.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabSetup.Name = "tabSetup";
|
||||
this.tabSetup.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tabSetup.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabSetup.Size = new System.Drawing.Size(753, 373);
|
||||
this.tabSetup.TabIndex = 1;
|
||||
this.tabSetup.Text = "Setup";
|
||||
@@ -266,7 +272,7 @@
|
||||
//
|
||||
this.chkTryMargin.AutoSize = true;
|
||||
this.chkTryMargin.Location = new System.Drawing.Point(401, 2);
|
||||
this.chkTryMargin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.chkTryMargin.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.chkTryMargin.Name = "chkTryMargin";
|
||||
this.chkTryMargin.Size = new System.Drawing.Size(108, 17);
|
||||
this.chkTryMargin.TabIndex = 10;
|
||||
@@ -331,12 +337,6 @@
|
||||
this.menuEnableDemo.Text = "&Enter Test Mode";
|
||||
this.menuEnableDemo.Click += new System.EventHandler(this.enableTestDemoModeToolStripMenuItem_Click);
|
||||
//
|
||||
// lblVers
|
||||
//
|
||||
this.lblVers.Name = "lblVers";
|
||||
this.lblVers.Size = new System.Drawing.Size(42, 17);
|
||||
this.lblVers.Text = "a.b.c.d";
|
||||
//
|
||||
// trayMenu
|
||||
//
|
||||
this.trayMenu.Name = "trayMenu";
|
||||
@@ -364,6 +364,7 @@
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "MainForm";
|
||||
this.Text = "Steamware LPA";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
|
||||
+17
-1
@@ -85,6 +85,10 @@ namespace LPA
|
||||
/// Modalità di avvio
|
||||
/// </summary>
|
||||
protected StartMode ModoAvvio = StartMode.STD;
|
||||
/// <summary>
|
||||
/// VAriabile ausiliaria x forzare realmente chiusura
|
||||
/// </summary>
|
||||
protected bool forceClose = false;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -314,7 +318,11 @@ namespace LPA
|
||||
{
|
||||
if (e.ClickedItem.Text.StartsWith("Close"))
|
||||
{
|
||||
// chiudo!
|
||||
// salvo che voglio chiudere davvero
|
||||
forceClose = true;
|
||||
// chiudo tray
|
||||
trayMenu.Close();
|
||||
// chiudo programma!
|
||||
Close();
|
||||
}
|
||||
else if (e.ClickedItem.Text.StartsWith("Show"))
|
||||
@@ -948,5 +956,13 @@ namespace LPA
|
||||
|
||||
#endregion
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!forceClose)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
sendToTray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user