TestProfiles : UI changes

This commit is contained in:
Milan Hanajik 2019-10-31 14:02:20 +01:00
parent ecaca8cc6b
commit b3fdb11b81
9 changed files with 850 additions and 2789 deletions

View File

@ -182,6 +182,11 @@ namespace TBF
public int OneProcedureDlgWidth;
public int OneProcedureDlgHeight;
[XmlArrayAttribute("ProfilesColumnWidths")]
public int[] ProfilesColumnWidths;
[XmlIgnore]
public int ProfilesColumnCount { get { return (ProfilesColumnWidths != null) ? ProfilesColumnWidths.Length : 0; } }
public int PrintOrderLeft;
public int PrintOrderTop;

View File

@ -2814,6 +2814,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Profile.
/// </summary>
internal static string New_profile_name {
get {
return ResourceManager.GetString("New_profile_name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New Q.
/// </summary>
@ -3255,6 +3264,24 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Press. lim. hi [bar].
/// </summary>
internal static string Press_lim_hi_chdr {
get {
return ResourceManager.GetString("Press_lim_hi_chdr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Press. lim. lo [bar].
/// </summary>
internal static string Press_lim_lo_chdr {
get {
return ResourceManager.GetString("Press_lim_lo_chdr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Press OK to start the bench.
/// </summary>
@ -3507,6 +3534,33 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Profile.
/// </summary>
internal static string Profile {
get {
return ResourceManager.GetString("Profile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Profile {0} added..
/// </summary>
internal static string Profile_0_added {
get {
return ResourceManager.GetString("Profile_0_added", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Profile {0} modified..
/// </summary>
internal static string Profile_0_modified {
get {
return ResourceManager.GetString("Profile_0_modified", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Program must be closed..
/// </summary>
@ -5307,6 +5361,15 @@ namespace TBF.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Test profiles.
/// </summary>
internal static string Test_profiles {
get {
return ResourceManager.GetString("Test_profiles", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Test repetition count exceeded upper limit.
/// </summary>

View File

@ -1512,4 +1512,10 @@
<data name="Draining_before" xml:space="preserve">
<value>Vyprázdnění před</value>
</data>
<data name="Test_profiles" xml:space="preserve">
<value>Testovací profily</value>
</data>
<data name="Profile" xml:space="preserve">
<value>Profil</value>
</data>
</root>

View File

@ -2092,4 +2092,25 @@
<data name="Q_tg_m3h" xml:space="preserve">
<value>Q tg [m3/h]</value>
</data>
<data name="Test_profiles" xml:space="preserve">
<value>Test profiles</value>
</data>
<data name="Profile" xml:space="preserve">
<value>Profile</value>
</data>
<data name="Press_lim_hi_chdr" xml:space="preserve">
<value>Press. lim. hi [bar]</value>
</data>
<data name="Press_lim_lo_chdr" xml:space="preserve">
<value>Press. lim. lo [bar]</value>
</data>
<data name="New_profile_name" xml:space="preserve">
<value>Profile</value>
</data>
<data name="Profile_0_added" xml:space="preserve">
<value>Profile {0} added.</value>
</data>
<data name="Profile_0_modified" xml:space="preserve">
<value>Profile {0} modified.</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -35,34 +35,9 @@ namespace TBF.UI.Bench.TestProfiles
this.mainSplitContainer = new System.Windows.Forms.SplitContainer();
this.tabControl = new System.Windows.Forms.TabControl();
this.generalTabPage = new System.Windows.Forms.TabPage();
this.altProcPeriodTextBox = new System.Windows.Forms.TextBox();
this.altProcPeriodLabel = new System.Windows.Forms.Label();
this.altProcNameTextBox = new System.Windows.Forms.TextBox();
this.altProcNameLabel = new System.Windows.Forms.Label();
this.manualControlDisabledCheckBox = new System.Windows.Forms.CheckBox();
this.mustBeCompleteCheckBox = new System.Windows.Forms.CheckBox();
this.protectedCheckBox = new System.Windows.Forms.CheckBox();
this.metersKindRadioButton3 = new System.Windows.Forms.RadioButton();
this.fileWriter4ComboBox = new System.Windows.Forms.ComboBox();
this.fileWriter3ComboBox = new System.Windows.Forms.ComboBox();
this.printer2ComboBox = new System.Windows.Forms.ComboBox();
this.fileWriter2ComboBox = new System.Windows.Forms.ComboBox();
this.metersKindRadioButton2 = new System.Windows.Forms.RadioButton();
this.metersKindRadioButton1 = new System.Windows.Forms.RadioButton();
this.transitionEndComboBox = new System.Windows.Forms.ComboBox();
this.transitionEndLabel = new System.Windows.Forms.Label();
this.transitionStartComboBox = new System.Windows.Forms.ComboBox();
this.transitionStartLabel = new System.Windows.Forms.Label();
this.fileWriter1ComboBox = new System.Windows.Forms.ComboBox();
this.printer1ComboBox = new System.Windows.Forms.ComboBox();
this.dataEntryComboBox = new System.Windows.Forms.ComboBox();
this.resultsWriterLabel = new System.Windows.Forms.Label();
this.resultsPrinterLabel = new System.Windows.Forms.Label();
this.dataEntryLabel = new System.Windows.Forms.Label();
this.notesTextBox = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.watermetersTextBox = new System.Windows.Forms.TextBox();
this.watermetersLabel = new System.Windows.Forms.Label();
this.profileTypeRadioButton3 = new System.Windows.Forms.RadioButton();
this.profileTypeRadioButton2 = new System.Windows.Forms.RadioButton();
this.profileTypeRadioButton1 = new System.Windows.Forms.RadioButton();
this.lastChangedOnTextBox = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.lastChangedByTextBox = new System.Windows.Forms.TextBox();
@ -75,28 +50,27 @@ namespace TBF.UI.Bench.TestProfiles
this.label12 = new System.Windows.Forms.Label();
this.procNameTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.historyTabPage = new System.Windows.Forms.TabPage();
this.historyListViewEx = new global::Results.Forms.ListViewEx();
this.metrology1TabPage = new System.Windows.Forms.TabPage();
this.metrology1ListViewEx = new global::Results.Forms.ListViewEx();
this.metrology2TabPage = new System.Windows.Forms.TabPage();
this.metrology2ListViewEx = new global::Results.Forms.ListViewEx();
this.processTabPage = new System.Windows.Forms.TabPage();
this.processListViewEx = new global::Results.Forms.ListViewEx();
this.metrologyListViewEx = new global::Results.Forms.ListViewEx();
this.parametersTabPage = new System.Windows.Forms.TabPage();
this.parametersListViewEx = new global::Results.Forms.ListViewEx();
this.errorFlagsListViewEx = new global::Results.Forms.ListViewEx();
this.sharedButtons = new TBF.UI.Shared.SharedButtons();
this.profileTypeRadioButton4 = new System.Windows.Forms.RadioButton();
this.profileTypeRadioButton5 = new System.Windows.Forms.RadioButton();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.errorCalculationRadioButton1 = new System.Windows.Forms.RadioButton();
this.errorCalculationRadioButton2 = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.mainSplitContainer)).BeginInit();
this.mainSplitContainer.Panel1.SuspendLayout();
this.mainSplitContainer.Panel2.SuspendLayout();
this.mainSplitContainer.SuspendLayout();
this.tabControl.SuspendLayout();
this.generalTabPage.SuspendLayout();
this.historyTabPage.SuspendLayout();
this.metrology1TabPage.SuspendLayout();
this.metrology2TabPage.SuspendLayout();
this.processTabPage.SuspendLayout();
this.parametersTabPage.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// mainSplitContainer
@ -116,10 +90,7 @@ namespace TBF.UI.Bench.TestProfiles
// tabControl
//
this.tabControl.Controls.Add(this.generalTabPage);
this.tabControl.Controls.Add(this.historyTabPage);
this.tabControl.Controls.Add(this.metrology1TabPage);
this.tabControl.Controls.Add(this.metrology2TabPage);
this.tabControl.Controls.Add(this.processTabPage);
this.tabControl.Controls.Add(this.parametersTabPage);
resources.ApplyResources(this.tabControl, "tabControl");
this.tabControl.Name = "tabControl";
@ -128,34 +99,8 @@ namespace TBF.UI.Bench.TestProfiles
//
// generalTabPage
//
this.generalTabPage.Controls.Add(this.altProcPeriodTextBox);
this.generalTabPage.Controls.Add(this.altProcPeriodLabel);
this.generalTabPage.Controls.Add(this.altProcNameTextBox);
this.generalTabPage.Controls.Add(this.altProcNameLabel);
this.generalTabPage.Controls.Add(this.manualControlDisabledCheckBox);
this.generalTabPage.Controls.Add(this.mustBeCompleteCheckBox);
this.generalTabPage.Controls.Add(this.protectedCheckBox);
this.generalTabPage.Controls.Add(this.metersKindRadioButton3);
this.generalTabPage.Controls.Add(this.fileWriter4ComboBox);
this.generalTabPage.Controls.Add(this.fileWriter3ComboBox);
this.generalTabPage.Controls.Add(this.printer2ComboBox);
this.generalTabPage.Controls.Add(this.fileWriter2ComboBox);
this.generalTabPage.Controls.Add(this.metersKindRadioButton2);
this.generalTabPage.Controls.Add(this.metersKindRadioButton1);
this.generalTabPage.Controls.Add(this.transitionEndComboBox);
this.generalTabPage.Controls.Add(this.transitionEndLabel);
this.generalTabPage.Controls.Add(this.transitionStartComboBox);
this.generalTabPage.Controls.Add(this.transitionStartLabel);
this.generalTabPage.Controls.Add(this.fileWriter1ComboBox);
this.generalTabPage.Controls.Add(this.printer1ComboBox);
this.generalTabPage.Controls.Add(this.dataEntryComboBox);
this.generalTabPage.Controls.Add(this.resultsWriterLabel);
this.generalTabPage.Controls.Add(this.resultsPrinterLabel);
this.generalTabPage.Controls.Add(this.dataEntryLabel);
this.generalTabPage.Controls.Add(this.notesTextBox);
this.generalTabPage.Controls.Add(this.label18);
this.generalTabPage.Controls.Add(this.watermetersTextBox);
this.generalTabPage.Controls.Add(this.watermetersLabel);
this.generalTabPage.Controls.Add(this.groupBox2);
this.generalTabPage.Controls.Add(this.groupBox1);
this.generalTabPage.Controls.Add(this.lastChangedOnTextBox);
this.generalTabPage.Controls.Add(this.label15);
this.generalTabPage.Controls.Add(this.lastChangedByTextBox);
@ -172,163 +117,26 @@ namespace TBF.UI.Bench.TestProfiles
this.generalTabPage.Name = "generalTabPage";
this.generalTabPage.UseVisualStyleBackColor = true;
//
// altProcPeriodTextBox
// profileTypeRadioButton3
//
resources.ApplyResources(this.altProcPeriodTextBox, "altProcPeriodTextBox");
this.altProcPeriodTextBox.Name = "altProcPeriodTextBox";
resources.ApplyResources(this.profileTypeRadioButton3, "profileTypeRadioButton3");
this.profileTypeRadioButton3.Name = "profileTypeRadioButton3";
this.profileTypeRadioButton3.TabStop = true;
this.profileTypeRadioButton3.UseVisualStyleBackColor = true;
//
// altProcPeriodLabel
// profileTypeRadioButton2
//
resources.ApplyResources(this.altProcPeriodLabel, "altProcPeriodLabel");
this.altProcPeriodLabel.Name = "altProcPeriodLabel";
resources.ApplyResources(this.profileTypeRadioButton2, "profileTypeRadioButton2");
this.profileTypeRadioButton2.Name = "profileTypeRadioButton2";
this.profileTypeRadioButton2.TabStop = true;
this.profileTypeRadioButton2.UseVisualStyleBackColor = true;
//
// altProcNameTextBox
// profileTypeRadioButton1
//
resources.ApplyResources(this.altProcNameTextBox, "altProcNameTextBox");
this.altProcNameTextBox.Name = "altProcNameTextBox";
//
// altProcNameLabel
//
resources.ApplyResources(this.altProcNameLabel, "altProcNameLabel");
this.altProcNameLabel.Name = "altProcNameLabel";
//
// manualControlDisabledCheckBox
//
resources.ApplyResources(this.manualControlDisabledCheckBox, "manualControlDisabledCheckBox");
this.manualControlDisabledCheckBox.Name = "manualControlDisabledCheckBox";
this.manualControlDisabledCheckBox.UseVisualStyleBackColor = true;
//
// mustBeCompleteCheckBox
//
resources.ApplyResources(this.mustBeCompleteCheckBox, "mustBeCompleteCheckBox");
this.mustBeCompleteCheckBox.Name = "mustBeCompleteCheckBox";
this.mustBeCompleteCheckBox.UseVisualStyleBackColor = true;
//
// protectedCheckBox
//
resources.ApplyResources(this.protectedCheckBox, "protectedCheckBox");
this.protectedCheckBox.Name = "protectedCheckBox";
this.protectedCheckBox.UseVisualStyleBackColor = true;
//
// metersKindRadioButton3
//
resources.ApplyResources(this.metersKindRadioButton3, "metersKindRadioButton3");
this.metersKindRadioButton3.Name = "metersKindRadioButton3";
this.metersKindRadioButton3.TabStop = true;
this.metersKindRadioButton3.UseVisualStyleBackColor = true;
//
// fileWriter4ComboBox
//
this.fileWriter4ComboBox.FormattingEnabled = true;
resources.ApplyResources(this.fileWriter4ComboBox, "fileWriter4ComboBox");
this.fileWriter4ComboBox.Name = "fileWriter4ComboBox";
//
// fileWriter3ComboBox
//
this.fileWriter3ComboBox.FormattingEnabled = true;
resources.ApplyResources(this.fileWriter3ComboBox, "fileWriter3ComboBox");
this.fileWriter3ComboBox.Name = "fileWriter3ComboBox";
//
// printer2ComboBox
//
this.printer2ComboBox.FormattingEnabled = true;
resources.ApplyResources(this.printer2ComboBox, "printer2ComboBox");
this.printer2ComboBox.Name = "printer2ComboBox";
//
// fileWriter2ComboBox
//
this.fileWriter2ComboBox.FormattingEnabled = true;
resources.ApplyResources(this.fileWriter2ComboBox, "fileWriter2ComboBox");
this.fileWriter2ComboBox.Name = "fileWriter2ComboBox";
//
// metersKindRadioButton2
//
resources.ApplyResources(this.metersKindRadioButton2, "metersKindRadioButton2");
this.metersKindRadioButton2.Name = "metersKindRadioButton2";
this.metersKindRadioButton2.TabStop = true;
this.metersKindRadioButton2.UseVisualStyleBackColor = true;
//
// metersKindRadioButton1
//
resources.ApplyResources(this.metersKindRadioButton1, "metersKindRadioButton1");
this.metersKindRadioButton1.Name = "metersKindRadioButton1";
this.metersKindRadioButton1.TabStop = true;
this.metersKindRadioButton1.UseVisualStyleBackColor = true;
//
// transitionEndComboBox
//
this.transitionEndComboBox.FormattingEnabled = true;
resources.ApplyResources(this.transitionEndComboBox, "transitionEndComboBox");
this.transitionEndComboBox.Name = "transitionEndComboBox";
//
// transitionEndLabel
//
resources.ApplyResources(this.transitionEndLabel, "transitionEndLabel");
this.transitionEndLabel.Name = "transitionEndLabel";
//
// transitionStartComboBox
//
this.transitionStartComboBox.FormattingEnabled = true;
resources.ApplyResources(this.transitionStartComboBox, "transitionStartComboBox");
this.transitionStartComboBox.Name = "transitionStartComboBox";
//
// transitionStartLabel
//
resources.ApplyResources(this.transitionStartLabel, "transitionStartLabel");
this.transitionStartLabel.Name = "transitionStartLabel";
//
// fileWriter1ComboBox
//
this.fileWriter1ComboBox.FormattingEnabled = true;
resources.ApplyResources(this.fileWriter1ComboBox, "fileWriter1ComboBox");
this.fileWriter1ComboBox.Name = "fileWriter1ComboBox";
//
// printer1ComboBox
//
this.printer1ComboBox.FormattingEnabled = true;
resources.ApplyResources(this.printer1ComboBox, "printer1ComboBox");
this.printer1ComboBox.Name = "printer1ComboBox";
//
// dataEntryComboBox
//
this.dataEntryComboBox.FormattingEnabled = true;
resources.ApplyResources(this.dataEntryComboBox, "dataEntryComboBox");
this.dataEntryComboBox.Name = "dataEntryComboBox";
//
// resultsWriterLabel
//
resources.ApplyResources(this.resultsWriterLabel, "resultsWriterLabel");
this.resultsWriterLabel.Name = "resultsWriterLabel";
//
// resultsPrinterLabel
//
resources.ApplyResources(this.resultsPrinterLabel, "resultsPrinterLabel");
this.resultsPrinterLabel.Name = "resultsPrinterLabel";
//
// dataEntryLabel
//
resources.ApplyResources(this.dataEntryLabel, "dataEntryLabel");
this.dataEntryLabel.Name = "dataEntryLabel";
//
// notesTextBox
//
resources.ApplyResources(this.notesTextBox, "notesTextBox");
this.notesTextBox.Name = "notesTextBox";
//
// label18
//
resources.ApplyResources(this.label18, "label18");
this.label18.Name = "label18";
//
// watermetersTextBox
//
resources.ApplyResources(this.watermetersTextBox, "watermetersTextBox");
this.watermetersTextBox.Name = "watermetersTextBox";
//
// watermetersLabel
//
resources.ApplyResources(this.watermetersLabel, "watermetersLabel");
this.watermetersLabel.Name = "watermetersLabel";
resources.ApplyResources(this.profileTypeRadioButton1, "profileTypeRadioButton1");
this.profileTypeRadioButton1.Name = "profileTypeRadioButton1";
this.profileTypeRadioButton1.TabStop = true;
this.profileTypeRadioButton1.UseVisualStyleBackColor = true;
//
// lastChangedOnTextBox
//
@ -390,111 +198,102 @@ namespace TBF.UI.Bench.TestProfiles
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// historyTabPage
//
this.historyTabPage.Controls.Add(this.historyListViewEx);
resources.ApplyResources(this.historyTabPage, "historyTabPage");
this.historyTabPage.Name = "historyTabPage";
this.historyTabPage.UseVisualStyleBackColor = true;
//
// historyListViewEx
//
this.historyListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.historyListViewEx, "historyListViewEx");
this.historyListViewEx.DoubleClickActivation = false;
this.historyListViewEx.FullRowSelect = true;
this.historyListViewEx.GridLines = true;
this.historyListViewEx.Name = "historyListViewEx";
this.historyListViewEx.UseCompatibleStateImageBehavior = false;
this.historyListViewEx.View = System.Windows.Forms.View.Details;
//
// metrology1TabPage
//
this.metrology1TabPage.Controls.Add(this.metrology1ListViewEx);
this.metrology1TabPage.Controls.Add(this.metrologyListViewEx);
resources.ApplyResources(this.metrology1TabPage, "metrology1TabPage");
this.metrology1TabPage.Name = "metrology1TabPage";
this.metrology1TabPage.UseVisualStyleBackColor = true;
//
// metrology1ListViewEx
// metrologyListViewEx
//
this.metrology1ListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.metrology1ListViewEx, "metrology1ListViewEx");
this.metrology1ListViewEx.DoubleClickActivation = false;
this.metrology1ListViewEx.FullRowSelect = true;
this.metrology1ListViewEx.GridLines = true;
this.metrology1ListViewEx.Name = "metrology1ListViewEx";
this.metrology1ListViewEx.UseCompatibleStateImageBehavior = false;
this.metrology1ListViewEx.View = System.Windows.Forms.View.Details;
this.metrology1ListViewEx.SelectedIndexChanged += new System.EventHandler(this.metrology1ListViewEx_SelectedIndexChanged);
//
// metrology2TabPage
//
this.metrology2TabPage.Controls.Add(this.metrology2ListViewEx);
resources.ApplyResources(this.metrology2TabPage, "metrology2TabPage");
this.metrology2TabPage.Name = "metrology2TabPage";
this.metrology2TabPage.UseVisualStyleBackColor = true;
//
// metrology2ListViewEx
//
this.metrology2ListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.metrology2ListViewEx, "metrology2ListViewEx");
this.metrology2ListViewEx.DoubleClickActivation = false;
this.metrology2ListViewEx.FullRowSelect = true;
this.metrology2ListViewEx.GridLines = true;
this.metrology2ListViewEx.Name = "metrology2ListViewEx";
this.metrology2ListViewEx.UseCompatibleStateImageBehavior = false;
this.metrology2ListViewEx.View = System.Windows.Forms.View.Details;
this.metrology2ListViewEx.SelectedIndexChanged += new System.EventHandler(this.metrology2ListViewEx_SelectedIndexChanged);
//
// processTabPage
//
this.processTabPage.Controls.Add(this.processListViewEx);
resources.ApplyResources(this.processTabPage, "processTabPage");
this.processTabPage.Name = "processTabPage";
this.processTabPage.UseVisualStyleBackColor = true;
//
// processListViewEx
//
this.processListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.processListViewEx, "processListViewEx");
this.processListViewEx.DoubleClickActivation = false;
this.processListViewEx.FullRowSelect = true;
this.processListViewEx.GridLines = true;
this.processListViewEx.Name = "processListViewEx";
this.processListViewEx.UseCompatibleStateImageBehavior = false;
this.processListViewEx.View = System.Windows.Forms.View.Details;
this.processListViewEx.SelectedIndexChanged += new System.EventHandler(this.processListViewEx_SelectedIndexChanged);
this.metrologyListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.metrologyListViewEx, "metrologyListViewEx");
this.metrologyListViewEx.DoubleClickActivation = false;
this.metrologyListViewEx.FullRowSelect = true;
this.metrologyListViewEx.GridLines = true;
this.metrologyListViewEx.Name = "metrologyListViewEx";
this.metrologyListViewEx.UseCompatibleStateImageBehavior = false;
this.metrologyListViewEx.View = System.Windows.Forms.View.Details;
this.metrologyListViewEx.SelectedIndexChanged += new System.EventHandler(this.metrology1ListViewEx_SelectedIndexChanged);
//
// parametersTabPage
//
this.parametersTabPage.Controls.Add(this.parametersListViewEx);
this.parametersTabPage.Controls.Add(this.errorFlagsListViewEx);
resources.ApplyResources(this.parametersTabPage, "parametersTabPage");
this.parametersTabPage.Name = "parametersTabPage";
this.parametersTabPage.UseVisualStyleBackColor = true;
//
// parametersListViewEx
// errorFlagsListViewEx
//
this.parametersListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.parametersListViewEx, "parametersListViewEx");
this.parametersListViewEx.DoubleClickActivation = false;
this.parametersListViewEx.FullRowSelect = true;
this.parametersListViewEx.GridLines = true;
this.parametersListViewEx.Name = "parametersListViewEx";
this.parametersListViewEx.UseCompatibleStateImageBehavior = false;
this.parametersListViewEx.View = System.Windows.Forms.View.Details;
this.parametersListViewEx.SelectedIndexChanged += new System.EventHandler(this.parametersListViewEx_SelectedIndexChanged);
this.errorFlagsListViewEx.AllowColumnReorder = true;
resources.ApplyResources(this.errorFlagsListViewEx, "errorFlagsListViewEx");
this.errorFlagsListViewEx.DoubleClickActivation = false;
this.errorFlagsListViewEx.FullRowSelect = true;
this.errorFlagsListViewEx.GridLines = true;
this.errorFlagsListViewEx.Name = "errorFlagsListViewEx";
this.errorFlagsListViewEx.UseCompatibleStateImageBehavior = false;
this.errorFlagsListViewEx.View = System.Windows.Forms.View.Details;
this.errorFlagsListViewEx.SelectedIndexChanged += new System.EventHandler(this.parametersListViewEx_SelectedIndexChanged);
//
// sharedButtons
//
resources.ApplyResources(this.sharedButtons, "sharedButtons");
this.sharedButtons.Name = "sharedButtons";
//
// ProcedureDlg
// profileTypeRadioButton4
//
resources.ApplyResources(this.profileTypeRadioButton4, "profileTypeRadioButton4");
this.profileTypeRadioButton4.Name = "profileTypeRadioButton4";
this.profileTypeRadioButton4.TabStop = true;
this.profileTypeRadioButton4.UseVisualStyleBackColor = true;
//
// profileTypeRadioButton5
//
resources.ApplyResources(this.profileTypeRadioButton5, "profileTypeRadioButton5");
this.profileTypeRadioButton5.Name = "profileTypeRadioButton5";
this.profileTypeRadioButton5.TabStop = true;
this.profileTypeRadioButton5.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.profileTypeRadioButton1);
this.groupBox1.Controls.Add(this.profileTypeRadioButton5);
this.groupBox1.Controls.Add(this.profileTypeRadioButton2);
this.groupBox1.Controls.Add(this.profileTypeRadioButton4);
this.groupBox1.Controls.Add(this.profileTypeRadioButton3);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.errorCalculationRadioButton2);
this.groupBox2.Controls.Add(this.errorCalculationRadioButton1);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// errorCalculationRadioButton1
//
resources.ApplyResources(this.errorCalculationRadioButton1, "errorCalculationRadioButton1");
this.errorCalculationRadioButton1.Name = "errorCalculationRadioButton1";
this.errorCalculationRadioButton1.TabStop = true;
this.errorCalculationRadioButton1.UseVisualStyleBackColor = true;
//
// errorCalculationRadioButton2
//
resources.ApplyResources(this.errorCalculationRadioButton2, "errorCalculationRadioButton2");
this.errorCalculationRadioButton2.Name = "errorCalculationRadioButton2";
this.errorCalculationRadioButton2.TabStop = true;
this.errorCalculationRadioButton2.UseVisualStyleBackColor = true;
//
// TestProfileDlg
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.mainSplitContainer);
this.Name = "ProcedureDlg";
this.Name = "TestProfileDlg";
this.Load += new System.EventHandler(this.ProcedureDlg_Load);
this.mainSplitContainer.Panel1.ResumeLayout(false);
this.mainSplitContainer.Panel2.ResumeLayout(false);
@ -503,11 +302,12 @@ namespace TBF.UI.Bench.TestProfiles
this.tabControl.ResumeLayout(false);
this.generalTabPage.ResumeLayout(false);
this.generalTabPage.PerformLayout();
this.historyTabPage.ResumeLayout(false);
this.metrology1TabPage.ResumeLayout(false);
this.metrology2TabPage.ResumeLayout(false);
this.processTabPage.ResumeLayout(false);
this.parametersTabPage.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
}
@ -515,27 +315,11 @@ namespace TBF.UI.Bench.TestProfiles
#endregion
private System.Windows.Forms.SplitContainer mainSplitContainer;
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage historyTabPage;
private global::Results.Forms.ListViewEx historyListViewEx;
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage metrology1TabPage;
private global::Results.Forms.ListViewEx metrology1ListViewEx;
private System.Windows.Forms.TabPage metrology2TabPage;
private global::Results.Forms.ListViewEx metrology2ListViewEx;
private System.Windows.Forms.TabPage processTabPage;
private global::Results.Forms.ListViewEx processListViewEx;
private global::Results.Forms.ListViewEx metrologyListViewEx;
private TBF.UI.Shared.SharedButtons sharedButtons;
private System.Windows.Forms.TabPage generalTabPage;
private System.Windows.Forms.ComboBox fileWriter1ComboBox;
private System.Windows.Forms.ComboBox printer1ComboBox;
private System.Windows.Forms.ComboBox dataEntryComboBox;
private System.Windows.Forms.Label resultsWriterLabel;
private System.Windows.Forms.Label resultsPrinterLabel;
private System.Windows.Forms.Label dataEntryLabel;
private System.Windows.Forms.TextBox notesTextBox;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox watermetersTextBox;
private System.Windows.Forms.Label watermetersLabel;
private System.Windows.Forms.TabPage generalTabPage;
private System.Windows.Forms.TextBox lastChangedOnTextBox;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox lastChangedByTextBox;
@ -547,26 +331,17 @@ namespace TBF.UI.Bench.TestProfiles
private System.Windows.Forms.TextBox descriptionTextBox;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox procNameTextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox transitionEndComboBox;
private System.Windows.Forms.Label transitionEndLabel;
private System.Windows.Forms.ComboBox transitionStartComboBox;
private System.Windows.Forms.Label transitionStartLabel;
private System.Windows.Forms.RadioButton metersKindRadioButton2;
private System.Windows.Forms.RadioButton metersKindRadioButton1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.RadioButton profileTypeRadioButton2;
private System.Windows.Forms.RadioButton profileTypeRadioButton1;
private System.Windows.Forms.TabPage parametersTabPage;
private global::Results.Forms.ListViewEx parametersListViewEx;
private System.Windows.Forms.ComboBox fileWriter2ComboBox;
private System.Windows.Forms.ComboBox fileWriter3ComboBox;
private System.Windows.Forms.ComboBox printer2ComboBox;
private System.Windows.Forms.ComboBox fileWriter4ComboBox;
private System.Windows.Forms.RadioButton metersKindRadioButton3;
private System.Windows.Forms.CheckBox mustBeCompleteCheckBox;
private System.Windows.Forms.CheckBox protectedCheckBox;
private System.Windows.Forms.CheckBox manualControlDisabledCheckBox;
private System.Windows.Forms.TextBox altProcNameTextBox;
private System.Windows.Forms.Label altProcNameLabel;
private System.Windows.Forms.TextBox altProcPeriodTextBox;
private System.Windows.Forms.Label altProcPeriodLabel;
private global::Results.Forms.ListViewEx errorFlagsListViewEx;
private System.Windows.Forms.RadioButton profileTypeRadioButton3;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.RadioButton errorCalculationRadioButton2;
private System.Windows.Forms.RadioButton errorCalculationRadioButton1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RadioButton profileTypeRadioButton5;
private System.Windows.Forms.RadioButton profileTypeRadioButton4;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ using TBF.UI.Shared;
namespace TBF.UI.Bench.TestProfiles
{
public class TestProfilesCtrl : BaseWithListViewEx<Procedure>, ITabWithListViewEx
public class TestProfilesCtrl : BaseWithListViewEx<Profile>, ITabWithListViewEx
{
static readonly ILog log = LogManager.GetLogger(typeof(TestProfilesCtrl));
@ -57,10 +57,10 @@ namespace TBF.UI.Bench.TestProfiles
/// ListViewEx columns
TBF.LocalSettings ls = Program.LocalSettings;
Columns.Add(Strings.Nr, (ls.ProceduresColumnCount > 0) ? ls.ProceduresColumnWidths[0] : (30 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.Name, (ls.ProceduresColumnCount > 1) ? ls.ProceduresColumnWidths[1] : (100 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.DescriptionColHdr, (ls.ProceduresColumnCount > 2) ? ls.ProceduresColumnWidths[2] : (300 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.More, (ls.ProceduresColumnCount > 3) ? ls.ProceduresColumnWidths[3] : (300 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.Nr, (ls.ProfilesColumnCount > 0) ? ls.ProfilesColumnWidths[0] : ( 30 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.Name, (ls.ProfilesColumnCount > 1) ? ls.ProfilesColumnWidths[1] : (100 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.DescriptionColHdr, (ls.ProfilesColumnCount > 2) ? ls.ProfilesColumnWidths[2] : (300 * parent.Dpi / Constants.Dpi100pct));
Columns.Add(Strings.More, (ls.ProfilesColumnCount > 3) ? ls.ProfilesColumnWidths[3] : (300 * parent.Dpi / Constants.Dpi100pct));
editors = new Control[columnsCount];
///
@ -86,8 +86,7 @@ namespace TBF.UI.Bench.TestProfiles
/// Load the procedures
if (session == null) session = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config);
MyItems = session.QueryOver<Procedure>()
.Where(x => (x.ProcedureState == ProcedureState.Active))
MyItems = session.QueryOver<Profile>()
.OrderBy(x => x.ItemNr).Asc
.List();
@ -104,7 +103,7 @@ namespace TBF.UI.Bench.TestProfiles
public override void DrawOne(object myItem)
{
Procedure entity = (Procedure)myItem;
Profile entity = (Profile)myItem;
StringBuilder tests = new StringBuilder();
foreach (var test in entity.Tests)
@ -139,7 +138,7 @@ namespace TBF.UI.Bench.TestProfiles
int itemNr = 0;
foreach (var entity in MyItems)
{
(entity as Procedure).ItemNr = itemNr++;
(entity as Profile).ItemNr = itemNr++;
session.SaveOrUpdate(entity);
}
@ -165,7 +164,7 @@ namespace TBF.UI.Bench.TestProfiles
/// Compare list view column widths with the saved ones
bool anyColumnDiffers = false;
if (Columns.Count != ls.ProceduresColumnCount)
if (Columns.Count != ls.ProfilesColumnCount)
{
anyColumnDiffers = true;
}
@ -173,17 +172,17 @@ namespace TBF.UI.Bench.TestProfiles
{
for (int i = 0; i < Columns.Count; i++)
{
if (Columns[i].Width != ls.ProceduresColumnWidths[i]) { anyColumnDiffers = true; break; }
if (Columns[i].Width != ls.ProfilesColumnWidths[i]) { anyColumnDiffers = true; break; }
}
}
if (anyColumnDiffers)
{
/// Update column widths
ls.ProceduresColumnWidths = new int[Columns.Count];
ls.ProfilesColumnWidths = new int[Columns.Count];
for (int i = 0; i < Columns.Count; i++)
{
ls.ProceduresColumnWidths[i] = Columns[i].Width;
ls.ProfilesColumnWidths[i] = Columns[i].Width;
}
ls.Save();
@ -196,21 +195,17 @@ namespace TBF.UI.Bench.TestProfiles
string newName;
for (int nameId = 1; true; nameId++)
{
newName = Strings.New_procedure_name + nameId.ToString();
newName = Strings.New_profile_name + nameId.ToString();
bool notUsed = true;
foreach (var t in MyItems) if (t.Name.Equals(newName)) notUsed = false;
if (notUsed) break;
}
Procedure newProcedure = new Procedure(newName, MyItems.Count);
newProcedure.ProcedureState = ProcedureState.Active;
newProcedure.Revision = 1;
newProcedure.PredecessorId = 0;
newProcedure.ObtainedByCopy = false;
newProcedure.CreationUser = Users.GlobalData.CurrentUser.UserName;
newProcedure.CreationTime = DateTime.Now;
Profile newProfile = new Profile(newName, MyItems.Count);
newProfile.CreationUser = Users.GlobalData.CurrentUser.UserName;
newProfile.CreationTime = DateTime.Now;
if (new TestProfileDlg(newProcedure, GetUsedNames(), true).ShowDialog() == DialogResult.OK)
if (new TestProfileDlg(newProfile, GetUsedNames(), true).ShowDialog() == DialogResult.OK)
{
/// TODO: Make name uniqueness test
parent.Unlock();
@ -219,14 +214,14 @@ namespace TBF.UI.Bench.TestProfiles
{
try
{
newProcedure.LastChgUser = Users.GlobalData.CurrentUser.UserName;
newProcedure.LastChgTime = DateTime.Now;
newProfile.LastChgUser = Users.GlobalData.CurrentUser.UserName;
newProfile.LastChgTime = DateTime.Now;
base.AddOne(newProcedure);
session.SaveOrUpdate(newProcedure);
base.AddOne(newProfile);
session.SaveOrUpdate(newProfile);
transaction.Commit();
MessageBox.Show(string.Format(Strings.Procedure_0_added, newProcedure.Name),
MessageBox.Show(string.Format(Strings.Profile_0_added, newProfile.Name),
Strings.Confirmation,
MessageBoxButtons.OK,
MessageBoxIcon.Information);
@ -234,7 +229,7 @@ namespace TBF.UI.Bench.TestProfiles
catch (Exception exc)
{
transaction.Rollback();
log.ErrorFormat("Exception when saving Procedure '{0}' : {1}", newProcedure.Name, exc.Message);
log.ErrorFormat("Exception when saving Profile '{0}' : {1}", newProfile.Name, exc.Message);
}
}
}
@ -263,7 +258,7 @@ namespace TBF.UI.Bench.TestProfiles
int itemNr = 0;
foreach (var entity in MyItems)
{
(entity as Procedure).ItemNr = itemNr++;
(entity as Profile).ItemNr = itemNr++;
session.SaveOrUpdate(entity);
}
@ -284,16 +279,12 @@ namespace TBF.UI.Bench.TestProfiles
{
if (SelectedItems.Count != 1) return;
Procedure originalProcedure = SelectedItems[0].Tag as Procedure;
Procedure modifiedProcedure = originalProcedure.Clone();
modifiedProcedure.Revision = originalProcedure.Revision + 1;
modifiedProcedure.ObtainedByCopy = false;
Profile editedProfile = SelectedItems[0].Tag as Profile;
IList<string> usedNames = GetUsedNames();
usedNames.Remove(originalProcedure.Name); /// Allow original procedure name
usedNames.Remove(editedProfile.Name); /// Allow original procedure name
///
if (new TestProfileDlg(modifiedProcedure, usedNames).ShowDialog() == DialogResult.OK)
if (new TestProfileDlg(editedProfile, usedNames).ShowDialog() == DialogResult.OK)
{
parent.Unlock();
@ -301,23 +292,20 @@ namespace TBF.UI.Bench.TestProfiles
{
try
{
originalProcedure.ProcedureState = ProcedureState.History;
modifiedProcedure.LastChgUser = Users.GlobalData.CurrentUser.UserName;
modifiedProcedure.LastChgTime = DateTime.Now;
editedProfile.LastChgUser = Users.GlobalData.CurrentUser.UserName;
editedProfile.LastChgTime = DateTime.Now;
session.SaveOrUpdate(originalProcedure);
session.SaveOrUpdate(modifiedProcedure);
session.SaveOrUpdate(editedProfile);
transaction.Commit();
SelectedItems[0].Tag = modifiedProcedure;
MessageBox.Show(string.Format(Strings.Procedure_0_modified, string.Format(" {0} '{1}' ", modifiedProcedure.ItemNr + 1, modifiedProcedure.Name)),
MessageBox.Show(string.Format(Strings.Profile_0_modified, string.Format(" {0} '{1}' ", editedProfile.ItemNr + 1, editedProfile.Name)),
Strings.Confirmation,
MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
catch (Exception exc)
{
log.ErrorFormat("Exception when saving Procedure '{0}' : {1}", modifiedProcedure.Name, exc.Message);
log.ErrorFormat("Exception when saving Profile '{0}' : {1}", editedProfile.Name, exc.Message);
transaction.Rollback();
}
}
@ -331,36 +319,31 @@ namespace TBF.UI.Bench.TestProfiles
{
if (SelectedItems.Count != 1) return;
Procedure selectedProcedure = (Procedure)SelectedItems[0].Tag;
Profile selectedProfile = (Profile)SelectedItems[0].Tag;
/// Make a copy of the selected procedure
Procedure newProcedure = selectedProcedure.Clone();
Profile newProfile = selectedProfile.Clone();
newProcedure.Name = selectedProcedure.Name + Strings.New_name_copy;
newProcedure.ItemNr = MyItems.Count;
newProcedure.ProcedureState = ProcedureState.Active;
newProcedure.Revision = 1;
newProcedure.PredecessorId = selectedProcedure.Id;
newProcedure.ObtainedByCopy = true;
newProcedure.CreationUser = Users.GlobalData.CurrentUser.UserName;
newProcedure.CreationTime = DateTime.Now;
newProcedure.Protected = false;
newProfile.Name = selectedProfile.Name + Strings.New_name_copy;
newProfile.ItemNr = MyItems.Count;
newProfile.CreationUser = Users.GlobalData.CurrentUser.UserName;
newProfile.CreationTime = DateTime.Now;
if ((new TestProfileDlg(newProcedure, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
if ((new TestProfileDlg(newProfile, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
{
/// TODO: Make name uniqueness test
parent.Unlock();
using (var transaction = session.BeginTransaction())
{
newProcedure.LastChgUser = Users.GlobalData.CurrentUser.UserName;
newProcedure.LastChgTime = DateTime.Now;
newProfile.LastChgUser = Users.GlobalData.CurrentUser.UserName;
newProfile.LastChgTime = DateTime.Now;
base.AddOne(newProcedure);
session.SaveOrUpdate(newProcedure);
base.AddOne(newProfile);
session.SaveOrUpdate(newProfile);
transaction.Commit();
MessageBox.Show(string.Format(Strings.Procedure_0_added, newProcedure.Name),
MessageBox.Show(string.Format(Strings.Procedure_0_added, newProfile.Name),
Strings.Confirmation,
MessageBoxButtons.OK,
MessageBoxIcon.Information);
@ -372,12 +355,12 @@ namespace TBF.UI.Bench.TestProfiles
{
if (SelectedItems.Count != 1) return;
Procedure selectedProcedure = (Procedure)SelectedItems[0].Tag;
Profile selectedProfile = (Profile)SelectedItems[0].Tag;
SaveFileDialog dlg = new SaveFileDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
selectedProcedure.Export(new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8));
selectedProfile.Export(new StreamWriter(dlg.FileName, false, System.Text.Encoding.UTF8));
}
}
@ -388,32 +371,28 @@ namespace TBF.UI.Bench.TestProfiles
if (dlg.ShowDialog() != DialogResult.OK) return;
/// Import a procedure from a file
Procedure newProcedure = Procedure.Import(new StreamReader(dlg.FileName, System.Text.Encoding.UTF8));
Profile newProfile = Profile.Import(new StreamReader(dlg.FileName, System.Text.Encoding.UTF8));
newProcedure.Name = newProcedure.Name + " imported";
newProcedure.ItemNr = MyItems.Count;
newProcedure.ProcedureState = ProcedureState.Active;
newProcedure.Revision = 1;
newProcedure.PredecessorId = 0;
newProcedure.ObtainedByCopy = false;
newProcedure.CreationUser = Users.GlobalData.CurrentUser.UserName;
newProcedure.CreationTime = DateTime.Now;
newProfile.Name = newProfile.Name + " imported";
newProfile.ItemNr = MyItems.Count;
newProfile.CreationUser = Users.GlobalData.CurrentUser.UserName;
newProfile.CreationTime = DateTime.Now;
if ((new TestProfileDlg(newProcedure, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
if ((new TestProfileDlg(newProfile, GetUsedNames(), true)).ShowDialog() == DialogResult.OK)
{
/// TODO: Make name uniqueness test
parent.Unlock();
using (var transaction = session.BeginTransaction())
{
newProcedure.LastChgUser = Users.GlobalData.CurrentUser.UserName;
newProcedure.LastChgTime = DateTime.Now;
newProfile.LastChgUser = Users.GlobalData.CurrentUser.UserName;
newProfile.LastChgTime = DateTime.Now;
base.AddOne(newProcedure);
session.SaveOrUpdate(newProcedure);
base.AddOne(newProfile);
session.SaveOrUpdate(newProfile);
transaction.Commit();
MessageBox.Show(string.Format(Strings.Procedure_0_added, newProcedure.Name),
MessageBox.Show(string.Format(Strings.Procedure_0_added, newProfile.Name),
Strings.Confirmation,
MessageBoxButtons.OK,
MessageBoxIcon.Information);
@ -425,12 +404,12 @@ namespace TBF.UI.Bench.TestProfiles
{
if (SelectedItems.Count != 1) return;
Procedure selectedProcedure = (Procedure)SelectedItems[0].Tag;
Profile selectedProfile = (Profile)SelectedItems[0].Tag;
OpenFileDialog dlg = new OpenFileDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
string diff = selectedProcedure.Compare(new StreamReader(dlg.FileName, System.Text.Encoding.UTF8));
string diff = selectedProfile.Compare(new StreamReader(dlg.FileName, System.Text.Encoding.UTF8));
if (!string.IsNullOrEmpty(diff))
{
MessageBox.Show(diff, "Differences", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

View File

@ -2381,8 +2381,8 @@ namespace TBF.UI.Procedures
void SelectedIndexChanged(object sender, EventArgs e)
{
ListViewEx listViewEx = sender as ListViewEx;
if (listViewEx.SelectedItems.Count != 1)
{
if ((listViewEx == null) || (listViewEx.SelectedItems.Count != 1))
{
UpdateButtonStates(SharedButtons.SelectedItemPos.None);
SelectedTestIx = -1;
return;