MainWnd: Reload procedures button.

This commit is contained in:
Milan Hanajik
2021-12-17 11:51:53 +01:00
parent 1a8a6defd9
commit ba549cbaee
3 changed files with 141 additions and 16 deletions
+34 -1
View File
@@ -45,7 +45,9 @@ namespace TBF.UI
this.topHorizontalSplitContainer = new System.Windows.Forms.SplitContainer(); this.topHorizontalSplitContainer = new System.Windows.Forms.SplitContainer();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.procedureGroupBox = new System.Windows.Forms.GroupBox(); this.procedureGroupBox = new System.Windows.Forms.GroupBox();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.procedureComboBox = new System.Windows.Forms.ComboBox(); this.procedureComboBox = new System.Windows.Forms.ComboBox();
this.reloadProceduresButton = new System.Windows.Forms.Button();
this.progressGroupBox = new System.Windows.Forms.GroupBox(); this.progressGroupBox = new System.Windows.Forms.GroupBox();
this.mainProgressBar = new System.Windows.Forms.ProgressBar(); this.mainProgressBar = new System.Windows.Forms.ProgressBar();
this.descriptionGroupBox = new System.Windows.Forms.GroupBox(); this.descriptionGroupBox = new System.Windows.Forms.GroupBox();
@@ -122,6 +124,10 @@ namespace TBF.UI
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
this.procedureGroupBox.SuspendLayout(); this.procedureGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.progressGroupBox.SuspendLayout(); this.progressGroupBox.SuspendLayout();
this.descriptionGroupBox.SuspendLayout(); this.descriptionGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.verticalSplitContainer)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.verticalSplitContainer)).BeginInit();
@@ -210,11 +216,25 @@ namespace TBF.UI
// //
// procedureGroupBox // procedureGroupBox
// //
this.procedureGroupBox.Controls.Add(this.procedureComboBox); this.procedureGroupBox.Controls.Add(this.splitContainer2);
resources.ApplyResources(this.procedureGroupBox, "procedureGroupBox"); resources.ApplyResources(this.procedureGroupBox, "procedureGroupBox");
this.procedureGroupBox.Name = "procedureGroupBox"; this.procedureGroupBox.Name = "procedureGroupBox";
this.procedureGroupBox.TabStop = false; this.procedureGroupBox.TabStop = false;
// //
// splitContainer2
//
resources.ApplyResources(this.splitContainer2, "splitContainer2");
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.procedureComboBox);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.reloadProceduresButton);
//
// procedureComboBox // procedureComboBox
// //
resources.ApplyResources(this.procedureComboBox, "procedureComboBox"); resources.ApplyResources(this.procedureComboBox, "procedureComboBox");
@@ -223,6 +243,13 @@ namespace TBF.UI
this.procedureComboBox.SelectedIndexChanged += new System.EventHandler(this.procedureComboBox_SelectedIndexChanged); this.procedureComboBox.SelectedIndexChanged += new System.EventHandler(this.procedureComboBox_SelectedIndexChanged);
this.procedureComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.procedureComboBox_KeyPress); this.procedureComboBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.procedureComboBox_KeyPress);
// //
// reloadProceduresButton
//
resources.ApplyResources(this.reloadProceduresButton, "reloadProceduresButton");
this.reloadProceduresButton.Name = "reloadProceduresButton";
this.reloadProceduresButton.UseVisualStyleBackColor = true;
this.reloadProceduresButton.Click += new System.EventHandler(this.reloadProceduresButton_Click);
//
// progressGroupBox // progressGroupBox
// //
this.progressGroupBox.Controls.Add(this.mainProgressBar); this.progressGroupBox.Controls.Add(this.mainProgressBar);
@@ -702,6 +729,10 @@ namespace TBF.UI
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false);
this.procedureGroupBox.ResumeLayout(false); this.procedureGroupBox.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.progressGroupBox.ResumeLayout(false); this.progressGroupBox.ResumeLayout(false);
this.descriptionGroupBox.ResumeLayout(false); this.descriptionGroupBox.ResumeLayout(false);
this.descriptionGroupBox.PerformLayout(); this.descriptionGroupBox.PerformLayout();
@@ -805,6 +836,8 @@ namespace TBF.UI
private System.Windows.Forms.TabPage calendarTabPage; private System.Windows.Forms.TabPage calendarTabPage;
private System.Windows.Forms.ToolStripMenuItem editSchDrawingTSMItem; private System.Windows.Forms.ToolStripMenuItem editSchDrawingTSMItem;
private SchematicDrawing.SchematicDrawingCtrl drawingCtrl; private SchematicDrawing.SchematicDrawingCtrl drawingCtrl;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.Button reloadProceduresButton;
} }
} }
+10 -5
View File
@@ -607,7 +607,7 @@ namespace TBF.UI
return; return;
} }
procedureComboBox.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0); reloadProceduresButton.Enabled = procedureComboBox.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0);
optoHeadsToolStripMenuItem.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0); optoHeadsToolStripMenuItem.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0);
if (procedureComboBox.Enabled) if (procedureComboBox.Enabled)
@@ -721,7 +721,7 @@ namespace TBF.UI
private void backUpResultsTSMItem_Click(object s, EventArgs e) { BackupResults(); } private void backUpResultsTSMItem_Click(object s, EventArgs e) { BackupResults(); }
private void passwdTSMItem_Click(object s, EventArgs e) { new SharedDatabase.Forms.PasswordChangeDlg(GlobalData.GetCurrentUserName()).ShowDialog(); } private void passwdTSMItem_Click(object s, EventArgs e) { new SharedDatabase.Forms.PasswordChangeDlg(GlobalData.GetCurrentUserName()).ShowDialog(); }
private void aboutTSMItem_Click(object s, EventArgs e) { new TBF.UI.Help.AboutDlg().ShowDialog(); } private void aboutTSMItem_Click(object s, EventArgs e) { new TBF.UI.Help.AboutDlg().ShowDialog(); }
/// <summary> /// <summary>
/// Read the database and re-initialize procedureComboBox items. /// Read the database and re-initialize procedureComboBox items.
@@ -811,9 +811,9 @@ namespace TBF.UI
try try
{ {
tracingDBOrders = SharedDatabase.TracingDB.CreateSession(TBF.DB.CurrentBench.EventsDBSettings.ConnectionString) tracingDBOrders = SharedDatabase.TracingDB.CreateSession(TBF.DB.CurrentBench.EventsDBSettings.ConnectionString)
.QueryOver<SharedDatabase.Entities.OrderInfo>() .QueryOver<SharedDatabase.Entities.OrderInfo>()
.Where(x => x.POState != (sbyte)SharedDatabase.Entities.OrderState.Finished) .Where(x => x.POState != (sbyte)SharedDatabase.Entities.OrderState.Finished)
.List(); .List();
} }
catch catch
{ {
@@ -959,6 +959,11 @@ namespace TBF.UI
} }
} }
private void reloadProceduresButton_Click(object sender, EventArgs e)
{
if (procedureComboBox.Enabled) ReloadProcedureComboBoxItems();
}
/// <summary> /// <summary>
/// Save UI settings to Program.LocalSettings and save them to a file. /// Save UI settings to Program.LocalSettings and save them to a file.
/// UI settings are: /// UI settings are:
+97 -10
View File
@@ -252,6 +252,15 @@
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing"> <data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="splitContainer2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="splitContainer2.IsSplitterFixed" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="splitContainer2.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 23</value>
</data>
<data name="procedureComboBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="procedureComboBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
@@ -262,13 +271,13 @@
<value>Verdana, 15.75pt</value> <value>Verdana, 15.75pt</value>
</data> </data>
<data name="procedureComboBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="procedureComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 23</value> <value>0, 0</value>
</data> </data>
<data name="procedureComboBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms"> <data name="procedureComboBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>23, 3, 3, 3</value> <value>23, 3, 3, 3</value>
</data> </data>
<data name="procedureComboBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="procedureComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>389, 33</value> <value>353, 33</value>
</data> </data>
<data name="procedureComboBox.TabIndex" type="System.Int32, mscorlib"> <data name="procedureComboBox.TabIndex" type="System.Int32, mscorlib">
<value>6</value> <value>6</value>
@@ -280,11 +289,89 @@
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;procedureComboBox.Parent" xml:space="preserve"> <data name="&gt;&gt;procedureComboBox.Parent" xml:space="preserve">
<value>procedureGroupBox</value> <value>splitContainer2.Panel1</value>
</data> </data>
<data name="&gt;&gt;procedureComboBox.ZOrder" xml:space="preserve"> <data name="&gt;&gt;procedureComboBox.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;splitContainer2.Panel1.Name" xml:space="preserve">
<value>splitContainer2.Panel1</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel1.Parent" xml:space="preserve">
<value>splitContainer2</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="reloadProceduresButton.Font" type="System.Drawing.Font, System.Drawing">
<value>Verdana, 15.75pt, style=Bold</value>
</data>
<data name="reloadProceduresButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="reloadProceduresButton.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 0</value>
</data>
<data name="reloadProceduresButton.Size" type="System.Drawing.Size, System.Drawing">
<value>35, 33</value>
</data>
<data name="reloadProceduresButton.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="reloadProceduresButton.Text" xml:space="preserve">
<value>R</value>
</data>
<data name="&gt;&gt;reloadProceduresButton.Name" xml:space="preserve">
<value>reloadProceduresButton</value>
</data>
<data name="&gt;&gt;reloadProceduresButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;reloadProceduresButton.Parent" xml:space="preserve">
<value>splitContainer2.Panel2</value>
</data>
<data name="&gt;&gt;reloadProceduresButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel2.Name" xml:space="preserve">
<value>splitContainer2.Panel2</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel2.Parent" xml:space="preserve">
<value>splitContainer2</value>
</data>
<data name="&gt;&gt;splitContainer2.Panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="splitContainer2.Size" type="System.Drawing.Size, System.Drawing">
<value>389, 39</value>
</data>
<data name="splitContainer2.SplitterDistance" type="System.Int32, mscorlib">
<value>353</value>
</data>
<data name="splitContainer2.SplitterWidth" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="splitContainer2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;splitContainer2.Name" xml:space="preserve">
<value>splitContainer2</value>
</data>
<data name="&gt;&gt;splitContainer2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;splitContainer2.Parent" xml:space="preserve">
<value>procedureGroupBox</value>
</data>
<data name="&gt;&gt;splitContainer2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="procedureGroupBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="procedureGroupBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
@@ -598,7 +685,7 @@
<value>drawingCtrl</value> <value>drawingCtrl</value>
</data> </data>
<data name="&gt;&gt;drawingCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;drawingCtrl.Type" xml:space="preserve">
<value>SchematicDrawing.SchematicDrawingCtrl, SchematicDrawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</value> <value>SchematicDrawing.SchematicDrawingCtrl, SchematicDrawing, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;drawingCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;drawingCtrl.Parent" xml:space="preserve">
<value>homeTabPage</value> <value>homeTabPage</value>
@@ -652,7 +739,7 @@
<value>processTabPageCtrl</value> <value>processTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;processTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;processTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Process.ProcessTabPageCtrl, TBF, Version=3.1.1810.0, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Process.ProcessTabPageCtrl, TBF, Version=3.1.1843.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;processTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;processTabPageCtrl.Parent" xml:space="preserve">
<value>processTabPage</value> <value>processTabPage</value>
@@ -730,7 +817,7 @@
<value>resultsTabPageCtrl</value> <value>resultsTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;resultsTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;resultsTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=3.1.1810.0, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=3.1.1843.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;resultsTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;resultsTabPageCtrl.Parent" xml:space="preserve">
<value>resultsTabPage</value> <value>resultsTabPage</value>
@@ -781,7 +868,7 @@
<value>graphsTabPageCtrl</value> <value>graphsTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;graphsTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;graphsTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=3.1.1810.0, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=3.1.1843.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;graphsTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;graphsTabPageCtrl.Parent" xml:space="preserve">
<value>graphsTabPage</value> <value>graphsTabPage</value>
@@ -835,7 +922,7 @@
<value>eventLogsTabPageCtrl</value> <value>eventLogsTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;eventLogsTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;eventLogsTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=3.1.1810.0, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=3.1.1843.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;eventLogsTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;eventLogsTabPageCtrl.Parent" xml:space="preserve">
<value>eventLogsTabPage</value> <value>eventLogsTabPage</value>
@@ -886,7 +973,7 @@
<value>calendarTabPageCtrl</value> <value>calendarTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;calendarTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;calendarTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=3.1.1810.0, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=3.1.1843.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;calendarTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;calendarTabPageCtrl.Parent" xml:space="preserve">
<value>calendarTabPage</value> <value>calendarTabPage</value>
@@ -937,7 +1024,7 @@
<value>picturesTabPageCtrl</value> <value>picturesTabPageCtrl</value>
</data> </data>
<data name="&gt;&gt;picturesTabPageCtrl.Type" xml:space="preserve"> <data name="&gt;&gt;picturesTabPageCtrl.Type" xml:space="preserve">
<value>TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=3.1.1810.0, Culture=neutral, PublicKeyToken=null</value> <value>TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=3.1.1843.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;picturesTabPageCtrl.Parent" xml:space="preserve"> <data name="&gt;&gt;picturesTabPageCtrl.Parent" xml:space="preserve">
<value>picturesTabPage</value> <value>picturesTabPage</value>