From 9efa23fffc31af1cd0b77d810283b31b5c8a233e Mon Sep 17 00:00:00 2001 From: Kathy Date: Wed, 7 May 2014 13:38:26 +0000 Subject: [PATCH] BGE: Change Id dialogue at program startup BGE: Support for Change Id in step config BGE: change property name from MultipleChangeIds to ChangeIds --- .../dlgChgId.Designer.cs | 99 +++++++++++++++ PROMS/VEPROMS User Interface/dlgChgId.cs | 32 +++++ PROMS/VEPROMS User Interface/dlgChgId.resx | 120 ++++++++++++++++++ .../VEPROMS.CSLA.Library/Config/StepConfig.cs | 12 +- .../Format/PlantFormat.cs | 6 +- 5 files changed, 260 insertions(+), 9 deletions(-) create mode 100644 PROMS/VEPROMS User Interface/dlgChgId.Designer.cs create mode 100644 PROMS/VEPROMS User Interface/dlgChgId.cs create mode 100644 PROMS/VEPROMS User Interface/dlgChgId.resx diff --git a/PROMS/VEPROMS User Interface/dlgChgId.Designer.cs b/PROMS/VEPROMS User Interface/dlgChgId.Designer.cs new file mode 100644 index 00000000..8bef5e77 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgChgId.Designer.cs @@ -0,0 +1,99 @@ +namespace VEPROMS +{ + partial class dlgChgId + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.tbChgId = new System.Windows.Forms.TextBox(); + this.btnOk = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(23, 15); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(213, 17); + this.label1.TabIndex = 0; + this.label1.Text = "Please enter your change bar ID"; + // + // tbChgId + // + this.tbChgId.Location = new System.Drawing.Point(33, 51); + this.tbChgId.Name = "tbChgId"; + this.tbChgId.Size = new System.Drawing.Size(128, 22); + this.tbChgId.TabIndex = 1; + // + // btnOk + // + this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnOk.Location = new System.Drawing.Point(26, 94); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(61, 29); + this.btnOk.TabIndex = 2; + this.btnOk.Text = "Ok"; + this.btnOk.UseVisualStyleBackColor = true; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(131, 94); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(61, 29); + this.btnCancel.TabIndex = 3; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // dlgChgId + // + this.AcceptButton = this.btnOk; + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(347, 167); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.tbChgId); + this.Controls.Add(this.label1); + this.Name = "dlgChgId"; + this.Text = "PROMS Change Bar ID"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox tbChgId; + private System.Windows.Forms.Button btnOk; + private System.Windows.Forms.Button btnCancel; + } +} \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/dlgChgId.cs b/PROMS/VEPROMS User Interface/dlgChgId.cs new file mode 100644 index 00000000..7367a2cd --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgChgId.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using Volian.Controls.Library; + +namespace VEPROMS +{ + public partial class dlgChgId : Form + { + DisplayTabControl TabControl; + public dlgChgId(DisplayTabControl tc) + { + InitializeComponent(); + TabControl = tc; + tbChgId.Focus(); + } + + private void btnOk_Click(object sender, EventArgs e) + { + TabControl.ChgId = tbChgId.Text; + } + + private void btnCancel_Click(object sender, EventArgs e) + { + TabControl.ChgId = null; + } + } +} \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/dlgChgId.resx b/PROMS/VEPROMS User Interface/dlgChgId.resx new file mode 100644 index 00000000..19dc0dd8 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgChgId.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs index 218c5586..d0ab93e1 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/StepConfig.cs @@ -255,23 +255,23 @@ namespace VEPROMS.CSLA.Library OnPropertyChanged("Step_CBOverride"); } } - public string Step_MultipleChangeID + public string Step_ChangeID { get { - string s = _Xp["Step", "MultipleChangeID"]; + string s = _Xp["Step", "ChangeID"]; if (s == string.Empty) return null; return s; } set { - string s = _Xp["Step", "MultipleChangeID"]; + string s = _Xp["Step", "ChangeID"]; if (value != null && value.ToString() == s) return; - if (value == null && s != null) _Xp["Step", "MultipleChangeID"] = null; - else _Xp["Step", "MultipleChangeID"] = value.ToString(); - OnPropertyChanged("Step_MultipleChangeID"); + if (value == null && s != null) _Xp["Step", "ChangeID"] = null; + else _Xp["Step", "ChangeID"] = value.ToString(); + OnPropertyChanged("Step_ChangeID"); } } #endregion diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index c2b311c6..c467e4b8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1564,12 +1564,12 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _ChgBarMessageFromEdit, "@ChgBarMessageFromEdit"); } } - private LazyLoad _MultipleChangeIds; - public bool MultipleChangeIds + private LazyLoad _ChangeIds; + public bool ChangeIds { get { - return LazyLoad(ref _MultipleChangeIds, "@MultipleChangeIds"); + return LazyLoad(ref _ChangeIds, "@ChangeIds"); } } private LazyLoad _ChangeBarToRNOSep;