From 66b463c468b39d5b2adf7d1487501d00a1920c8c Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Mon, 26 Jun 2023 12:44:20 +0200 Subject: [PATCH] MainWnd : Procedure selection with filters (profile, DN, Qn, ...) --- TBF/Rig/StateMachine.cs | 5 +- TBF/UI/MainWnd.Designer.cs | 101 +++++++++++++- TBF/UI/MainWnd.cs | 214 ++++++++++++++++++++++------- TBF/UI/MainWnd.resx | 275 ++++++++++++++++++++++++++++++++++--- 4 files changed, 523 insertions(+), 72 deletions(-) diff --git a/TBF/Rig/StateMachine.cs b/TBF/Rig/StateMachine.cs index 2bfeb2285..eb02469be 100644 --- a/TBF/Rig/StateMachine.cs +++ b/TBF/Rig/StateMachine.cs @@ -52,6 +52,7 @@ namespace TBF.Rig /// Public components public static Elde.ControlBoardDev ControlBoard; + public static IWaterMeter WaterMeterCmpnt; public static GenericDevices.IAmbient Ambient; public static IOperation BenchWaitingOp; public static IOperation BenchErrorOp; @@ -358,7 +359,9 @@ namespace TBF.Rig } } - if (cmpnt is IScaleOrTank) + if (WaterMeterCmpnt == null && cmpnt is IWaterMeter) WaterMeterCmpnt = cmpnt as IWaterMeter; + + if (cmpnt is IScaleOrTank) { IScaleOrTank tank = cmpnt as IScaleOrTank; diff --git a/TBF/UI/MainWnd.Designer.cs b/TBF/UI/MainWnd.Designer.cs index 8005a86ac..2cd5be43a 100644 --- a/TBF/UI/MainWnd.Designer.cs +++ b/TBF/UI/MainWnd.Designer.cs @@ -107,6 +107,16 @@ namespace TBF.UI this.resultsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.graphsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.calendarTSMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.profileLabel = new System.Windows.Forms.Label(); + this.profileComboBox = new System.Windows.Forms.ComboBox(); + this.producerLabel = new System.Windows.Forms.Label(); + this.mclassLabel = new System.Windows.Forms.Label(); + this.q3Label = new System.Windows.Forms.Label(); + this.dnLabel = new System.Windows.Forms.Label(); + this.producerComboBox = new System.Windows.Forms.ComboBox(); + this.mclassComboBox = new System.Windows.Forms.ComboBox(); + this.q3ComboBox = new System.Windows.Forms.ComboBox(); + this.dnComboBox = new System.Windows.Forms.ComboBox(); ((System.ComponentModel.ISupportInitialize)(this.topVerticalSplitContainer)).BeginInit(); this.topVerticalSplitContainer.Panel1.SuspendLayout(); this.topVerticalSplitContainer.Panel2.SuspendLayout(); @@ -235,6 +245,16 @@ namespace TBF.UI // // descriptionGroupBox // + this.descriptionGroupBox.Controls.Add(this.profileLabel); + this.descriptionGroupBox.Controls.Add(this.profileComboBox); + this.descriptionGroupBox.Controls.Add(this.producerLabel); + this.descriptionGroupBox.Controls.Add(this.mclassLabel); + this.descriptionGroupBox.Controls.Add(this.q3Label); + this.descriptionGroupBox.Controls.Add(this.dnLabel); + this.descriptionGroupBox.Controls.Add(this.producerComboBox); + this.descriptionGroupBox.Controls.Add(this.mclassComboBox); + this.descriptionGroupBox.Controls.Add(this.q3ComboBox); + this.descriptionGroupBox.Controls.Add(this.dnComboBox); this.descriptionGroupBox.Controls.Add(this.descriptionLabel); resources.ApplyResources(this.descriptionGroupBox, "descriptionGroupBox"); this.descriptionGroupBox.Name = "descriptionGroupBox"; @@ -580,10 +600,10 @@ namespace TBF.UI resources.ApplyResources(this.upgradeTSMenuItem, "upgradeTSMenuItem"); this.upgradeTSMenuItem.Click += new System.EventHandler(this.upgradeTSMenuItem_Click); // - // iPerlHeadsToolStripMenuItem + // optoHeadsToolStripMenuItem // - this.optoHeadsToolStripMenuItem.Name = "iPerlHeadsToolStripMenuItem"; - resources.ApplyResources(this.optoHeadsToolStripMenuItem, "iPerlHeadsToolStripMenuItem"); + this.optoHeadsToolStripMenuItem.Name = "optoHeadsToolStripMenuItem"; + resources.ApplyResources(this.optoHeadsToolStripMenuItem, "optoHeadsToolStripMenuItem"); this.optoHeadsToolStripMenuItem.Click += new System.EventHandler(this.optoHeadsToolStripMenuItem_Click); // // clearCountersToolStripMenuItem @@ -651,6 +671,71 @@ namespace TBF.UI resources.ApplyResources(this.calendarTSMenuItem, "calendarTSMenuItem"); this.calendarTSMenuItem.Click += new System.EventHandler(this.calendarTSMenuItem_Click); // + // profileLabel + // + resources.ApplyResources(this.profileLabel, "profileLabel"); + this.profileLabel.Name = "profileLabel"; + // + // profileComboBox + // + this.profileComboBox.FormattingEnabled = true; + resources.ApplyResources(this.profileComboBox, "profileComboBox"); + this.profileComboBox.Name = "profileComboBox"; + this.profileComboBox.SelectedIndexChanged += new System.EventHandler(this.profileComboBox_SelectedIndexChanged); + this.profileComboBox.TextChanged += new System.EventHandler(this.profileComboBox_TextChanged); + // + // producerLabel + // + resources.ApplyResources(this.producerLabel, "producerLabel"); + this.producerLabel.Name = "producerLabel"; + // + // mclassLabel + // + resources.ApplyResources(this.mclassLabel, "mclassLabel"); + this.mclassLabel.Name = "mclassLabel"; + // + // q3Label + // + resources.ApplyResources(this.q3Label, "q3Label"); + this.q3Label.Name = "q3Label"; + // + // dnLabel + // + resources.ApplyResources(this.dnLabel, "dnLabel"); + this.dnLabel.Name = "dnLabel"; + // + // producerComboBox + // + this.producerComboBox.FormattingEnabled = true; + resources.ApplyResources(this.producerComboBox, "producerComboBox"); + this.producerComboBox.Name = "producerComboBox"; + this.producerComboBox.SelectedIndexChanged += new System.EventHandler(this.producerComboBox_SelectedIndexChanged); + this.producerComboBox.TextChanged += new System.EventHandler(this.producerComboBox_TextChanged); + // + // mclassComboBox + // + this.mclassComboBox.FormattingEnabled = true; + resources.ApplyResources(this.mclassComboBox, "mclassComboBox"); + this.mclassComboBox.Name = "mclassComboBox"; + this.mclassComboBox.SelectedIndexChanged += new System.EventHandler(this.mclassComboBox_SelectedIndexChanged); + this.mclassComboBox.TextChanged += new System.EventHandler(this.mclassComboBox_TextChanged); + // + // q3ComboBox + // + this.q3ComboBox.FormattingEnabled = true; + resources.ApplyResources(this.q3ComboBox, "q3ComboBox"); + this.q3ComboBox.Name = "q3ComboBox"; + this.q3ComboBox.SelectedIndexChanged += new System.EventHandler(this.q3ComboBox_SelectedIndexChanged); + this.q3ComboBox.TextChanged += new System.EventHandler(this.q3ComboBox_TextChanged); + // + // dnComboBox + // + this.dnComboBox.FormattingEnabled = true; + resources.ApplyResources(this.dnComboBox, "dnComboBox"); + this.dnComboBox.Name = "dnComboBox"; + this.dnComboBox.SelectedIndexChanged += new System.EventHandler(this.dnComboBox_SelectedIndexChanged); + this.dnComboBox.TextChanged += new System.EventHandler(this.dnComboBox_TextChanged); + // // MainWnd // resources.ApplyResources(this, "$this"); @@ -807,6 +892,16 @@ namespace TBF.UI private System.Windows.Forms.ToolStripMenuItem benchUncertaintyTSMItem; private System.Windows.Forms.ToolStripMenuItem calendarTSMenuItem; private System.Windows.Forms.TabPage calendarTabPage; + private System.Windows.Forms.Label profileLabel; + private System.Windows.Forms.ComboBox profileComboBox; + private System.Windows.Forms.Label producerLabel; + private System.Windows.Forms.Label mclassLabel; + private System.Windows.Forms.Label q3Label; + private System.Windows.Forms.Label dnLabel; + private System.Windows.Forms.ComboBox producerComboBox; + private System.Windows.Forms.ComboBox mclassComboBox; + private System.Windows.Forms.ComboBox q3ComboBox; + private System.Windows.Forms.ComboBox dnComboBox; } } diff --git a/TBF/UI/MainWnd.cs b/TBF/UI/MainWnd.cs index 19e229fff..32a8f5eb2 100644 --- a/TBF/UI/MainWnd.cs +++ b/TBF/UI/MainWnd.cs @@ -29,8 +29,17 @@ namespace TBF.UI public static IDictionary ProcedureNrs = new Dictionary(); /// Used in PreviousResultsDlg public BenchControlPanel BenchControlPanel; + + string selectedProfile; + float selectedDN; + double selectedQ3; + string selectedMClass; + string selectedProducer; + public IList AllProcedures; /// List of all active procedures + public IList Procedures; /// List of procedures satisfying filter criteria public ProcedureInfo SelectedProcedure; public Procedure CurrentProcedure; + public bool IsShutdownDisabled; public bool IsShutdownPCAfterClosingTbf; @@ -103,8 +112,8 @@ namespace TBF.UI Text = string.Format("Test Bench Framework ver. {0} - {1}{2}", Program.Version, - TBF.DB.CurrentBench.BenchName, - TBF.DB.CurrentBench.IsRealBench ? "" : Strings._offline); + DB.CurrentBench.BenchName, + DB.CurrentBench.IsRealBench ? "" : Strings._offline); /// /// Customize menu items /// @@ -117,13 +126,13 @@ namespace TBF.UI helpTSMenuItem.Text = Strings.Help; #if CAMERA /// Add 'Camera' menu item - cameraTSMItem = new System.Windows.Forms.ToolStripMenuItem(); + cameraTSMItem = new ToolStripMenuItem(); cameraTSMItem.Name = "cameraTSMItem"; cameraTSMItem.Text = Strings.Camera; - cameraTSMItem.Click += new System.EventHandler(this.cameraTSMItem_Click); + cameraTSMItem.Click += new EventHandler(this.cameraTSMItem_Click); - mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.cameraTSMItem}); + mainMenuStrip.Items.AddRange(new ToolStripItem[] {this.cameraTSMItem}); #endif UpdateMenuItemsVisibility(); @@ -133,14 +142,14 @@ namespace TBF.UI IsShutdownDisabled = true; IsShutdownPCAfterClosingTbf = false; - Rig.StateMachine.MachineState = TBF.DB.CurrentBench.IsRealBench ? Rig.MachineState.StartingUp : Rig.MachineState.Disabled; + Rig.StateMachine.MachineState = DB.CurrentBench.IsRealBench ? Rig.MachineState.StartingUp : Rig.MachineState.Disabled; TBF.Data.SetData(); /// if (Rig.StateMachine.MachineState == Rig.MachineState.StartingUp) { try { - startupSession = TBF.DB.ConfigDBSessionFactory.OpenSession(); + startupSession = DB.ConfigDBSessionFactory.OpenSession(); /// Load components, initialize the control board, etc. Rig.StateMachine.InitializeBoardEtc(startupSession, ctrlBrdComponent); @@ -180,9 +189,41 @@ namespace TBF.UI MessageBox.Show(errMsg, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } + + /// Profile + selectedProfile = null; + ComboBox cb = profileComboBox; + cb.Items.Add(Strings.any); + cb.Items.Add(Strings.no_profile); + cb.Items.Add(Strings.any_profile); + cb.Text = cb.Items[0].ToString(); + + /// DN + selectedDN = 0; + cb = dnComboBox; + cb.Items.Add(Strings.any); + cb.Text = cb.Items[0].ToString(); + + /// Q3 / Qn + selectedQ3 = 0; + cb = q3ComboBox; + cb.Items.Add(Strings.any); + cb.Text = cb.Items[0].ToString(); + + /// Metrological class + selectedMClass = null; + cb = mclassComboBox; + cb.Items.Add(Strings.any); + cb.Text = cb.Items[0].ToString(); + + /// Producer + selectedProducer = null; + cb = producerComboBox; + cb.Items.Add(Strings.any); + cb.Text = cb.Items[0].ToString(); } - void Localize() + void Localize() { procedureGroupBox.Text = Strings.Procedure; activityGroupBox.Text = Strings.Activity; @@ -213,7 +254,7 @@ namespace TBF.UI Top = (ls.MainWndTop != 0) ? ls.MainWndTop : 5; } - if (TBF.Rig.StateMachine.MachineState == TBF.Rig.MachineState.StartingUp) + if (Rig.StateMachine.MachineState == Rig.MachineState.StartingUp) { var form = new Shared.ModelessActivityForm() { @@ -284,7 +325,7 @@ namespace TBF.UI } catch (Exception exc) { - TBF.Rig.StateMachine.MachineState = TBF.Rig.MachineState.FailedToStart; + Rig.StateMachine.MachineState = Rig.MachineState.FailedToStart; form.CloseForm(null, new EventArgs()); formThread.Join(); @@ -295,9 +336,7 @@ namespace TBF.UI Environment.NewLine + exc.Message, innerExcMsg); log.Fatal(errMsg); - MessageBox.Show(errMsg, Strings.Error, - System.Windows.Forms.MessageBoxButtons.OK, - System.Windows.Forms.MessageBoxIcon.Exclamation); + MessageBox.Show(errMsg, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } @@ -309,9 +348,9 @@ namespace TBF.UI /// Initialize bench control user interface(s) BenchControlPanel = new BenchControlPanel(); - BenchControlPanel.BalancesCount = TBF.Rig.MettlerToledo.Standard.BalanceDev.BalancesCount - + TBF.Rig.MettlerToledo.Multi.BalanceDev.BalancesCount - + TBF.Rig.Various.TankWithLevelMsrmnt.Tank.TanksCount; + BenchControlPanel.BalancesCount = Rig.MettlerToledo.Standard.BalanceDev.BalancesCount + + Rig.MettlerToledo.Multi.BalanceDev.BalancesCount + + Rig.Various.TankWithLevelMsrmnt.Tank.TanksCount; new System.ComponentModel.ComponentResourceManager(typeof(MainWnd)).ApplyResources(BenchControlPanel, "benchControlPanel"); BenchControlPanel.Name = "benchControlPanel"; rightHorizSplitContainer.Panel2.Controls.Add(BenchControlPanel); @@ -324,15 +363,15 @@ namespace TBF.UI UpdateUser(); mainTabControl.SelectTab((int)MainTabPageId.Hydraulics); - if (TBF.Rig.StateMachine.MachineState == TBF.Rig.MachineState.StartingUp) + if (Rig.StateMachine.MachineState == Rig.MachineState.StartingUp) { /// /// Populate calendar with calendar events from components /// var calEvents = new List(); - foreach (var cmpnt in TBF.Rig.StateMachine.Components) + foreach (var cmpnt in Rig.StateMachine.Components) { - var cmpntWithEvents = cmpnt as TBF.Rig.GenericDevices.IHasCalendarEvents; + var cmpntWithEvents = cmpnt as Rig.GenericDevices.IHasCalendarEvents; if (cmpntWithEvents != null) { foreach (var evnt in cmpntWithEvents.GetCalendarEvents()) calEvents.Add(evnt); @@ -345,13 +384,10 @@ namespace TBF.UI Rig.StateMachine.Start(); log.Info("Test bench started"); } - else if (TBF.Rig.StateMachine.MachineState == TBF.Rig.MachineState.FailedToStart) + else if (Rig.StateMachine.MachineState == Rig.MachineState.FailedToStart) { BenchControlPanel.OnButtonsEtc(null, new ButtonsEtcEventArgs(ButtonsEtc.None)); - MessageBox.Show(Strings.Bench_is_not_running, - Strings.Warning, - System.Windows.Forms.MessageBoxButtons.OK, - System.Windows.Forms.MessageBoxIcon.Exclamation); + MessageBox.Show(Strings.Bench_is_not_running, Strings.Warning, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } @@ -379,7 +415,7 @@ namespace TBF.UI /// /// Invoked from the UiBridge to update the activity label. /// - void OnActivity(object sender, UiBridge.ActivityEventArgs args) + void OnActivity(object sender, ActivityEventArgs args) { switch (args.Cmd) { @@ -407,7 +443,7 @@ namespace TBF.UI void OnStateChanged(object sender, StateChangedEventArgs args) { activityStatusLabel.Text = string.Format("{0}: {1}, {2}", - TBF.Resources.Strings.Batch, TBF.Rig.Sequences.ProcessData.BatchNr, args.StateChangedMsg); + Strings.Batch, Rig.Sequences.ProcessData.BatchNr, args.StateChangedMsg); } void OnTestProgress(object sender, UiBridge.TestProgressEventArgs args) @@ -436,9 +472,9 @@ namespace TBF.UI { mainProgressBar.Value = 0; - if (TBF.Rig.Sequences.ProcessData.BatchRslts != null) + if (Rig.Sequences.ProcessData.BatchRslts != null) { - var b = TBF.Rig.Sequences.ProcessData.BatchRslts.Batch; + var b = Rig.Sequences.ProcessData.BatchRslts.Batch; if (b != null && b.EndTime > b.StartTime) { progressGroupBox.Text = string.Format("{0} @ {1}", Strings.End, b.EndTime.ToShortTimeString()); @@ -479,17 +515,23 @@ namespace TBF.UI return; } - procedureComboBox.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0); - optoHeadsToolStripMenuItem.Enabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0); + bool isProcSelectionEnabled = (args.Flags & ButtonsEtc.ProcedureCmbBoxEn) != 0; - if (procedureComboBox.Enabled) progressGroupBox.Text = Strings.Progress; + procedureComboBox.Enabled = isProcSelectionEnabled; - if (procedureComboBox.Enabled && ProceduresUpdated) + profileComboBox.Enabled = dnComboBox.Enabled = q3ComboBox.Enabled = + mclassComboBox.Enabled = producerComboBox.Enabled = isProcSelectionEnabled; + + optoHeadsToolStripMenuItem.Enabled = isProcSelectionEnabled; + + if (isProcSelectionEnabled) progressGroupBox.Text = Strings.Progress; + + if (isProcSelectionEnabled && ProceduresUpdated) { ReloadProcedureComboBoxItems(); } - IsShutdownDisabled = ((args.Flags & ButtonsEtc.ProcedureCmbBoxEn) == 0); + IsShutdownDisabled = !isProcSelectionEnabled; } void OnSaveSettings(object sender, SaveSettingsEventArgs args) @@ -623,7 +665,7 @@ namespace TBF.UI { default: case RemoteDBUse.LocalDBOnly: - dBase = new ISessionFactory[] { TBF.DB.ConfigDBSessionFactory }; + dBase = new ISessionFactory[] { DB.ConfigDBSessionFactory }; signature = new string[] { "" }; break; case RemoteDBUse.RemoteDBOnly: @@ -631,11 +673,11 @@ namespace TBF.UI signature = new string[] { "R" }; break; case RemoteDBUse.BothDBsLocalFirst: - dBase = new ISessionFactory[] { TBF.DB.ConfigDBSessionFactory, TBF.DB.SharedDBSessionFactory }; + dBase = new ISessionFactory[] { DB.ConfigDBSessionFactory, TBF.DB.SharedDBSessionFactory }; signature = new string[] { "L", "R" }; break; case RemoteDBUse.BothDBsRemoteFirst: - dBase = new ISessionFactory[] { TBF.DB.SharedDBSessionFactory, TBF.DB.ConfigDBSessionFactory }; + dBase = new ISessionFactory[] { TBF.DB.SharedDBSessionFactory, DB.ConfigDBSessionFactory }; signature = new string[] { "R", "L" }; break; } @@ -658,16 +700,48 @@ namespace TBF.UI foreach (var proc in procedures) { - string itemText = string.Format("{0}{1}{2}{3}", signature[i], proc.ItemNr + 1, ProcSeparator, proc.Name); - procedureComboBox.Items.Add(itemText); - if (!ProcedureNrs.ContainsKey(proc.Name)) ProcedureNrs.Add(proc.Name, proc.ItemNr + 1); - - if ((procedureNameToSelect == proc.Name) && !procedureSet) + if (Rig.StateMachine.WaterMeterCmpnt != null) { - procedureComboBox.Text = itemText; - SelectedProcedure = new ProcedureInfo(procedureNameToSelect, (dBase[i] == TBF.DB.SharedDBSessionFactory)); - BenchControlPanel.ReloadTests(session); - procedureSet = true; + var waterMeterParams = Rig.StateMachine.WaterMeterCmpnt.Cfg.GetUIProcParamsProvider(proc); + Rig.WaterMeters.WaterMeter.ProcParams wmParams = waterMeterParams as TBF.Rig.WaterMeters.WaterMeter.ProcParams; + if (wmParams != null) + { + proc.DN = wmParams.DN; + proc.Qn = wmParams.Qn; + proc.MClass = wmParams.MetrologicalClass; + proc.Producer = wmParams.Producer; + + if (!string.IsNullOrEmpty(proc.AltProcName) && !profileComboBox.Items.Contains(proc.AltProcName)) + { + profileComboBox.Items.Add(proc.AltProcName); + } + if (!dnComboBox.Items.Contains(wmParams.DN.ToString())) dnComboBox.Items.Add(wmParams.DN.ToString()); + if (!q3ComboBox.Items.Contains(wmParams.Qn.ToString())) q3ComboBox.Items.Add(wmParams.Qn.ToString()); + if (!mclassComboBox.Items.Contains(wmParams.MetrologicalClass)) mclassComboBox.Items.Add(wmParams.MetrologicalClass); + if (!producerComboBox.Items.Contains(wmParams.Producer)) producerComboBox.Items.Add(wmParams.Producer); + } + } + + if ((selectedProfile == null || + (selectedProfile == Strings.no_profile && string.IsNullOrEmpty(proc.AltProcName)) || + (selectedProfile == Strings.any_profile && !string.IsNullOrEmpty(proc.AltProcName)) || + selectedProfile == proc.AltProcName) && + (selectedDN == 0 || selectedDN == proc.DN) && + (selectedQ3 == 0 || selectedQ3 == proc.Qn) && + (selectedMClass == null || selectedMClass == proc.MClass) && + (selectedProducer == null || selectedProducer == proc.Producer)) + { + string itemText = string.Format("{0}{1}{2}{3}", signature[i], proc.ItemNr + 1, ProcSeparator, proc.Name); + procedureComboBox.Items.Add(itemText); + if (!ProcedureNrs.ContainsKey(proc.Name)) ProcedureNrs.Add(proc.Name, proc.ItemNr + 1); + + if ((procedureNameToSelect == proc.Name) && !procedureSet) + { + procedureComboBox.Text = itemText; + SelectedProcedure = new ProcedureInfo(procedureNameToSelect, (dBase[i] == TBF.DB.SharedDBSessionFactory)); + BenchControlPanel.ReloadTests(session); + procedureSet = true; + } } } @@ -718,7 +792,7 @@ namespace TBF.UI BenchControlPanel.ReloadTests(); if (CurrentProcedure != null && CurrentProcedure.Description != null) { - descriptionLabel.Text = CurrentProcedure.Description; + //descriptionLabel.Text = CurrentProcedure.Description; } if (CurrentProcedure != null && testProgressControls != null) { @@ -1047,5 +1121,53 @@ namespace TBF.UI return false; } } + + private void profileComboBox_SelectedIndexChanged(object sender, EventArgs e) { UpdateSelectedProfile(); } + private void profileComboBox_TextChanged(object sender, EventArgs e) { UpdateSelectedProfile(); } + /// + void UpdateSelectedProfile() + { + //selectedProfile = ... TODO + selectedProfile = (profileComboBox.Text != Strings.any) ? profileComboBox.Text : null; + ReloadProcedureComboBoxItems(); + } + + private void dnComboBox_SelectedIndexChanged(object sender, EventArgs e) { UpdateSelectedDN(); } + private void dnComboBox_TextChanged(object sender, EventArgs e) { UpdateSelectedDN(); } + /// + void UpdateSelectedDN() + { + uint ival; + selectedDN = uint.TryParse(dnComboBox.Text, out ival) ? ival : 0; + ReloadProcedureComboBoxItems(); + } + + private void q3ComboBox_SelectedIndexChanged(object sender, EventArgs e) { UpdateSelectedQn(); } + private void q3ComboBox_TextChanged(object sender, EventArgs e) { UpdateSelectedQn(); } + /// + void UpdateSelectedQn() + { + double fval; + selectedQ3 = Utils.TryParseUDouble(q3ComboBox.Text, out fval) ? fval : 0; + ReloadProcedureComboBoxItems(); + } + + private void mclassComboBox_SelectedIndexChanged(object sender, EventArgs e) { UpdateSelectedMClass(); } + private void mclassComboBox_TextChanged(object sender, EventArgs e) { UpdateSelectedMClass(); } + /// + void UpdateSelectedMClass() + { + selectedMClass = (mclassComboBox.Text != Strings.any) ? mclassComboBox.Text : null; + ReloadProcedureComboBoxItems(); + } + + private void producerComboBox_SelectedIndexChanged(object sender, EventArgs e) { UpdateSelectedProducer(); } + private void producerComboBox_TextChanged(object sender, EventArgs e) { UpdateSelectedProducer(); } + /// + void UpdateSelectedProducer() + { + selectedProducer = (producerComboBox.Text != Strings.any) ? producerComboBox.Text : null; + ReloadProcedureComboBoxItems(); + } } } diff --git a/TBF/UI/MainWnd.resx b/TBF/UI/MainWnd.resx index 40f1d0f72..a3c8623e9 100644 --- a/TBF/UI/MainWnd.resx +++ b/TBF/UI/MainWnd.resx @@ -429,6 +429,246 @@ 0 + + True + + + 4, 19 + + + 36, 13 + + + 19 + + + Profile + + + profileLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 0 + + + 60, 16 + + + 133, 21 + + + 18 + + + profileComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 1 + + + True + + + 573, 19 + + + 50, 13 + + + 17 + + + Producer + + + producerLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 2 + + + True + + + 449, 19 + + + 32, 13 + + + 16 + + + Class + + + mclassLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 3 + + + True + + + 317, 19 + + + 40, 13 + + + 15 + + + Q3/Qn + + + q3Label + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 4 + + + True + + + 204, 19 + + + 23, 13 + + + 14 + + + DN + + + dnLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 5 + + + 629, 16 + + + 133, 21 + + + 13 + + + producerComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 6 + + + 487, 16 + + + 72, 21 + + + 12 + + + mclassComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 7 + + + 363, 16 + + + 72, 21 + + + 11 + + + q3ComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 8 + + + 233, 16 + + + 72, 21 + + + 10 + + + dnComboBox + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + descriptionGroupBox + + + 9 + True @@ -454,7 +694,7 @@ descriptionGroupBox - 0 + 10 Fill @@ -598,7 +838,7 @@ ctrlBrdComponent - ControlComponent3Munich.UserControl1, ControlComponent3Munich, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + ControlComponent_Torino2015.UserControl1, ControlComponent3U, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null homeTabPage @@ -652,7 +892,7 @@ processTabPageCtrl - TBF.UI.Process.ProcessTabPageCtrl6, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null + TBF.UI.Process.ProcessTabPageCtrl24, TBF, Version=2.33.2064.0, Culture=neutral, PublicKeyToken=null processTabPage @@ -730,7 +970,7 @@ resultsTabPageCtrl - TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null + TBF.UI.ResultsMI.ResultsTabPageCtrl, TBF, Version=2.33.2064.0, Culture=neutral, PublicKeyToken=null resultsTabPage @@ -781,7 +1021,7 @@ graphsTabPageCtrl - TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null + TBF.UI.Graphs.GraphsTabPageCtrl, TBF, Version=2.33.2064.0, Culture=neutral, PublicKeyToken=null graphsTabPage @@ -835,7 +1075,7 @@ eventLogsTabPageCtrl - TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null + TBF.UI.EventLogs.EventLogsTabPageCtrl, TBF, Version=2.33.2064.0, Culture=neutral, PublicKeyToken=null eventLogsTabPage @@ -886,7 +1126,7 @@ calendarTabPageCtrl - TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null + TBF.UI.Calendar.CalendarTabPageCtrl, TBF, Version=2.33.2064.0, Culture=neutral, PublicKeyToken=null calendarTabPage @@ -937,7 +1177,7 @@ picturesTabPageCtrl - TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=2.25.1440.0, Culture=neutral, PublicKeyToken=null + TBF.UI.Camera.PicturesTabPageCtrl, TBF, Version=2.33.2064.0, Culture=neutral, PublicKeyToken=null picturesTabPage @@ -1332,10 +1572,10 @@ Upgrade - + 152, 22 - + iPerl Heads @@ -1584,10 +1824,10 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - iPerlHeadsToolStripMenuItem + + optoHeadsToolStripMenuItem - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1644,13 +1884,4 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Logs - - - Logs - - - Settings - \ No newline at end of file