diff --git a/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.Designer.cs b/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.Designer.cs
new file mode 100644
index 00000000..b75465e7
--- /dev/null
+++ b/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.Designer.cs
@@ -0,0 +1,179 @@
+namespace VEPROMS
+{
+ partial class dlgSetChangeBarStartDate
+ {
+ ///
+ /// 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.btnOK = new DevComponents.DotNetBar.ButtonX();
+ this.btnCancel = new DevComponents.DotNetBar.ButtonX();
+ this.label1 = new System.Windows.Forms.Label();
+ this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
+ this.dateTimeInput1 = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
+ this.btnNow = new DevComponents.DotNetBar.ButtonX();
+ ((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // btnOK
+ //
+ this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.btnOK.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.btnOK.Location = new System.Drawing.Point(18, 111);
+ this.btnOK.Name = "btnOK";
+ this.btnOK.Size = new System.Drawing.Size(64, 23);
+ this.btnOK.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnOK.TabIndex = 1;
+ this.btnOK.Text = "OK";
+ this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+ //
+ // btnCancel
+ //
+ this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.btnCancel.Location = new System.Drawing.Point(165, 111);
+ this.btnCancel.Name = "btnCancel";
+ this.btnCancel.Size = new System.Drawing.Size(64, 23);
+ this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.btnCancel.TabIndex = 2;
+ this.btnCancel.Text = "Cancel";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.Location = new System.Drawing.Point(3, 19);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(229, 15);
+ this.label1.TabIndex = 3;
+ this.label1.Text = "Show Change Bars on Changes Starting:";
+ //
+ // superTooltip1
+ //
+ this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
+ this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
+ //
+ // dateTimeInput1
+ //
+ //
+ //
+ //
+ this.dateTimeInput1.BackgroundStyle.Class = "DateTimeInputBackground";
+ this.dateTimeInput1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.dateTimeInput1.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
+ this.dateTimeInput1.ButtonDropDown.Visible = true;
+ this.dateTimeInput1.CustomFormat = "MM/dd/yyyy";
+ this.dateTimeInput1.DateTimeSelectorVisibility = DevComponents.Editors.DateTimeAdv.eDateTimeSelectorVisibility.DateSelector;
+ this.dateTimeInput1.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
+ this.dateTimeInput1.IsPopupCalendarOpen = false;
+ this.dateTimeInput1.Location = new System.Drawing.Point(30, 51);
+ //
+ //
+ //
+ //
+ //
+ //
+ this.dateTimeInput1.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.dateTimeInput1.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1);
+ this.dateTimeInput1.MonthCalendar.ClearButtonVisible = true;
+ //
+ //
+ //
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90;
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1;
+ this.dateTimeInput1.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.dateTimeInput1.MonthCalendar.DisplayMonth = new System.DateTime(2016, 2, 1, 0, 0, 0, 0);
+ //
+ //
+ //
+ this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
+ this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90;
+ this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
+ this.dateTimeInput1.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
+ this.dateTimeInput1.MonthCalendar.TodayButtonVisible = true;
+ this.dateTimeInput1.Name = "dateTimeInput1";
+ this.dateTimeInput1.Size = new System.Drawing.Size(113, 20);
+ this.dateTimeInput1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.superTooltip1.SetSuperTooltip(this.dateTimeInput1, new DevComponents.DotNetBar.SuperTooltipInfo("Change Bar Start Date", "", "Only the changes made after this date will have change bars.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(138, 67)));
+ this.dateTimeInput1.TabIndex = 4;
+ this.dateTimeInput1.TimeSelectorTimeFormat = DevComponents.Editors.DateTimeAdv.eTimeSelectorFormat.Time24H;
+ this.dateTimeInput1.TimeSelectorType = DevComponents.Editors.DateTimeAdv.eTimeSelectorType.TouchStyle;
+ //
+ // btnNow
+ //
+ this.btnNow.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.btnNow.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
+ this.btnNow.Location = new System.Drawing.Point(149, 51);
+ this.btnNow.Name = "btnNow";
+ this.btnNow.Size = new System.Drawing.Size(49, 23);
+ this.btnNow.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
+ this.superTooltip1.SetSuperTooltip(this.btnNow, new DevComponents.DotNetBar.SuperTooltipInfo("Now", "", "This will set the Change Bar Start date to today.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
+ this.btnNow.TabIndex = 5;
+ this.btnNow.Text = "Today";
+ this.btnNow.Click += new System.EventHandler(this.btnNow_Click);
+ //
+ // dlgSetChangeBarStartDate
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(241, 144);
+ this.Controls.Add(this.btnNow);
+ this.Controls.Add(this.dateTimeInput1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.btnCancel);
+ this.Controls.Add(this.btnOK);
+ this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "dlgSetChangeBarStartDate";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Change Bar Start Date";
+ this.Load += new System.EventHandler(this.dlgSetChangeBarStartDate_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private DevComponents.DotNetBar.ButtonX btnOK;
+ private DevComponents.DotNetBar.ButtonX btnCancel;
+ private System.Windows.Forms.Label label1;
+ private DevComponents.DotNetBar.SuperTooltip superTooltip1;
+ private DevComponents.Editors.DateTimeAdv.DateTimeInput dateTimeInput1;
+ private DevComponents.DotNetBar.ButtonX btnNow;
+ }
+}
\ No newline at end of file
diff --git a/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.cs b/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.cs
new file mode 100644
index 00000000..a5ad609f
--- /dev/null
+++ b/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using DevComponents.DotNetBar;
+using DevComponents.DotNetBar.Controls;
+using VEPROMS.CSLA.Library;
+
+
+namespace VEPROMS
+{
+ public partial class dlgSetChangeBarStartDate : DevComponents.DotNetBar.Office2007Form
+ {
+ private ProcedureConfig _MyProcConfig = null;
+
+ public ProcedureConfig MyProcConfig
+ {
+ get { return _MyProcConfig; }
+ set { _MyProcConfig = value; }
+ }
+
+ public dlgSetChangeBarStartDate(ProcedureConfig pc)
+ {
+ InitializeComponent();
+ _MyProcConfig = pc;
+ }
+
+ private void dlgSetChangeBarStartDate_Load(object sender, EventArgs e)
+ {
+ string cbdt = MyProcConfig.Print_ChangeBarDate;
+ string[] tmp = cbdt.Split(' ');
+ cbdt = tmp[0] + " 00:00:00";
+ dateTimeInput1.Value = (cbdt == null || cbdt == "") ? DateTime.Now : DateTime.Parse(cbdt);
+ }
+
+ private void btnOK_Click(object sender, EventArgs e)
+ {
+ MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy 00:00:00");// ("MM/dd/yyyy HH:mm:ss");
+ }
+
+
+ private void btnNow_Click(object sender, EventArgs e)
+ {
+ dateTimeInput1.Value = DateTime.Now;
+ }
+
+ }
+}
diff --git a/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.resx b/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.resx
new file mode 100644
index 00000000..92c0f12c
--- /dev/null
+++ b/PROMS/VEPROMS User Interface/dlgSetChangeBarStartDate.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs
index ad23f6cc..54754a6b 100644
--- a/PROMS/Volian.Controls.Library/vlnTreeView.cs
+++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs
@@ -485,6 +485,11 @@ namespace Volian.Controls.Library
{
if (PrintAllProcedures != null) PrintAllProcedures(sender, args);
}
+ public event vlnTreeViewEvent SelectDateToStartChangeBars;
+ private void OnSelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
+ {
+ if (SelectDateToStartChangeBars != null) SelectDateToStartChangeBars(sender, args);
+ }
public event vlnTreeViewEvent ApproveProcedure;
private void OnApproveProcedure(object sender, vlnTreeEventArgs args)
{
@@ -801,6 +806,7 @@ namespace Volian.Controls.Library
}
cm.MenuItems.Add(micas);
cm.MenuItems.Add(mip);
+ AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri);
cm.MenuItems.Add(mia);
AddApprovedRevisionsMultiUnit(cm.MenuItems, pri);
}
@@ -808,6 +814,7 @@ namespace Volian.Controls.Library
{
cm.MenuItems.Add("Create Continuous Action Summary", new EventHandler(mi_Click));
cm.MenuItems.Add("Print", new EventHandler(mi_Click));
+ AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri);
cm.MenuItems.Add("Approve", new EventHandler(mi_Click));
//_MyLog.WarnFormat("Context Menu 1 before - {0}", GC.GetTotalMemory(true));
AddApprovedRevisions(cm.MenuItems, pri);
@@ -1047,7 +1054,7 @@ namespace Volian.Controls.Library
private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
{
RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID);
- if (ril.Count == 0) return;
+ if (ril.Count == 0) return; // no versions to list
MenuItem mi = menuItemCollection.Add("Versions");
int k = 0;
int lastApprovedRevisionID = 0;
@@ -1101,7 +1108,7 @@ namespace Volian.Controls.Library
using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID))
{
//_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true));
- if (ril.Count == 0) return;
+ if (ril.Count == 0) return; // no versions to list
MenuItem mi = menuItemCollection.Add("Versions");
int lastApprovedRevisionID = 0;
foreach (RevisionInfo ri in ril)
@@ -1149,6 +1156,25 @@ namespace Volian.Controls.Library
}
}
+ private void AddShowChangeBarsAfterMenuItem(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
+ {
+ using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID))
+ {
+ if (ril.Count == 0 || MyUserInfo.IsAdministrator() || MyUserInfo.IsSetAdministrator(pri.MyDocVersion))
+ {
+ ProcedureConfig pc = pri.MyConfig as ProcedureConfig;
+ string currentChgBarDateTime = "";
+ if (pc != null)
+ currentChgBarDateTime = pc.Print_ChangeBarDate; // Current change bar date time before
+ if (currentChgBarDateTime == "")
+ currentChgBarDateTime = "(date not set)";
+ else
+ currentChgBarDateTime = currentChgBarDateTime.Split(' ')[0]; // only show the date not the time
+ menuItemCollection.Add(string.Format("Showing Change Bars Starting {0}", currentChgBarDateTime), new EventHandler(mi_Click));
+ }
+ }
+ }
+
void ImportProcedure_Click(object sender, EventArgs e)
{
RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
@@ -1494,7 +1520,10 @@ namespace Volian.Controls.Library
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0,mi.Text,(int)mi.Tag));
break;
default:
- MessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mip.Text));
+ if (mip.Text.StartsWith("Showing Change Bars Starting"))
+ OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
+ else
+ MessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mip.Text));
break;
}
}
@@ -1668,7 +1697,10 @@ namespace Volian.Controls.Library
// CheckInDocVersion(SelectedNode as VETreeNode);
// break;
default:
- MessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mi.Text));
+ if (mi.Text.StartsWith("Showing Change Bars Starting"))
+ OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
+ else
+ MessageBox.Show(string.Format("Unrecognized Menu Item '{0}'", mi.Text));
break;
}
}