Completato review comandi x demo mode

This commit is contained in:
Samuele E. Locatelli
2020-02-15 12:31:18 +01:00
parent 6d377b8aa7
commit 91fefe6bdd
4 changed files with 39 additions and 44 deletions
+3
View File
@@ -191,6 +191,9 @@
<None Include="conf\.placeholder">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="conf\queueSetupDemo.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="conf\queueSetup.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+26 -36
View File
@@ -49,14 +49,13 @@
this.label1 = new System.Windows.Forms.Label();
this.lblQueueCount = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnDemoPrint = new System.Windows.Forms.Button();
this.longTimer = new System.Windows.Forms.Timer(this.components);
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.backupConfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.getServerConfToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuTestDemo = new System.Windows.Forms.ToolStripMenuItem();
this.printDemoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btnDemo = new System.Windows.Forms.Button();
this.menuEnableDemo = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabStatus.SuspendLayout();
@@ -192,7 +191,7 @@
this.tabSetup.Location = new System.Drawing.Point(4, 22);
this.tabSetup.Name = "tabSetup";
this.tabSetup.Padding = new System.Windows.Forms.Padding(3);
this.tabSetup.Size = new System.Drawing.Size(753, 399);
this.tabSetup.Size = new System.Drawing.Size(753, 373);
this.tabSetup.TabIndex = 1;
this.tabSetup.Text = "Setup";
this.tabSetup.UseVisualStyleBackColor = true;
@@ -258,7 +257,7 @@
this.tableLayoutPanel1.Controls.Add(this.label1, 4, 0);
this.tableLayoutPanel1.Controls.Add(this.lblQueueCount, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.btnStop, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.btnDemo, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.btnDemoPrint, 3, 0);
this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 35);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
@@ -266,6 +265,18 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(761, 44);
this.tableLayoutPanel1.TabIndex = 15;
//
// btnDemoPrint
//
this.btnDemoPrint.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDemoPrint.Location = new System.Drawing.Point(514, 3);
this.btnDemoPrint.Name = "btnDemoPrint";
this.btnDemoPrint.Size = new System.Drawing.Size(94, 38);
this.btnDemoPrint.TabIndex = 15;
this.btnDemoPrint.Text = "Print Demo";
this.btnDemoPrint.UseVisualStyleBackColor = true;
this.btnDemoPrint.Visible = false;
this.btnDemoPrint.Click += new System.EventHandler(this.btnDemoPrint_Click);
//
// longTimer
//
this.longTimer.Interval = 60000;
@@ -273,8 +284,7 @@
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.menuTestDemo});
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(785, 24);
@@ -285,7 +295,8 @@
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.backupConfToolStripMenuItem,
this.getServerConfToolStripMenuItem});
this.getServerConfToolStripMenuItem,
this.menuEnableDemo});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.fileToolStripMenuItem.Text = "&File";
@@ -302,32 +313,12 @@
this.getServerConfToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
this.getServerConfToolStripMenuItem.Text = "&Get server --> conf";
//
// menuTestDemo
// menuEnableDemo
//
this.menuTestDemo.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.printDemoToolStripMenuItem});
this.menuTestDemo.Name = "menuTestDemo";
this.menuTestDemo.Size = new System.Drawing.Size(116, 20);
this.menuTestDemo.Text = "&Test - Demo mode";
this.menuTestDemo.Visible = false;
//
// printDemoToolStripMenuItem
//
this.printDemoToolStripMenuItem.Name = "printDemoToolStripMenuItem";
this.printDemoToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.printDemoToolStripMenuItem.Text = "&Print Demo";
this.printDemoToolStripMenuItem.Click += new System.EventHandler(this.printDemoToolStripMenuItem_Click);
//
// btnDemo
//
this.btnDemo.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDemo.Location = new System.Drawing.Point(514, 3);
this.btnDemo.Name = "btnDemo";
this.btnDemo.Size = new System.Drawing.Size(94, 38);
this.btnDemo.TabIndex = 15;
this.btnDemo.Text = "Demo";
this.btnDemo.UseVisualStyleBackColor = true;
this.btnDemo.Click += new System.EventHandler(this.btnDemo_Click);
this.menuEnableDemo.Name = "menuEnableDemo";
this.menuEnableDemo.Size = new System.Drawing.Size(195, 22);
this.menuEnableDemo.Text = "&Enter Test Mode";
this.menuEnableDemo.Click += new System.EventHandler(this.enableTestDemoModeToolStripMenuItem_Click);
//
// MainForm
//
@@ -382,9 +373,8 @@
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem backupConfToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem getServerConfToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem menuTestDemo;
private System.Windows.Forms.ToolStripMenuItem printDemoToolStripMenuItem;
private System.Windows.Forms.Button btnDemo;
private System.Windows.Forms.ToolStripMenuItem menuEnableDemo;
private System.Windows.Forms.Button btnDemoPrint;
}
}
+9 -8
View File
@@ -151,7 +151,7 @@ namespace LPA
{
lblStatus.Text += " TEST/DEMO MODE";
}
menuTestDemo.Visible = demoMode;
btnDemoPrint.Visible = demoMode;
}
/// <summary>
/// Setup oggetto DGV
@@ -467,7 +467,7 @@ namespace LPA
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void printDemoToolStripMenuItem_Click(object sender, EventArgs e)
private void btnDemoPrint_Click(object sender, EventArgs e)
{
string rawData = "";
string filePath = "";
@@ -505,6 +505,11 @@ namespace LPA
if (confCoda != null)
{
fatto = rPrint.printReport(confCoda.template, confCoda.rdsName, localReportPath, coda.Value.Printer, item.rdsTable, confCoda.deviceInfoParam, true);
if(fatto)
{
coda.Value.NumWaiting--;
coda.Value.NumDone++;
}
}
}
vetoPrint = adesso;
@@ -513,14 +518,10 @@ namespace LPA
}
}
}
}
}
private void btnDemo_Click(object sender, EventArgs e)
private void enableTestDemoModeToolStripMenuItem_Click(object sender, EventArgs e)
{
string message = demoMode ? "Confermi di voler abbandonare la modalità test/Demo?" : "Attenzione! sei sicuro di voler attivare la modalità Test/Demo? il sistema funzionerà in modalità offline e configurate le code di stampa effettuerà test di stampa locale";
string title = "Test / Demo mode";
@@ -532,7 +533,7 @@ namespace LPA
// ricarico dati code e conf...
// update buttons...
btnDemo.Text = demoMode ? "Exit Demo" : "Demo";
menuEnableDemo.Text = demoMode ? "&Exit Test Mode" : "&Enter Test Mode";
setupButtons();
// aggiorno code...
setupQueuePrinter();
+1
View File
@@ -0,0 +1 @@