diff --git a/TBF/UI/Bench/TestProfiles/TestProfileDlg.cs b/TBF/UI/Bench/TestProfiles/TestProfileDlg.cs index 621a98f60..acdaf2089 100644 --- a/TBF/UI/Bench/TestProfiles/TestProfileDlg.cs +++ b/TBF/UI/Bench/TestProfiles/TestProfileDlg.cs @@ -32,7 +32,7 @@ namespace TBF.UI.Bench.TestProfiles IList usedNames; /// Already used names - /// Auxiliary public lists used also by user controls in tab pages + /// Auxiliary public lists used also by user controls in tab pages public IList TbfComponents; public IList TestMethods; @@ -43,7 +43,7 @@ namespace TBF.UI.Bench.TestProfiles InitializeComponent(); /// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi. - Dpi = (int)this.CreateGraphics().DpiX; + Dpi = (int)this.CreateGraphics().DpiX; openUnlocked = false; } @@ -88,11 +88,6 @@ namespace TBF.UI.Bench.TestProfiles metrologyListViewEx.SubItemRightClicked += new SubItemEventHandler(metrologyListViewEx_SubItemRightClicked); metrologyListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(metrologyListViewEx_SubItemEndEditing); - /// ListViewEx-es configuration - compoundListViewEx.SubItemClicked += new SubItemEventHandler(compoundListViewEx_SubItemClicked); - compoundListViewEx.SubItemRightClicked += new SubItemEventHandler(compoundListViewEx_SubItemRightClicked); - compoundListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(compoundListViewEx_SubItemEndEditing); - errorFlagsListViewEx.SubItemClicked += new SubItemEventHandler(errorFlagsListViewEx_SubItemClicked); errorFlagsListViewEx.SubItemRightClicked += new SubItemEventHandler(errorFlagsListViewEx_SubItemRightClicked); errorFlagsListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(errorFlagsListViewEx_SubItemEndEditing); @@ -108,7 +103,7 @@ namespace TBF.UI.Bench.TestProfiles { Localize(); - if (LoadedProfile == null) return; /// return in case the dialog is open in the designer + if (LoadedProfile == null) return; /// return in case the dialog is open in the designer LoadUISettings(); @@ -135,17 +130,15 @@ namespace TBF.UI.Bench.TestProfiles /// Now refresh the content of the general tab RefreshGeneralTab(); - CompoundRBCheckedChanged(); /// LisViewEx columns and edit controls for 'Metrology', 'Compound', 'Error flags' and 'Error flags 2' tabs PrepareMetrologyTab(); - PrepareCompoundTab(); PrepareErrorFlags(); PrepareErrorFlags2(); /// Now refresh the content of the dialog + RefreshGeneralTab(); RefreshMetrologyTab(); - RefreshCompoundTab(); RefreshErrorFlagsTab(); RefreshErrorFlags2Tab(); @@ -288,19 +281,19 @@ namespace TBF.UI.Bench.TestProfiles metrologyEditors = new Control[] { new TextBox(), /// Name - new TextBox(), /// Part - new TextBox(), /// CoefQfrom - new TextBox(), /// CoefQto - new TextBox(), /// Err.Lim. - - new TextBox(), /// Err.Lim. + - new TextBox(), /// Temp.Lim. - - new TextBox(), /// Temp.Lim. + - new TextBox(), /// Press.Lim. - - new TextBox(), /// Press.Lim. + - publishCBox, /// Publish - yesNoCBox, /// Evaluate + new TextBox(), /// Part + new TextBox(), /// CoefQfrom + new TextBox(), /// CoefQto + new TextBox(), /// Err.Lim. - + new TextBox(), /// Err.Lim. + + new TextBox(), /// Temp.Lim. - + new TextBox(), /// Temp.Lim. + + new TextBox(), /// Press.Lim. - + new TextBox(), /// Press.Lim. + + publishCBox, /// Publish + yesNoCBox, /// Evaluate methodCBox, /// Test method - }; + }; foreach (var ctrl in metrologyEditors) { @@ -457,19 +450,19 @@ namespace TBF.UI.Bench.TestProfiles { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; - return; /// NOK + return; /// NOK } } int idummy; if (e.SubItem == (int)MtrlgyClmn.Part) { - if (e.DisplayText.Equals("-")) return; /// OK + if (e.DisplayText.Equals("-")) return; /// OK if (!int.TryParse(e.DisplayText, out idummy) || !Data.IsGoodPartNr(idummy)) { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; - return; /// NOK + return; /// NOK } } @@ -503,276 +496,6 @@ namespace TBF.UI.Bench.TestProfiles #endregion - #region Compound - - Control[] compoundEditors; - - public enum CmpndClmn - { - Name, - Part, - CoefQfrom, - CoefQto, - ErrLimLo, - ErrLimHi, - TempLimLo, - TempLimHi, - PressLimLo, - PressLimHi, - Publish, - Evaluate, - Method, - ColumnsCount - } - - void PrepareCompoundTab() - { - ListViewEx lv = compoundListViewEx; - lv.Columns.Add(new ColumnHeader { Text = Strings.Test_chdr, Width = 70 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Part, Width = 40 }); - lv.Columns.Add(new ColumnHeader { Text = string.Format("Coef. {0}", Strings.Q_from), Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = string.Format("Coef. {0}", Strings.Q_to), Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Err_limit_neg_pct_chdr, Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Err_limit_pos_pct_chdr, Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = string.Format("{0} [°C]", Strings.Temp_lim_lo_chdr), Width = 100 }); - lv.Columns.Add(new ColumnHeader { Text = string.Format("{0} [°C]", Strings.Temp_lim_hi_chdr), Width = 100 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Press_lim_lo_chdr, Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Press_lim_hi_chdr, Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Publish, Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Evaluate, Width = 80 }); - lv.Columns.Add(new ColumnHeader { Text = Strings.Method_chdr, Width = 200 }); - - ComboBox publishCBox = new ComboBox(); /// control for Publish - for (Publish pb = 0; pb < Publish.Count; pb++) - { - publishCBox.Items.Add(pb.ToDescription()); - } - - ComboBox yesNoCBox = new ComboBox(); /// control for Evaluate - yesNoCBox.Items.Add(Strings.yes); - yesNoCBox.Items.Add(Strings.no); - - ComboBox methodCBox = new ComboBox(); - foreach (var m in TestMethods) methodCBox.Items.Add(m.Name); - - compoundEditors = new Control[] - { - new TextBox(), /// Name - new TextBox(), /// Part - new TextBox(), /// CoefQfrom - new TextBox(), /// CoefQto - new TextBox(), /// Err.Lim. - - new TextBox(), /// Err.Lim. + - new TextBox(), /// Temp.Lim. - - new TextBox(), /// Temp.Lim. + - new TextBox(), /// Press.Lim. - - new TextBox(), /// Press.Lim. + - publishCBox, /// Publish - yesNoCBox, /// Evaluate - methodCBox, /// Test method - }; - - foreach (var ctrl in compoundEditors) - { - compoundTabPage.Controls.Add(ctrl); - } - } - - void RefreshCompoundTab() - { - compoundListViewEx.Items.Clear(); - foreach (var test in LoadedProfile.Tests) AddToCompoundTab(test); - - if (0 <= SelectedTestIx && SelectedTestIx < compoundListViewEx.Items.Count) - { - compoundListViewEx.Items[SelectedTestIx].Selected = true; - } - } - - void AddToCompoundTab(PTest pTest) - { - /// - /// Compound 1 item with subitems - /// - ListViewItem lvi = new ListViewItem(pTest.Name); - lvi.Tag = pTest; - lvi.SubItems.Add((pTest.Part == 0) ? "-" : pTest.Part.ToString()); - lvi.SubItems.Add(pTest.CoefQfrom.ToString()); - lvi.SubItems.Add(pTest.CoefQto.ToString()); - if (LoadedProfile.ProfileType != ProfileType.QpQi) - { - lvi.SubItems.Add(pTest.ErrLimLo.ToString()); - lvi.SubItems.Add(pTest.ErrLimHi.ToString()); - } - else - { - lvi.SubItems.Add(Strings.calculated); - lvi.SubItems.Add(Strings.calculated); - } - lvi.SubItems.Add(pTest.TempLimLo.ToString()); - lvi.SubItems.Add(pTest.TempLimHi.ToString()); - lvi.SubItems.Add(pTest.PressLimLo.ToString()); - lvi.SubItems.Add(pTest.PressLimHi.ToString()); - lvi.SubItems.Add(((Publish)pTest.Publish).ToDescription()); - lvi.SubItems.Add(pTest.Evaluate ? Strings.yes : Strings.no); - lvi.SubItems.Add((pTest.Method != null) ? pTest.Method : string.Empty); - - compoundListViewEx.Items.Add(lvi); - } - - void UpdateFromCompoundTab() - { - for (int i = 0; i < compoundListViewEx.Items.Count; i++) - { - try - { - ListViewItem lvi = compoundListViewEx.Items[i]; - PTest entity = (PTest)lvi.Tag; - - entity.Name = lvi.Text; - entity.ItemNr = i; - - int part = entity.Part; - if (lvi.SubItems[(int)CmpndClmn.Part].Text.Equals("-")) - { - entity.Part = 0; - } - else if (int.TryParse(lvi.SubItems[(int)CmpndClmn.Part].Text, out part)) - { - entity.Part = part; - } - - entity.CoefQfrom = Utils.ParseUDouble(lvi.SubItems[(int)CmpndClmn.CoefQfrom].Text); - entity.CoefQto = Utils.ParseUDouble(lvi.SubItems[(int)CmpndClmn.CoefQto].Text); - if (LoadedProfile.ProfileType != ProfileType.QpQi) - { - entity.ErrLimLo = Utils.ParseSDouble(lvi.SubItems[(int)CmpndClmn.ErrLimLo].Text); - entity.ErrLimHi = Utils.ParseSDouble(lvi.SubItems[(int)CmpndClmn.ErrLimHi].Text); - } - else - { - entity.ErrLimLo = +1.0; - entity.ErrLimHi = -1.0; - } - entity.TempLimLo = Utils.ParseUDouble(lvi.SubItems[(int)CmpndClmn.TempLimLo].Text); - entity.TempLimHi = Utils.ParseUDouble(lvi.SubItems[(int)CmpndClmn.TempLimHi].Text); - entity.PressLimLo = Utils.ParseUDouble(lvi.SubItems[(int)CmpndClmn.PressLimLo].Text); - entity.PressLimHi = Utils.ParseUDouble(lvi.SubItems[(int)CmpndClmn.PressLimHi].Text); - - entity.Evaluate = lvi.SubItems[(int)CmpndClmn.Evaluate].Text.Equals(Strings.yes); - - for (Publish pb = 0; pb < Publish.Count; pb++) - { - if (lvi.SubItems[(int)CmpndClmn.Publish].Text.Equals(pb.ToDescription())) - { - entity.Publish = (sbyte)pb; - break; - } - } - - entity.Method = lvi.SubItems[(int)CmpndClmn.Method].Text; - } - catch (Exception exc) - { - MessageBox.Show(string.Format("Unexpected problem: {0}", exc.Message)); - } - } - } - - private void compoundListViewEx_SubItemClicked(object sender, SubItemEventArgs e) - { - if (LoadedProfile.ProfileType == ProfileType.QpQi && - ((e.SubItem == (int)CmpndClmn.ErrLimLo) || (e.SubItem == (int)CmpndClmn.ErrLimHi))) - { - return; /// Prevent editing calculated error limits - } - - if (unlocked && (e.SubItem < (int)CmpndClmn.ColumnsCount)) - { - compoundListViewEx.StartEditing(compoundEditors[e.SubItem], e.Item, e.SubItem); - } - } - - void compoundListViewEx_SubItemRightClicked(object sender, SubItemEventArgs e) - { - if (!unlocked || e.SubItem >= (int)CmpndClmn.ColumnsCount) return; - - if (DialogResult.Yes == MessageBox.Show(Strings.Do_you_want_to_copy_this_value_to_all_cells_below_this_cell, - Strings.Confirmation, MessageBoxButtons.YesNo, MessageBoxIcon.Question)) - { - int columnNr = e.SubItem; - string value = null; - System.Drawing.Color backColor = System.Drawing.Color.White; - foreach (ListViewItem item in compoundListViewEx.Items) - { - if (value != null && item.SubItems.Count > columnNr) - { - item.SubItems[columnNr].Text = value; - item.SubItems[columnNr].BackColor = backColor; - } - else if (item == e.Item) - { - value = item.SubItems[columnNr].Text; - backColor = item.SubItems[columnNr].BackColor; - } - } - } - } - - private void compoundListViewEx_SubItemEndEditing(object sender, SubItemEndEditingEventArgs e) - { - if (e.SubItem == (int)CmpndClmn.Name) - { - if (!Utils.IsGoodFName(e.DisplayText)) - { - e.DisplayText = e.Item.SubItems[e.SubItem].Text; - e.Cancel = true; - return; /// NOK - } - } - - int idummy; - if (e.SubItem == (int)CmpndClmn.Part) - { - if (e.DisplayText.Equals("-")) return; /// OK - if (!int.TryParse(e.DisplayText, out idummy) || !Data.IsGoodPartNr(idummy)) - { - e.DisplayText = e.Item.SubItems[e.SubItem].Text; - e.Cancel = true; - return; /// NOK - } - } - - double dummy; - if ((e.SubItem == (int)CmpndClmn.CoefQfrom && !Utils.TryParseUDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.CoefQto && !Utils.TryParseUDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.ErrLimLo && !Utils.TryParseSDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.ErrLimHi && !Utils.TryParseSDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.TempLimLo && !Utils.TryParseUDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.TempLimHi && !Utils.TryParseUDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.PressLimLo && !Utils.TryParseUDouble(e.DisplayText, out dummy)) || - (e.SubItem == (int)CmpndClmn.PressLimHi && !Utils.TryParseUDouble(e.DisplayText, out dummy))) - { - /// Cannot parse => revert content of the cell - e.DisplayText = e.Item.SubItems[e.SubItem].Text; - e.Cancel = true; - return; - } - - /// Combo boxes - if ((e.SubItem == (int)CmpndClmn.Publish) || (e.SubItem == (int)CmpndClmn.Evaluate) || (e.SubItem == (int)CmpndClmn.Method)) - { - if (!(compoundEditors[e.SubItem] as ComboBox).Items.Contains(e.DisplayText)) - { - e.DisplayText = e.Item.SubItems[e.SubItem].Text; - e.Cancel = true; - return; - } - } - } - - #endregion - #region Error flags public enum ErrorFlagsClmn @@ -937,7 +660,7 @@ namespace TBF.UI.Bench.TestProfiles { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; - return; /// NOK + return; /// NOK } } @@ -946,7 +669,7 @@ namespace TBF.UI.Bench.TestProfiles { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; - return; /// NOK + return; /// NOK } } @@ -1118,7 +841,7 @@ namespace TBF.UI.Bench.TestProfiles { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; - return; /// NOK + return; /// NOK } } @@ -1127,7 +850,7 @@ namespace TBF.UI.Bench.TestProfiles { e.DisplayText = e.Item.SubItems[e.SubItem].Text; e.Cancel = true; - return; /// NOK + return; /// NOK } } @@ -1137,7 +860,6 @@ namespace TBF.UI.Bench.TestProfiles void RefreshMetrologyAndErrorFlagsTabs() { RefreshMetrologyTab(); - RefreshCompoundTab(); RefreshErrorFlagsTab(); RefreshErrorFlags2Tab(); } @@ -1147,7 +869,7 @@ namespace TBF.UI.Bench.TestProfiles { unlocked = true; //if (testParamsCtrls != null) foreach (var ctrl in testParamsCtrls) ctrl.Unlock(); - //if (procedureParamsCtrls != null) foreach (var ctrl in procedureParamsCtrls) ctrl.Unlock(); + //if (procedureParamsCtrls != null) foreach (var ctrl in procedureParamsCtrls) ctrl.Unlock(); procNameTextBox.Enabled = true; descriptionTextBox.Enabled = true; @@ -1169,10 +891,9 @@ namespace TBF.UI.Bench.TestProfiles ListViewEx listViewEx = null; switch (selectedTab) { - case TestProfileTabs.Metrology: listViewEx = metrologyListViewEx; break; - case TestProfileTabs.Compound: listViewEx = compoundListViewEx; break; - case TestProfileTabs.ErrorFlags: listViewEx = errorFlagsListViewEx; break; - case TestProfileTabs.ErrorFlags2: listViewEx = errorFlags2ListViewEx; break; + case TestProfileTabs.Metrology: listViewEx = metrologyListViewEx; break; + case TestProfileTabs.ErrorFlags: listViewEx = errorFlagsListViewEx; break; + case TestProfileTabs.ErrorFlags2: listViewEx = errorFlags2ListViewEx; break; } if ((listViewEx != null) && (listViewEx.SelectedItems.Count == 1)) @@ -1188,11 +909,10 @@ namespace TBF.UI.Bench.TestProfiles { switch (selectedTab) { - case TestProfileTabs.General: UpdateFromGeneralTab(); break; - case TestProfileTabs.Metrology: UpdateFromMetrologyTab(); break; - case TestProfileTabs.Compound: UpdateFromCompoundTab(); break; - case TestProfileTabs.ErrorFlags: UpdateFromErrorFlagsTab(); break; - case TestProfileTabs.ErrorFlags2: UpdateFromErrorFlags2Tab(); break; + case TestProfileTabs.General: UpdateFromGeneralTab(); break; + case TestProfileTabs.Metrology: UpdateFromMetrologyTab(); break; + case TestProfileTabs.ErrorFlags: UpdateFromErrorFlagsTab(); break; + case TestProfileTabs.ErrorFlags2: UpdateFromErrorFlags2Tab(); break; } //foreach (var ctrl in testParamsCtrls) if (!ctrl.UpdateAll()) MessageBox.Show(string.Format(Strings.Error_saving_parameters_of_0, ctrl.Name)); @@ -1252,10 +972,10 @@ namespace TBF.UI.Bench.TestProfiles { TBF.LocalSettings ls = Program.LocalSettings; WindowState = (ls.OneProcedureDlgMaximized ? FormWindowState.Maximized : FormWindowState.Normal); - Width = (ls.OneProcedureDlgWidth > 0) ? ls.OneProcedureDlgWidth : 800; + Width = (ls.OneProcedureDlgWidth > 0) ? ls.OneProcedureDlgWidth : 800; Height = (ls.OneProcedureDlgHeight > 0) ? ls.OneProcedureDlgHeight : 420; - Left = (ls.OneProcedureDlgLeft != 0) ? ls.OneProcedureDlgLeft : 150; - Top = (ls.OneProcedureDlgTop != 0) ? ls.OneProcedureDlgTop : 150; + Left = (ls.OneProcedureDlgLeft != 0) ? ls.OneProcedureDlgLeft : 150; + Top = (ls.OneProcedureDlgTop != 0) ? ls.OneProcedureDlgTop : 150; } #region Tab switching @@ -1264,7 +984,6 @@ namespace TBF.UI.Bench.TestProfiles { General, Metrology, - Compound, ErrorFlags, ErrorFlags2, } @@ -1281,9 +1000,6 @@ namespace TBF.UI.Bench.TestProfiles case TestProfileTabs.Metrology: UpdateFromMetrologyTab(); break; - case TestProfileTabs.Compound: - UpdateFromCompoundTab(); - break; case TestProfileTabs.ErrorFlags: UpdateFromErrorFlagsTab(); break; @@ -1294,7 +1010,6 @@ namespace TBF.UI.Bench.TestProfiles selectedTab = (TestProfileTabs)tabControl.SelectedIndex; bool isMetrologyOrErrorFlags = selectedTab == TestProfileTabs.Metrology || - selectedTab == TestProfileTabs.Compound || selectedTab == TestProfileTabs.ErrorFlags || selectedTab == TestProfileTabs.ErrorFlags2; @@ -1324,11 +1039,6 @@ namespace TBF.UI.Bench.TestProfiles lv = metrologyListViewEx; /// ListVIewEx for test selection break; - case TestProfileTabs.Compound: - RefreshCompoundTab(); - lv = compoundListViewEx; /// ListVIewEx for compound test selection - break; - case TestProfileTabs.ErrorFlags: RefreshErrorFlagsTab(); lv = errorFlagsListViewEx; /// ListVIewEx for error flags @@ -1365,7 +1075,6 @@ namespace TBF.UI.Bench.TestProfiles switch (selectedTab) { case TestProfileTabs.Metrology: listViewEx = metrologyListViewEx; break; - case TestProfileTabs.Compound: listViewEx = compoundListViewEx; break; case TestProfileTabs.ErrorFlags: listViewEx = errorFlagsListViewEx; break; case TestProfileTabs.ErrorFlags2: listViewEx = errorFlags2ListViewEx; break; default: return; @@ -1525,7 +1234,6 @@ namespace TBF.UI.Bench.TestProfiles LoadedProfile.Tests.Add(ptest); AddToMetrologyTab(ptest); - AddToCompoundTab(ptest); AddToErrorFlagsTab(ptest); AddToErrorFlags2Tab(ptest); @@ -1549,11 +1257,6 @@ namespace TBF.UI.Bench.TestProfiles listViewEx = metrologyListViewEx; break; - case TestProfileTabs.Compound: - UpdateFromCompoundTab(); - listViewEx = compoundListViewEx; - break; - case TestProfileTabs.ErrorFlags: UpdateFromErrorFlagsTab(); listViewEx = errorFlagsListViewEx; @@ -1602,11 +1305,6 @@ namespace TBF.UI.Bench.TestProfiles listViewEx = metrologyListViewEx; break; - case TestProfileTabs.Compound: - UpdateFromCompoundTab(); - listViewEx = compoundListViewEx; - break; - case TestProfileTabs.ErrorFlags: UpdateFromErrorFlagsTab(); listViewEx = errorFlagsListViewEx; @@ -1654,11 +1352,6 @@ namespace TBF.UI.Bench.TestProfiles listViewEx = metrologyListViewEx; break; - case TestProfileTabs.Compound: - UpdateFromCompoundTab(); - listViewEx = compoundListViewEx; - break; - case TestProfileTabs.ErrorFlags: UpdateFromErrorFlagsTab(); listViewEx = errorFlagsListViewEx; @@ -1698,7 +1391,6 @@ namespace TBF.UI.Bench.TestProfiles #endregion private void metrologyListViewEx_SelectedIndexChanged(object sender, EventArgs e) { SelectedIndexChanged(sender, e); } - private void compoundListViewEx_SelectedIndexChanged(object sender, EventArgs e) { SelectedIndexChanged(sender, e); } private void errorFlagsListViewEx_SelectedIndexChanged(object sender, EventArgs e) { SelectedIndexChanged(sender, e); } private void errorFlags2ListViewEx_SelectedIndexChanged(object sender, EventArgs e) { SelectedIndexChanged(sender, e); } @@ -1795,29 +1487,5 @@ namespace TBF.UI.Bench.TestProfiles } return 0; } - - private void profileTypeRadioButton5_CheckedChanged(object sender, EventArgs e) - { - CompoundRBCheckedChanged(); - } - - private void profileTypeRadioButton6_CheckedChanged(object sender, EventArgs e) - { - CompoundRBCheckedChanged(); - } - - private void profileTypeRadioButton7_CheckedChanged(object sender, EventArgs e) - { - CompoundRBCheckedChanged(); - } - - private void CompoundRBCheckedChanged() - { - bool isCompound = false; /// = profileTypeRadioButton5.Checked || profileTypeRadioButton6.Checked || profileTypeRadioButton7.Checked; - metrologyTabPage.Enabled = !isCompound; - metrologyListViewEx.Enabled = !isCompound; - compoundTabPage.Enabled = isCompound; - compoundListViewEx.Enabled = isCompound; - } } } diff --git a/TBF/UI/Bench/TestProfiles/TestProfileDlg.designer.cs b/TBF/UI/Bench/TestProfiles/TestProfileDlg.designer.cs index 151637e86..ec7967fd9 100644 --- a/TBF/UI/Bench/TestProfiles/TestProfileDlg.designer.cs +++ b/TBF/UI/Bench/TestProfiles/TestProfileDlg.designer.cs @@ -61,8 +61,6 @@ namespace TBF.UI.Bench.TestProfiles this.label1 = new System.Windows.Forms.Label(); this.metrologyTabPage = new System.Windows.Forms.TabPage(); this.metrologyListViewEx = new Common.Forms.ListViewEx(); - this.compoundTabPage = new System.Windows.Forms.TabPage(); - this.compoundListViewEx = new Common.Forms.ListViewEx(); this.errorFlagsTabPage = new System.Windows.Forms.TabPage(); this.errorFlagsListViewEx = new Common.Forms.ListViewEx(); this.errorFlags2TabPage = new System.Windows.Forms.TabPage(); @@ -77,7 +75,6 @@ namespace TBF.UI.Bench.TestProfiles this.groupBox2.SuspendLayout(); this.groupBox1.SuspendLayout(); this.metrologyTabPage.SuspendLayout(); - this.compoundTabPage.SuspendLayout(); this.errorFlagsTabPage.SuspendLayout(); this.errorFlags2TabPage.SuspendLayout(); this.SuspendLayout(); @@ -100,7 +97,6 @@ namespace TBF.UI.Bench.TestProfiles // this.tabControl.Controls.Add(this.generalTabPage); this.tabControl.Controls.Add(this.metrologyTabPage); - this.tabControl.Controls.Add(this.compoundTabPage); this.tabControl.Controls.Add(this.errorFlagsTabPage); this.tabControl.Controls.Add(this.errorFlags2TabPage); resources.ApplyResources(this.tabControl, "tabControl"); @@ -177,7 +173,6 @@ namespace TBF.UI.Bench.TestProfiles this.profileTypeRadioButton7.Name = "profileTypeRadioButton7"; this.profileTypeRadioButton7.TabStop = true; this.profileTypeRadioButton7.UseVisualStyleBackColor = true; - this.profileTypeRadioButton7.CheckedChanged += new System.EventHandler(this.profileTypeRadioButton7_CheckedChanged); // // profileTypeRadioButton6 // @@ -185,7 +180,6 @@ namespace TBF.UI.Bench.TestProfiles this.profileTypeRadioButton6.Name = "profileTypeRadioButton6"; this.profileTypeRadioButton6.TabStop = true; this.profileTypeRadioButton6.UseVisualStyleBackColor = true; - this.profileTypeRadioButton6.CheckedChanged += new System.EventHandler(this.profileTypeRadioButton6_CheckedChanged); // // profileTypeRadioButton5 // @@ -193,7 +187,6 @@ namespace TBF.UI.Bench.TestProfiles this.profileTypeRadioButton5.Name = "profileTypeRadioButton5"; this.profileTypeRadioButton5.TabStop = true; this.profileTypeRadioButton5.UseVisualStyleBackColor = true; - this.profileTypeRadioButton5.CheckedChanged += new System.EventHandler(this.profileTypeRadioButton5_CheckedChanged); // // profileTypeRadioButton4 // @@ -303,26 +296,6 @@ namespace TBF.UI.Bench.TestProfiles this.metrologyListViewEx.View = System.Windows.Forms.View.Details; this.metrologyListViewEx.SelectedIndexChanged += new System.EventHandler(this.metrologyListViewEx_SelectedIndexChanged); // - // compoundTabPage - // - this.compoundTabPage.Controls.Add(this.compoundListViewEx); - resources.ApplyResources(this.compoundTabPage, "compoundTabPage"); - this.compoundTabPage.Name = "compoundTabPage"; - this.compoundTabPage.UseVisualStyleBackColor = true; - // - // compoundListViewEx - // - this.compoundListViewEx.AllowColumnReorder = true; - resources.ApplyResources(this.compoundListViewEx, "compoundListViewEx"); - this.compoundListViewEx.DoubleClickActivation = false; - this.compoundListViewEx.FullRowSelect = true; - this.compoundListViewEx.GridLines = true; - this.compoundListViewEx.HideSelection = false; - this.compoundListViewEx.Name = "compoundListViewEx"; - this.compoundListViewEx.UseCompatibleStateImageBehavior = false; - this.compoundListViewEx.View = System.Windows.Forms.View.Details; - this.compoundListViewEx.SelectedIndexChanged += new System.EventHandler(this.compoundListViewEx_SelectedIndexChanged); - // // errorFlagsTabPage // this.errorFlagsTabPage.Controls.Add(this.errorFlagsListViewEx); @@ -387,7 +360,6 @@ namespace TBF.UI.Bench.TestProfiles this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.metrologyTabPage.ResumeLayout(false); - this.compoundTabPage.ResumeLayout(false); this.errorFlagsTabPage.ResumeLayout(false); this.errorFlags2TabPage.ResumeLayout(false); this.ResumeLayout(false); @@ -430,7 +402,5 @@ namespace TBF.UI.Bench.TestProfiles private System.Windows.Forms.RadioButton errorCalculationRadioButton2; private System.Windows.Forms.TabPage errorFlags2TabPage; private Common.Forms.ListViewEx errorFlags2ListViewEx; - private System.Windows.Forms.TabPage compoundTabPage; - private Common.Forms.ListViewEx compoundListViewEx; } } \ No newline at end of file diff --git a/TBF/UI/Bench/TestProfiles/TestProfileDlg.resx b/TBF/UI/Bench/TestProfiles/TestProfileDlg.resx index 7da643249..ec12030e9 100644 --- a/TBF/UI/Bench/TestProfiles/TestProfileDlg.resx +++ b/TBF/UI/Bench/TestProfiles/TestProfileDlg.resx @@ -204,9 +204,6 @@ 40 - - Error bounds calculation - False @@ -471,9 +468,6 @@ 39 - - Flow calculation and designation - groupBox1 @@ -517,14 +511,11 @@ 340, 85 - 30, 13 + 0, 13 10 - - Date - label15 @@ -568,14 +559,11 @@ 20, 85 - 86, 13 + 0, 13 8 - - Last changed by - label16 @@ -619,14 +607,11 @@ 340, 62 - 30, 13 + 0, 13 6 - - Date - label14 @@ -670,14 +655,11 @@ 20, 62 - 58, 13 + 0, 13 4 - - Created by - label13 @@ -721,14 +703,11 @@ 20, 39 - 86, 13 + 0, 13 2 - - Short description - label12 @@ -772,14 +751,11 @@ 20, 16 - 85, 13 + 0, 13 0 - - Procedure name - label1 @@ -867,54 +843,6 @@ 1 - - Fill - - - 0, 0 - - - 923, 366 - - - 1 - - - compoundListViewEx - - - Common.Forms.ListViewEx, Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - compoundTabPage - - - 0 - - - 4, 34 - - - 923, 366 - - - 7 - - - Compound - - - compoundTabPage - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl - - - 2 - Fill @@ -961,7 +889,7 @@ tabControl - 3 + 2 Fill @@ -1009,7 +937,7 @@ tabControl - 4 + 3 Fill @@ -1063,7 +991,7 @@ sharedButtons - TBF.UI.Shared.SharedButtons, TBF, Version=3.6.2071.0, Culture=neutral, PublicKeyToken=null + TBF.UI.Shared.SharedButtons, TBF, Version=3.8.2099.0, Culture=neutral, PublicKeyToken=null mainSplitContainer.Panel2