diff --git a/PROMS/AdjustBuildRevision/Program.cs b/PROMS/AdjustBuildRevision/Program.cs index 46f93fe3..773f3aaf 100644 --- a/PROMS/AdjustBuildRevision/Program.cs +++ b/PROMS/AdjustBuildRevision/Program.cs @@ -32,7 +32,7 @@ namespace AdjustBuildRevision { // Allow for setting build revision on either proms or the roeditor: if (Directory.GetCurrentDirectory().ToUpper().Contains("REFOBJ")) - outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")"); + outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.4.yyMM.dHH") + "\")"); else outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("2.3.yyMM.dHH") + "\")"); // if (outline != line) diff --git a/PROMS/Formats/fmtall/VEGP1all.xml b/PROMS/Formats/fmtall/VEGP1all.xml index 29750164..09565922 100644 Binary files a/PROMS/Formats/fmtall/VEGP1all.xml and b/PROMS/Formats/fmtall/VEGP1all.xml differ diff --git a/PROMS/Formats/fmtall/VEGP2all.xml b/PROMS/Formats/fmtall/VEGP2all.xml index b1b34c18..1a9b1c3f 100644 Binary files a/PROMS/Formats/fmtall/VEGP2all.xml and b/PROMS/Formats/fmtall/VEGP2all.xml differ diff --git a/PROMS/Formats/fmtall/VEGPAlrall.xml b/PROMS/Formats/fmtall/VEGPAlrall.xml index fa17a95c..8ef5ac13 100644 Binary files a/PROMS/Formats/fmtall/VEGPAlrall.xml and b/PROMS/Formats/fmtall/VEGPAlrall.xml differ diff --git a/PROMS/Formats/fmtall/VEGPBckStpsall.xml b/PROMS/Formats/fmtall/VEGPBckStpsall.xml index 68630929..49b0a794 100644 Binary files a/PROMS/Formats/fmtall/VEGPBckStpsall.xml and b/PROMS/Formats/fmtall/VEGPBckStpsall.xml differ diff --git a/PROMS/Formats/fmtall/VEGPBckall.xml b/PROMS/Formats/fmtall/VEGPBckall.xml index 052c8719..40d5726d 100644 Binary files a/PROMS/Formats/fmtall/VEGPBckall.xml and b/PROMS/Formats/fmtall/VEGPBckall.xml differ diff --git a/PROMS/Formats/genmacall/VEGPBck.svg b/PROMS/Formats/genmacall/VEGPBck.svg index 91f088b6..5c1a41f7 100644 Binary files a/PROMS/Formats/genmacall/VEGPBck.svg and b/PROMS/Formats/genmacall/VEGPBck.svg differ diff --git a/PROMS/Formats/genmacall/VEGPBckStps.svg b/PROMS/Formats/genmacall/VEGPBckStps.svg index f81f5b07..b5638d3b 100644 Binary files a/PROMS/Formats/genmacall/VEGPBckStps.svg and b/PROMS/Formats/genmacall/VEGPBckStps.svg differ diff --git a/PROMS/ReferencedObjects/Exe/RefObj/CmpRpt/CmpRpt.csproj b/PROMS/ReferencedObjects/Exe/RefObj/CmpRpt/CmpRpt.csproj index 46a1ce81..69547b19 100644 --- a/PROMS/ReferencedObjects/Exe/RefObj/CmpRpt/CmpRpt.csproj +++ b/PROMS/ReferencedObjects/Exe/RefObj/CmpRpt/CmpRpt.csproj @@ -59,7 +59,7 @@ 4 full prompt - x86 + x64 false @@ -85,6 +85,7 @@ none prompt false + x64 true @@ -92,7 +93,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -103,7 +104,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj index 84f54fd3..90f6c5fb 100644 --- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj +++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.csproj @@ -7,7 +7,7 @@ true - x86 + x64 prompt false @@ -71,7 +71,7 @@ full prompt false - x86 + x64 bin\Release\ @@ -96,6 +96,7 @@ none prompt false + x64 true @@ -103,7 +104,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/DBEncapsulation/DBEncapsulation.csproj b/PROMS/ReferencedObjects/LibSource/DBEncapsulation/DBEncapsulation.csproj index 24c52712..6aeabba3 100644 --- a/PROMS/ReferencedObjects/LibSource/DBEncapsulation/DBEncapsulation.csproj +++ b/PROMS/ReferencedObjects/LibSource/DBEncapsulation/DBEncapsulation.csproj @@ -62,6 +62,7 @@ full prompt false + x64 bin\Release\ @@ -86,6 +87,7 @@ none prompt false + x64 true @@ -93,7 +95,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -104,7 +106,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/Org.Mentalis.Files/Org.Mentalis.Files.csproj b/PROMS/ReferencedObjects/LibSource/Org.Mentalis.Files/Org.Mentalis.Files.csproj index d214040b..5f3e659f 100644 --- a/PROMS/ReferencedObjects/LibSource/Org.Mentalis.Files/Org.Mentalis.Files.csproj +++ b/PROMS/ReferencedObjects/LibSource/Org.Mentalis.Files/Org.Mentalis.Files.csproj @@ -35,6 +35,7 @@ prompt 4 false + x64 pdbonly @@ -44,13 +45,14 @@ prompt 4 false + x64 true bin\Debug\ DEBUG;TRACE full - x86 + x64 prompt false @@ -59,7 +61,7 @@ TRACE true pdbonly - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index 7203710c..ca6d9f1b 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -410,7 +410,7 @@ namespace RODBInterface GetDbServerInfo(ropath); if (!dbProviderType.Equals((int)DB_PROVIDER.SQL_SERVER)) { - strDatabaseConnectionCommand = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; + strDatabaseConnectionCommand = "Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source=" + DataConnectionPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; } } #endregion diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.csproj b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.csproj index 6c6c4821..dbf9a6d2 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.csproj +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.csproj @@ -62,6 +62,7 @@ full prompt false + x64 bin\Release\ @@ -86,6 +87,7 @@ none prompt false + x64 true @@ -93,7 +95,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -104,7 +106,7 @@ true - x86 + x64 prompt false @@ -174,6 +176,17 @@ VlnStatus + + + {4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28} + 12 + 0 + 0 + primary + False + True + + diff --git a/PROMS/ReferencedObjects/LibSource/ROFST/ROFST.csproj b/PROMS/ReferencedObjects/LibSource/ROFST/ROFST.csproj index 75a2ba87..48570cc2 100644 --- a/PROMS/ReferencedObjects/LibSource/ROFST/ROFST.csproj +++ b/PROMS/ReferencedObjects/LibSource/ROFST/ROFST.csproj @@ -62,6 +62,7 @@ full prompt false + x64 bin\Release\ @@ -86,6 +87,7 @@ none prompt false + x64 true @@ -93,7 +95,7 @@ DEBUG;TRACE;Upgrade2005; 285212672 full - x86 + x64 prompt false @@ -104,7 +106,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/ROField/ROFields.csproj b/PROMS/ReferencedObjects/LibSource/ROField/ROFields.csproj index 16950805..a4f28cc5 100644 --- a/PROMS/ReferencedObjects/LibSource/ROField/ROFields.csproj +++ b/PROMS/ReferencedObjects/LibSource/ROField/ROFields.csproj @@ -62,6 +62,7 @@ full prompt false + x64 bin\Release\ @@ -86,6 +87,7 @@ none prompt false + x64 true @@ -93,7 +95,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -104,7 +106,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/Utils/Utils.csproj b/PROMS/ReferencedObjects/LibSource/Utils/Utils.csproj index fee231fd..fc072007 100644 --- a/PROMS/ReferencedObjects/LibSource/Utils/Utils.csproj +++ b/PROMS/ReferencedObjects/LibSource/Utils/Utils.csproj @@ -77,6 +77,7 @@ full prompt false + x64 bin\Release\ @@ -101,6 +102,7 @@ none prompt false + x64 true @@ -108,7 +110,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -119,7 +121,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/VlnProfiler/VlnProfiler.csproj b/PROMS/ReferencedObjects/LibSource/VlnProfiler/VlnProfiler.csproj index 5c482323..df4f647e 100644 --- a/PROMS/ReferencedObjects/LibSource/VlnProfiler/VlnProfiler.csproj +++ b/PROMS/ReferencedObjects/LibSource/VlnProfiler/VlnProfiler.csproj @@ -7,7 +7,7 @@ true - x86 + x64 prompt false @@ -73,6 +73,7 @@ full prompt false + x64 bin\Release\ @@ -97,6 +98,7 @@ none prompt false + x64 true @@ -104,7 +106,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/VlnStatus/VlnStatus.csproj b/PROMS/ReferencedObjects/LibSource/VlnStatus/VlnStatus.csproj index 1b9f33a0..90978560 100644 --- a/PROMS/ReferencedObjects/LibSource/VlnStatus/VlnStatus.csproj +++ b/PROMS/ReferencedObjects/LibSource/VlnStatus/VlnStatus.csproj @@ -62,6 +62,7 @@ full prompt false + x64 bin\Release\ @@ -86,6 +87,7 @@ none prompt false + x64 true @@ -93,7 +95,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -104,7 +106,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj index 8d2eb87d..2bc18543 100644 --- a/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj +++ b/PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/ctlXMLEditLib.csproj @@ -62,6 +62,7 @@ full prompt false + x64 bin\Release\ @@ -86,6 +87,7 @@ none prompt false + x64 true @@ -93,7 +95,7 @@ DEBUG;TRACE 285212672 full - x86 + x64 prompt false @@ -104,7 +106,7 @@ true - x86 + x64 prompt false diff --git a/PROMS/RoAccessToSql/RoAccessToSql.cs b/PROMS/RoAccessToSql/RoAccessToSql.cs index 9c2a23e4..afe5a3ae 100644 --- a/PROMS/RoAccessToSql/RoAccessToSql.cs +++ b/PROMS/RoAccessToSql/RoAccessToSql.cs @@ -229,7 +229,7 @@ namespace RoAccessToSql if (sqlConnection.State == ConnectionState.Open) { // now try to open access db: - string strDatabaseConnectionCommand = "Provider=Microsoft.Jet.OLEDB.4.0;Password=\"\";User ID=Admin;Data Source=" + MSAccessPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; + string strDatabaseConnectionCommand = "Provider=Microsoft.ACE.OLEDB.12.0;Password=\"\";User ID=Admin;Data Source=" + MSAccessPath + "\\ROMaster.mdb;Mode=Share Deny None;Extended Properties=\"\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Database Password=\"\";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; using (OleDbConnection accessConnection = new OleDbConnection(strDatabaseConnectionCommand)) { try diff --git a/PROMS/RoAccessToSql/RoAccessToSql.csproj b/PROMS/RoAccessToSql/RoAccessToSql.csproj index 87f2089f..d956be8a 100644 --- a/PROMS/RoAccessToSql/RoAccessToSql.csproj +++ b/PROMS/RoAccessToSql/RoAccessToSql.csproj @@ -100,6 +100,17 @@ + + + {4AC9E1DA-5BAD-4AC7-86E3-24F4CDCECA28} + 12 + 0 + 0 + primary + False + True + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - Private - - - Private - - - False - - - (Default) - - - False - - - False - - - 8, 8 - - - True - - - 80 - - - StatusBarFrm - - - True - - - Private - - \ No newline at end of file diff --git a/PROMS/VEPROMS/VlnStatus64/StatusMessageFrm.cs b/PROMS/VEPROMS/VlnStatus64/StatusMessageFrm.cs deleted file mode 100644 index 386d145c..00000000 --- a/PROMS/VEPROMS/VlnStatus64/StatusMessageFrm.cs +++ /dev/null @@ -1,140 +0,0 @@ -/********************************************************************************************* - * Copyright 2002 - Volian Enterprises, Inc. All rights reserved. - * Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - * ------------------------------------------------------------------------------ - * $Workfile: StatusMessageFrm.cs $ $Revision: 3 $ - * $Author: Jsj $ $Date: 5/11/04 9:30a $ - * - * $History: StatusMessageFrm.cs $ - * - * ***************** Version 3 ***************** - * User: Jsj Date: 5/11/04 Time: 9:30a - * Updated in $/LibSource/VlnStatus - * - * ***************** Version 2 ***************** - * User: Jsj Date: 11/26/02 Time: 3:38p - * Updated in $/LibSource/VlnStatus - * Added overbounds check - *********************************************************************************************/ - -using System; -using System.Drawing; -using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; - -namespace VlnStatus -{ - /// - /// Create status message window. - /// - public class StatusMessageFrm : System.Windows.Forms.Form - { - private System.Windows.Forms.Label lblStatMsg; - /// - /// Required designer variable. - /// - private System.ComponentModel.Container components = null; - - public StatusMessageFrm() - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - } - - public StatusMessageFrm(string StatTitle) - { - // - // Required for Windows Form Designer support - // - InitializeComponent(); - - Text = StatTitle; - } - - /// - /// Clean up any resources being used. - /// - protected override void Dispose( bool disposing ) - { - if( disposing ) - { - if(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.lblStatMsg = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // lblStatMsg - // - this.lblStatMsg.Location = new System.Drawing.Point(19, 20); - this.lblStatMsg.Name = "lblStatMsg"; - this.lblStatMsg.Size = new System.Drawing.Size(420, 81); - this.lblStatMsg.TabIndex = 0; - this.lblStatMsg.Text = "Put Status Message Here"; - this.lblStatMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // StatusMessageFrm - // - this.AutoScaleBaseSize = new System.Drawing.Size(7, 19); - this.ClientSize = new System.Drawing.Size(457, 117); - this.ControlBox = false; - this.Controls.Add(this.lblStatMsg); - this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "StatusMessageFrm"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Status"; - this.TopMost = true; - this.Load += new System.EventHandler(this.StatusMessageFrm_Load); - this.ResumeLayout(false); - - } - #endregion - - private void StatusMessageFrm_Load(object sender, System.EventArgs e) - { - - } - - public string StatusMessage - { - get - { - return lblStatMsg.Text; - } - set - { - lblStatMsg.Text = value; - lblStatMsg.Refresh(); - } - } - - public string StatusBoxTitle - { - get - { - return Text; - } - set - { - Text = value; - } - } - } -} diff --git a/PROMS/VEPROMS/VlnStatus64/StatusMessageFrm.resx b/PROMS/VEPROMS/VlnStatus64/StatusMessageFrm.resx deleted file mode 100644 index 7edd5b3c..00000000 --- a/PROMS/VEPROMS/VlnStatus64/StatusMessageFrm.resx +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - - Private - - - Private - - - False - - - (Default) - - - False - - - False - - - 8, 8 - - - StatusMessageFrm - - - True - - - 80 - - - True - - - Private - - \ No newline at end of file diff --git a/PROMS/VEPROMS/VlnStatus64/VlnStatus64.csproj b/PROMS/VEPROMS/VlnStatus64/VlnStatus64.csproj deleted file mode 100644 index b0ea1627..00000000 --- a/PROMS/VEPROMS/VlnStatus64/VlnStatus64.csproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Debug - AnyCPU - {797DE52C-278C-41D4-8B65-B9CFC02DDCD9} - Library - Properties - VlnStatus64 - VlnStatus64 - v4.8.1 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x64 - - - - - - - - - - - - Form - - - Form - - - - - - - - - - \ No newline at end of file diff --git a/PROMS/VEPROMS/VlnStatus64/VlnStatusBar.cs b/PROMS/VEPROMS/VlnStatus64/VlnStatusBar.cs deleted file mode 100644 index a7a4e2cd..00000000 --- a/PROMS/VEPROMS/VlnStatus64/VlnStatusBar.cs +++ /dev/null @@ -1,148 +0,0 @@ -/********************************************************************************************* - * Copyright 2002 - Volian Enterprises, Inc. All rights reserved. - * Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - * ------------------------------------------------------------------------------ - * $Workfile: VlnStatusBar.cs $ $Revision: 4 $ - * $Author: Jsj $ $Date: 11/26/02 4:25p $ - * - * $History: VlnStatusBar.cs $ - * - * ***************** Version 4 ***************** - * User: Jsj Date: 11/26/02 Time: 4:25p - * Updated in $/LibSource/VlnStatus - * fixed problem with counter - * - * ***************** Version 3 ***************** - * User: Jsj Date: 11/26/02 Time: 3:38p - * Updated in $/LibSource/VlnStatus - * Added overbounds check - *********************************************************************************************/ -using System; - -namespace VlnStatus -{ - /// - /// Creates a Status Window with a progression bar control. - /// - /// This class has two constructors. One allows you to pass in the title - /// of the Status Box. The Other provides a default title of "Status". - /// The Status Box Title can also be set/changed via the StatusBoxTitle - /// property. - /// - /// - /// - public class VlnStatusBar - { - StatusBarFrm StatBar; - private int Cnt; - - // Create a status window with the default title of "Status" - public VlnStatusBar() - { - StatBar = new StatusBarFrm(); - StatBar.Show(); - } - - // Create a status window with the passed in title - public VlnStatusBar(string Title) - { - StatBar = new StatusBarFrm(Title); - StatBar.Show(); - } - - // Increament the the status bar by the passed in value. - public void PerformStep(int val) - { -// StatBar.Value = val; -// Cnt = val; - BarValue = val; - StatBar.PerformStep(); - } - - // Increament the the status bar by one - public void PerformStep() - { -// StatBar.Value = StatBar.Value + 1; - Cnt++; - BarValue = Cnt; - StatBar.PerformStep(); - } - - // This property gets or sets the current status bar value. - public int BarValue - { - get - { - return StatBar.Value; - } - set - { - StatBar.Value = value; - Cnt = value; - } - } - - // This property sets or gets the maximum value that the - // BarValue property can be. i.e. when BarValue reaches this - // number, the status bar is completely displayed. - public int BarMax - { - get - { - return StatBar.Maximum; - } - set - { - StatBar.Maximum = value; - } - } - - // This property sets or gets the increamenting value used to - // move the status bar. For example, if set to 5, each tick of - // the status bar represents a value of 5. - public int BarStepValue - { - get - { - return StatBar.Step; - } - set - { - StatBar.Step = value; - } - } - - // This property sets or gets the message above the status bar. - public string StatMsg - { - get - { - return StatBar.StatusMessage; - } - set - { - StatBar.StatusMessage = value; - } - } - - // This property sets or gets the Status Window Title - public string StatusBoxTitle - { - get - { - return StatBar.StatusBoxTitle; - } - set - { - StatBar.StatusBoxTitle = value; - } - } - - public void Dispose() - { - StatBar.Dispose(); - } - - } -} - diff --git a/PROMS/VEPROMS/VlnStatus64/VlnStatusMessage.cs b/PROMS/VEPROMS/VlnStatus64/VlnStatusMessage.cs deleted file mode 100644 index e0221ee8..00000000 --- a/PROMS/VEPROMS/VlnStatus64/VlnStatusMessage.cs +++ /dev/null @@ -1,79 +0,0 @@ -/********************************************************************************************* - * Copyright 2002 - Volian Enterprises, Inc. All rights reserved. - * Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - * ------------------------------------------------------------------------------ - * $Workfile: VlnStatusMessage.cs $ $Revision: 3 $ - * $Author: Jsj $ $Date: 11/26/02 3:38p $ - * - * $History: VlnStatusMessage.cs $ - * - * ***************** Version 3 ***************** - * User: Jsj Date: 11/26/02 Time: 3:38p - * Updated in $/LibSource/VlnStatus - * Added overbounds check - *********************************************************************************************/ - -using System; - -namespace VlnStatus -{ - /// - /// Creates a Status Window to display a status message. - /// - /// This class has two constructors. One allows you to pass in the title - /// of the Status Box. The Other provides a default title of "Status". - /// The Status Box Title can also be set/changed via the StatusBoxTitle - /// property. - /// - /// - public class VlnStatusMessage - { - StatusMessageFrm StatusMessageBox; - - // Create a status window with the default title of "Status" - public VlnStatusMessage() - { - StatusMessageBox = new StatusMessageFrm(); - StatusMessageBox.Show(); - } - - // Create a status window with the passed in title. - public VlnStatusMessage(string StatusBoxTitle) - { - StatusMessageBox = new StatusMessageFrm(StatusBoxTitle); - StatusMessageBox.Show(); - } - - // This property gets or sets the current status message - public string StatusMessage - { - get - { - return StatusMessageBox.StatusMessage; - } - set - { - StatusMessageBox.StatusMessage = value; - } - } - - // This property gets or sets the status box title - public string StatusBoxTitle - { - get - { - return StatusMessageBox.StatusBoxTitle; - } - set - { - StatusMessageBox.StatusBoxTitle = value; - } - } - - public void Dispose() - { - StatusMessageBox.Dispose(); - } - - } -} diff --git a/PROMS/Volian.Base.Library/VlnSettings.cs b/PROMS/Volian.Base.Library/VlnSettings.cs index 2c1c430b..25d4aeaa 100644 --- a/PROMS/Volian.Base.Library/VlnSettings.cs +++ b/PROMS/Volian.Base.Library/VlnSettings.cs @@ -197,7 +197,7 @@ namespace Volian.Base.Library set { VlnSettings._UserID = value; } } private static bool _StepTypeToolTip = false; - public static bool StepTypeToolType + public static bool StepTypeToolTip { get { return VlnSettings._StepTypeToolTip; } set { VlnSettings._StepTypeToolTip = value; } diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs index 1ee963a9..5c2552de 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs @@ -188,7 +188,6 @@ namespace Volian.Controls.Library this.tabSearchTypes.Controls.Add(this.tabControlPanel5); this.tabSearchTypes.Controls.Add(this.tabControlPanel2); this.tabSearchTypes.Controls.Add(this.tabControlPanel3); - this.tabSearchTypes.Controls.Add(this.tabControlPanel1); this.tabSearchTypes.Controls.Add(this.contextMenuBar1); this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top; this.tabSearchTypes.Location = new System.Drawing.Point(0, 0); @@ -983,7 +982,6 @@ namespace Volian.Controls.Library this.tabControlPanel1.Controls.Add(this.lblSrchIncTran); this.tabControlPanel1.Controls.Add(this.groupBox1); this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControlPanel1.Location = new System.Drawing.Point(0, 34); this.tabControlPanel1.Name = "tabControlPanel1"; this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1); @@ -997,6 +995,8 @@ namespace Volian.Controls.Library this.tabControlPanel1.Style.GradientAngle = 90; this.tabControlPanel1.TabIndex = 17; this.tabControlPanel1.TabItem = this.tabIncTrans; + this.tabControlPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.tabControlPanel1.RightToLeft = System.Windows.Forms.RightToLeft.No; // // btnTranCvtSelToTxt // @@ -1732,6 +1732,12 @@ namespace Volian.Controls.Library this.Controls.Add(this.xpStepTypes); this.Controls.Add(this.xpSetToSearch); this.Controls.Add(this.tabSearchTypes); + this.Controls.Add(this.tabControlPanel1); + //B2025-056 Click on Incoming Transitions + // This needs to be part of overall control + // since if it is part of tabSearchTypes, + // then when that is disabled, buttons on + // this will be also this.Margin = new System.Windows.Forms.Padding(2); this.Name = "DisplaySearch"; this.RightToLeft = System.Windows.Forms.RightToLeft.Yes; diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index dbca6c18..81c7511a 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -1857,14 +1857,15 @@ namespace Volian.Controls.Library lbSrchResultsIncTrans.Enabled = false; lbSrchResultsIncTrans.UseWaitCursor = true; } - ListBox mylb = sender as ListBox; + //B2025-056 Click on Incoming Transitions + // Clicking on Incoming Transitions + // will now open that item + ListBox mylb_lbSrchResults = sender as ListBox; + ListBoxAdv mylb_lbSrchResultsIncTrans = sender as ListBoxAdv; // If the list is being refreshed, then set the selection index to -1 (no selection) // B2022-044: don't set selection to top of list (commented out/changed if) - //if (mylb != null && _SearchResults.RefreshingList && mylb.SelectedIndex != -1) - // //mylb.SelectedIndex = -1; - //else - if (mylb != null && !_SearchResults.RefreshingList) + if ((mylb_lbSrchResults != null || mylb_lbSrchResultsIncTrans != null) && !_SearchResults.RefreshingList) { _ItemInfo = (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[4]) ? lbSrchResultsIncTrans.SelectedValue as ItemInfo : lbSrchResults.SelectedValue as ItemInfo; if ((tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]) && (_ItemInfo != null)) diff --git a/PROMS/Volian.Controls.Library/DisplayTabControl.cs b/PROMS/Volian.Controls.Library/DisplayTabControl.cs index c516993f..f54f0ea4 100644 --- a/PROMS/Volian.Controls.Library/DisplayTabControl.cs +++ b/PROMS/Volian.Controls.Library/DisplayTabControl.cs @@ -11,6 +11,7 @@ using DevComponents.DotNetBar; using JR.Utils.GUI.Forms; using Volian.Base.Library; using Microsoft.Win32; +using System.Linq; namespace Volian.Controls.Library { @@ -261,24 +262,45 @@ namespace Volian.Controls.Library get { return _ChgId; } set { _ChgId = value; } } + + // C2015-028 Add Editorial Mode to PROMS Step Editor public bool EditorialChange { get { if (_ChgId == null) return true; if (_ChgId == "") return true; - if (_ChgId.ToUpper() == "EC") return true; - return false; - } - } - #endregion - #region Events - /// - /// This event is raised when a the "Tab" of a DisplayItem is clicked with a mouse. - /// So far this has just been used for demo purposes. It could be used to select a - /// step and it's children for the purpose of copying. - /// - public event StepPanelEvent ItemClick; + if (_ChgId.ToUpper() == "EC") { return true;} + + return IsInEditorialMode; + } + } + + // C2015-028 Add Editorial Mode to PROMS Step Editor + // property to hold if button in ribbon is toggled on or off + public bool IsInEditorialMode { get; set; } = false; + + // C2015-028 Add Editorial Mode to PROMS Step Editor + // This is used when button in the ribbon is toggled on/off + // It iterates through all previously opened tabs + // and updates the "Editorial Mode" button + // and background color to match those of the current tab + public void SetEdititorialModeForAllTabs(bool mode) + { + foreach (DisplayTabItem tabItem in _MyDisplayTabItems.Values.Where(tabItem => tabItem.MyStepTabPanel != null)) + { + tabItem.MyStepTabPanel.MyStepTabRibbon.SetEditorialMode(mode); + } + } + + #endregion + #region Events + /// + /// This event is raised when a the "Tab" of a DisplayItem is clicked with a mouse. + /// So far this has just been used for demo purposes. It could be used to select a + /// step and it's children for the purpose of copying. + /// + public event StepPanelEvent ItemClick; /// /// Checks to see if the ItemClick event is handled and launches it /// @@ -581,7 +603,10 @@ namespace Volian.Controls.Library { ItemInfo myItemInfo = myItemInfo2; - if (myItemInfo.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion + bool viewonlymode = false; + + //B2025-046 Remember Tabs failing when swapping versions of PROMS + if (myItemInfo?.MyDocVersion == null) // bug fix: B2016-108 disconnected data will not have a MyDocVersion { FlexibleMessageBox.Show(this, "Possible disconnected item", "Item Not Found"); return null; @@ -597,8 +622,20 @@ namespace Volian.Controls.Library { if (!MySessionInfo.CanCheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message)) { - FlexibleMessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); - return null; + DisplayTabItem dti = MyBar?.Items?.OfType().FirstOrDefault(x => x.MyItemInfo?.ItemID == myItemInfo.MyProcedure.ItemID); + + //C2019-036 View Only mode work with Checked Out Procedures + //shouldn't prompt - should just auto put in view only if already in open tab + //in view only + if ( + (dti != null && dti.MyStepTabPanel.MyStepPanel.VwMode == E_ViewMode.View) + || + (SeparateWindows && VersionID == myItemInfo.MyDocVersion.VersionID) + || //to handle special case where item will be opened in a separate window + MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) + viewonlymode = true; + else + return null; } } else @@ -659,7 +696,7 @@ namespace Volian.Controls.Library // C2023-016 if a Word section and doing Find/Replace don't open Word section, position to section title in step editor instead if (myItemInfo.MyContent.MyEntry == null || doingFindReplace) // If it is not a Word document open in step editor { - return OpenStepTabPage(myItemInfo, setFocus); + return OpenStepTabPage(myItemInfo, setFocus, viewonlymode); } else // Otherwise open it in the Word editor { @@ -1155,7 +1192,7 @@ namespace Volian.Controls.Library //} //public Dictionary dicEnhancedDocuments = new Dictionary(); - private DisplayTabItem OpenStepTabPage(ItemInfo myItemInfo, bool setFocus) + private DisplayTabItem OpenStepTabPage(ItemInfo myItemInfo, bool setFocus, bool viewonlymode = false) { ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item string key = "Item - " + proc.ItemID.ToString(); @@ -1174,7 +1211,7 @@ namespace Volian.Controls.Library } else // If not already open, create a new Page { - pg = new DisplayTabItem(this.components, this, proc, key); // Open a new Procedure Tab + pg = new DisplayTabItem(this.components, this, proc, key, viewonlymode); // Open a new Procedure Tab _MyDisplayTabItems.Add(key, pg); if (setFocus) { diff --git a/PROMS/Volian.Controls.Library/DisplayTabItem.cs b/PROMS/Volian.Controls.Library/DisplayTabItem.cs index cf7db754..8206bf3c 100644 --- a/PROMS/Volian.Controls.Library/DisplayTabItem.cs +++ b/PROMS/Volian.Controls.Library/DisplayTabItem.cs @@ -98,13 +98,18 @@ namespace Volian.Controls.Library } #endregion #region Constructors - public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey) + public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey, bool viewonlymode = false) { _MyItemInfo = myItemInfo; - if (MyItemInfo.MyContent.MyEntry == null) - OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure); - else - OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document); + //C2019-036 View Only mode work with Checked Out Procedures + //don't want to check out if opening in View Only Mode Due to someone else having it checked out + if (!viewonlymode) + { + if (MyItemInfo.MyContent.MyEntry == null) + OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure); + else + OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document); + } //Console.WriteLine("DisplayTabItem"); _MyKey = myKey; _MyDisplayTabControl = myDisplayTabControl; @@ -112,7 +117,7 @@ namespace Volian.Controls.Library InitializeComponent(); this.Click += new EventHandler(DisplayTabItem_Click); if (myItemInfo.MyContent.MyEntry == null) - SetupStepTabPanel(); + SetupStepTabPanel(viewonlymode); else SetupDSOTabPanel(); SetupSecurity(myItemInfo); @@ -128,7 +133,37 @@ namespace Volian.Controls.Library private bool MesssageShown = false; public void SetupSecurity(ItemInfo myItem) { - UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID); + //C2019-036 View Only mode work with Checked Out Procedures + //is in View Only Mode, so do not set up the Security + if (OwnerID == 0) + { + + UserInfo uiViewOnly = UserInfo.GetByUserID(Base.Library.VlnSettings.UserID); + if (uiViewOnly.IsAdministrator()) + { + MyUserRole = $"{Base.Library.VlnSettings.UserID} - Administrator"; + } + else if (uiViewOnly.IsSetAdministrator(myItem.MyDocVersion)) + { + MyUserRole = $"{Base.Library.VlnSettings.UserID} - Set Administrator"; + } + else if (uiViewOnly.IsWriter(myItem.MyDocVersion)) + { + MyUserRole = $"{Base.Library.VlnSettings.UserID} - Writer"; + } + else if (uiViewOnly.IsROEditor(myItem.MyDocVersion)) + { + MyUserRole = $"{Base.Library.VlnSettings.UserID} - RO Editor"; + } + else + { + MyUserRole = $"{Base.Library.VlnSettings.UserID} - Reviewer"; + } + + return; + } + + UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID); if (ui == null) { @@ -246,7 +281,7 @@ namespace Volian.Controls.Library /// /// Creates and sets-up a StepTabPanel /// - private void SetupStepTabPanel() + private void SetupStepTabPanel(bool viewonlymode = false) { ((System.ComponentModel.ISupportInitialize)(_MyDisplayTabControl.MyBar)).BeginInit(); _MyDisplayTabControl.MyBar.SuspendLayout(); @@ -276,7 +311,7 @@ namespace Volian.Controls.Library _MyDisplayTabControl.MyBar.ResumeLayout(false); DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; if (dvi == null) return; - if (dvi.VersionType > 127) + if (dvi.VersionType > 127 || viewonlymode) MyStepTabPanel.MyStepPanel.VwMode = E_ViewMode.View; // C2021 - 027: Procedure level PC/PC - add _MyIteminfo to argument list if (dvi.MultiUnitCount > 1) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 8181c1c1..c0fec876 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -201,11 +201,15 @@ namespace Volian.Controls.Library /// public ItemInfo MyItemInfo { - get { return _MyItemInfo; } + get + { + ToolTipOnOff(); //B2025-050 Show the tooltip based on User Options Settings + return _MyItemInfo; + } set { _MyItemInfo = value; - if (VlnSettings.StepTypeToolType) SetToolTip(_MyItemInfo.ToolTip); + SetToolTip(_MyItemInfo.ToolTip); // B2025-050 always set tooltip text. This method will also show the tooltip based on User Options Settings ChangeBar = _MyItemInfo.HasChangeBar; CheckOff co = _MyItemInfo.GetCheckOffStep(); if (co != null && co.UIMark != null) @@ -2977,6 +2981,8 @@ namespace Volian.Controls.Library public abstract void SetText(); public abstract void SetExpandAndExpander(ItemInfo itemInfo); public abstract void SaveCurrentAndContents(); + public abstract void ToolTipOnOff(); + #endregion private int SupInfoTopOffset { diff --git a/PROMS/Volian.Controls.Library/GridItem.cs b/PROMS/Volian.Controls.Library/GridItem.cs index c26e35c3..1a2292cc 100644 --- a/PROMS/Volian.Controls.Library/GridItem.cs +++ b/PROMS/Volian.Controls.Library/GridItem.cs @@ -462,8 +462,12 @@ namespace Volian.Controls.Library DevComponents.DotNetBar.SuperTooltipInfo tpi = new DevComponents.DotNetBar.SuperTooltipInfo("", "", tip, null, null, DevComponents.DotNetBar.eTooltipColor.Lemon); _MyToolTip.MinimumTooltipSize = new Size(0, 24); _MyToolTip.TooltipDuration = 3; - //_MyToolTip.SetSuperTooltip(MyStepRTB, tpi); _MyToolTip.SetSuperTooltip(MyFlexGrid, tpi); + ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings + } + public override void ToolTipOnOff() + { + _MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings } private bool DoNotRefresh = false; public override void RefreshContent() diff --git a/PROMS/Volian.Controls.Library/ImageItem.cs b/PROMS/Volian.Controls.Library/ImageItem.cs index 698fc85d..879ded63 100644 --- a/PROMS/Volian.Controls.Library/ImageItem.cs +++ b/PROMS/Volian.Controls.Library/ImageItem.cs @@ -9,6 +9,7 @@ using System.IO; using System.Text.RegularExpressions; using VEPROMS.CSLA.Library; using JR.Utils.GUI.Forms; +using Volian.Base.Library; namespace Volian.Controls.Library { @@ -78,7 +79,7 @@ namespace Volian.Controls.Library /// /// Left edge of the PictureBox /// - public override int ContentLeft + override public int ContentLeft { get { return Left + _MyPictureBox.Left; } } @@ -95,8 +96,14 @@ namespace Volian.Controls.Library _MyToolTip.MinimumTooltipSize = new Size(0, 24); _MyToolTip.TooltipDuration = 3; _MyToolTip.SetSuperTooltip(MyPictureBox, tpi); + ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings } - public override void RefreshContent() + public override void ToolTipOnOff() + { + _MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings + } + + override public void RefreshContent() { IdentifyMe(false); RefreshDisplay(false); diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index 1b09a902..cb52e865 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -7,6 +7,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; using VEPROMS.CSLA.Library; +using Volian.Base.Library; namespace Volian.Controls.Library { @@ -133,6 +134,11 @@ namespace Volian.Controls.Library _MyToolTip.MinimumTooltipSize = new Size(0, 24); _MyToolTip.TooltipDuration = 3; _MyToolTip.SetSuperTooltip(MyStepRTB, tpi); + ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings + } + public override void ToolTipOnOff() + { + _MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings } public override void RefreshContent() { @@ -793,27 +799,41 @@ namespace Volian.Controls.Library // if the plant has the change id option, the change id was entered when the program started. // this should be saved for every piece of edited data. Note that the set of config // item Step_MultipleChangeID has the save built in to it. + if (sc == null) sc = new StepConfig(); if (MyStepRTB.MyItemInfo.IsStep && MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds && !this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange) { - //StepConfig sc = MyStepRTB.MyItemInfo.MyConfig as StepConfig; - if (sc == null) sc = new StepConfig(); sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId; - //if (MyStepRTB.MyItemInfo.MyConfig == null) itm.MyContent.Config = sc.ToString(); + } + // C2015-028 Add Editorial Mode to PROMS Step Editor + // if in Editorial Mode, treat it the same as if the ChangeIds are set in the Format file + if (MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode && !existingChangeBar) + { + sc.Step_ChangeIDEditorialMode = Volian.Base.Library.VlnSettings.UserID; + } + else + { + sc.Step_ChangeIDEditorialMode = null; } // B2020-017: If making an editorial change, clear the Change id. Having the change id on // was adding/printing a change bar. + // C2015-028 Add Editorial Mode to PROMS Step Editor + // if in Editorial Mode, treat it the same as if the ChangeIds are set in the Format file if (MyStepRTB.MyItemInfo.IsStep && - MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds - && this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange - && hasChangeBar == false) + (MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds + || MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode + ) + && MyStepPanel.MyStepTabPanel.MyDisplayTabControl.EditorialChange + && !hasChangeBar) { if (sc == null) sc = new StepConfig(); sc.Step_ChangeID = null; } // B2015-024 Have Spell Checker text changes be an editorial change (not assign a change bar but keep existing change bar) - if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck) + // C2015-028 Add Editorial Mode to PROMS Step Editor + // if in Editorial Mode, treat it the same as if the Rditorial SprllCheck flag is set in the Format file + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck || this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode) { if (StepRTB.DidEditorialSpellCheck) { diff --git a/PROMS/Volian.Controls.Library/RtfRawItem.cs b/PROMS/Volian.Controls.Library/RtfRawItem.cs index d2e5e41e..f7664f98 100644 --- a/PROMS/Volian.Controls.Library/RtfRawItem.cs +++ b/PROMS/Volian.Controls.Library/RtfRawItem.cs @@ -97,6 +97,11 @@ namespace Volian.Controls.Library _MyToolTip.MinimumTooltipSize = new Size(0, 24); _MyToolTip.TooltipDuration = 3; _MyToolTip.SetSuperTooltip(MyStepRTB, tpi); + ToolTipOnOff(); // B2025-050 Show the tooltip based on User Options Settings + } + public override void ToolTipOnOff() + { + _MyToolTip.Enabled = VlnSettings.StepTypeToolTip; // B2025-XXX Show the tooltip based on User Options Settings } public override void RefreshContent() { diff --git a/PROMS/Volian.Controls.Library/StepPanel.cs b/PROMS/Volian.Controls.Library/StepPanel.cs index 728ad353..9b47a403 100644 --- a/PROMS/Volian.Controls.Library/StepPanel.cs +++ b/PROMS/Volian.Controls.Library/StepPanel.cs @@ -9,6 +9,7 @@ using System.Drawing; using System.Text.RegularExpressions; using Volian.Base.Library; using JR.Utils.GUI.Forms; +using System.Linq; namespace Volian.Controls.Library { @@ -386,6 +387,26 @@ namespace Volian.Controls.Library // The following line expands the items needed to display SelectedItemInfo ExpandAsNeeded(myItemInfo); } + + //C2019-036 View Only mode work with Checked Out Procedures + public void ResetAll() + { + List itemIDs = Controls.OfType().Where(t => t?.MyItemInfo?.ActiveParent != null && t.MyItemInfo.ActiveParent.GetType() == typeof(ItemInfo)).Select(x => (x.MyItemInfo.ActiveParent as ItemInfo).ItemID).Distinct().ToList(); + + foreach (int itemID in itemIDs) + { + ItemInfo.ResetParts(itemID); + } + + // The following line actually reloads the procedure item + MyProcedureItemInfo = ItemInfo.Get(MyProcedureItemInfo.ItemID, true); + MyProcedureItemInfo.RefreshConfig(); + ContentInfo.Refresh(Content.Get(MyProcedureItemInfo.MyContent.ContentID, true)); + + // The following line expands the items needed to display SelectedItemInfo + ExpandAsNeeded(SelectedItemInfo); + } + /// /// Currently selected StepRTB /// @@ -650,8 +671,13 @@ namespace Volian.Controls.Library /// public Color ActiveColor { - get { return _ActiveColor; } - set { _ActiveColor = value; } + get { + // C2015-028 Add Editorial Mode to PROMS Step Editor + // if in Editorial Mode, use LightGreen background + _ActiveColor = MyStepTabPanel != null && MyStepTabPanel.MyDisplayTabControl.IsInEditorialMode ? Color.LightGreen : Color.SkyBlue; + return _ActiveColor; + } + set { _ActiveColor = value; } } /// /// Gets or Sets the Annotation backcolor for StepRTBs in the Panel diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 6222f8e7..25246c0b 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -3764,7 +3764,12 @@ namespace Volian.Controls.Library public bool SpellCheckNext() { int nBad = C1SpellChecker2.CheckControl(this, false, MySpellCheckDlg); - if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck) + + // C2015-028 Add Editorial Mode to PROMS Step Editor + // if in Editorial Mode, treat it the same as if the EditorialSpellCheck flag is set in the Format file + bool editorialmode = (this.Parent.Parent.Parent as StepTabPanel).MyDisplayTabControl.IsInEditorialMode; + + if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.EditData.EditoralSpellCheck || editorialmode) DidEditorialSpellCheck = MySpellCheckDlg.DidCorrectSpelling; // B2015-024 spell checker in editoral mode return (nBad >= 0); // nBad = -1 means user pressed Cancel button } diff --git a/PROMS/Volian.Controls.Library/StepTabPanel.cs b/PROMS/Volian.Controls.Library/StepTabPanel.cs index c895ed09..a6d501d0 100644 --- a/PROMS/Volian.Controls.Library/StepTabPanel.cs +++ b/PROMS/Volian.Controls.Library/StepTabPanel.cs @@ -120,7 +120,7 @@ namespace Volian.Controls.Library /// private void SetupStepTabRibbon() { - _MyStepTabRibbon = new StepTabRibbon(); + _MyStepTabRibbon = new StepTabRibbon(_MyDisplayTabControl.IsInEditorialMode); _MyStepTabRibbon.Dock = System.Windows.Forms.DockStyle.Top; _MyStepTabRibbon.Location = new System.Drawing.Point(0, 0); _MyStepTabRibbon.Name = "displayTabRibbon1"; diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index bb6c20da..73d494f2 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -16,6 +16,8 @@ using DevComponents.DotNetBar; using Microsoft.Win32; using System.Diagnostics; using JR.Utils.GUI.Forms; +using System.Collections.Concurrent; +using System.Threading.Tasks; namespace Volian.Controls.Library { @@ -959,6 +961,11 @@ namespace Volian.Controls.Library // //SetButtonAndMenuEnabling(false); //} private Bitmap createTextBitmap(char ch) + { + return createTextBitmap(ch, new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel)); + } + + private Bitmap createTextBitmap(char ch, Font objFont) { string txt = string.Format("{0}", ch); Bitmap objBmpImage = new Bitmap(1, 1); @@ -969,8 +976,6 @@ namespace Volian.Controls.Library // Create the Font object for the image text drawing. // later on, we could add logic to use either FreeMono or Arial Unicode MS based on the format being used // but for now, we are going to use FreeMono to create the symbol list - Font objFont = new Font("FreeMono", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); - //Font objFont = new Font("Arial Unicode MS", 18, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); // Create a graphics object to measure the text's width and height. Graphics objGraphics = Graphics.FromImage(objBmpImage); @@ -990,7 +995,6 @@ namespace Volian.Controls.Library objGraphics.SmoothingMode = SmoothingMode.AntiAlias; objGraphics.TextContrast = 0; objGraphics.TextRenderingHint = TextRenderingHint.AntiAlias; - //objGraphics.DrawString(txt, objFont, new SolidBrush(Color.FromArgb(102, 102, 102)), 0, 0); objGraphics.DrawString(txt, objFont, new SolidBrush(Color.Black),0,0); objGraphics.Flush(); return (objBmpImage); @@ -1048,7 +1052,7 @@ namespace Volian.Controls.Library // SetButtonAndMenuEnabling(true); //} #region Constructor - public StepTabRibbon() + public StepTabRibbon(bool? IsInEditorialMode = false) { InitializeComponent(); this.btnInsSupInfo.Tag = string.Format("{0} {1}", (int)E_FromTypes.SupInfos, 1040); // Make type of rno (40) & special case 1000 @@ -1074,8 +1078,16 @@ namespace Volian.Controls.Library // hide the import from Word file if not running in Debug mode if (!VlnSettings.DebugMode) rbnImpWrd.Visible = false; - } - void _RibbonControl_SizeChanged(object sender, EventArgs e) + + // C2015-028 Add Editorial Mode to PROMS Step Editor + // default Editorial Mode to what is set in the DisplayTabControl + SetEditorialMode(IsInEditorialMode != null && (bool) IsInEditorialMode); + + } + + public void SetEditorialMode(bool mode) => btnEditorialMode.Checked = btnCMEditorialMode.Checked = mode; + + void _RibbonControl_SizeChanged(object sender, EventArgs e) { this.Size = _RibbonControl.Size; } @@ -2112,6 +2124,9 @@ namespace Volian.Controls.Library rtabHome.Select(); rtabTableGridTools.Visible = false; SetButtonMenuEnabledDisabledOnStepType(false); + //C2019-036 View Only mode work with Checked Out Procedures + //Is in View Only Mode so show button as selected + btnEditMode.Checked = btnCMEditMode1.Checked = true; this.Refresh(); return; } @@ -3178,7 +3193,7 @@ namespace Volian.Controls.Library btnCMRedo.Enabled = btnRedo.Enabled = _MyStepRTB.CanRedo; btnCMUndo.Enabled = btnUndo.Enabled = _MyStepRTB.CanUndo; } - private void btnGoTo_Click(object sender, EventArgs e) + private void btnGoTo_Click(object sender, EventArgs e) { // if on a transition, go to the selected transition 'to'. If on // a referenced object, bring up ReferencedObject Editor (for now, just put up a message box. @@ -3264,7 +3279,29 @@ namespace Volian.Controls.Library System.Diagnostics.Process.Start(roapp, args); } } - private void btnChgTyp_Click(object sender, EventArgs e) + + // C2015-028 Add Editorial Mode to PROMS Step Editor + private void btnEditorialMode_Click(object sender, EventArgs e) + { + //toggle button is selected + SetEditorialMode(!btnEditorialMode.Checked); + + //set the overall flag in the displaytabcontrol + StepTabPanel tmp = Parent as StepTabPanel; + tmp.MyDisplayTabControl.IsInEditorialMode = btnEditorialMode.Checked; + + //refresh the current item so the background color changes (LightGreen=Editorial Mode, SkyBlue=Normal Selected) + if (MyEditItem != null) + { + _MyEditItem.RefreshContent(); + Application.DoEvents(); + } + + //set other preciously opened tabs to match the state of Editorial Mode in the current tab + tmp.MyDisplayTabControl.SetEdititorialModeForAllTabs(btnEditorialMode.Checked); + } + + private void btnChgTyp_Click(object sender, EventArgs e) { StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Change Step Type"); MyEditItem.MyStepPanel.OnTabDisplay(sender, args); @@ -3332,7 +3369,8 @@ namespace Volian.Controls.Library rtabInsert.Visible = false; rtabAdmin.Visible = false; rtabReview.Select(); - btnCMEditMode1.Enabled = btnEditMode.Enabled = false; // don't allow reviewer toggle out of view mode + btnCMEditMode1.Enabled = btnEditMode.Enabled = btnCMEditorialMode.Enabled = false; // don't allow reviewer toggle out of view mode + btnCMEditorialMode.Visible = false; } } public void SetupROEditorMode() @@ -3360,10 +3398,43 @@ namespace Volian.Controls.Library public void SetupAdminMode() { } + + //C2019-036 View Only mode work with Checked Out Procedures + public event StepTabRibbonEvent EnableDisableStepProperties; + private void OnEnableDisableStepProperties(StepTabRibbonEventArgs args) + { + if (EnableDisableStepProperties != null) + EnableDisableStepProperties(this, args); + } private void btnToggleEditView_Click(object sender, EventArgs e) { if (MyEditItem == null) return; + + //C2019-036 View Only mode work with Checked Out Procedures + string message = string.Empty; + if (MyEditItem.MyStepPanel.VwMode == E_ViewMode.View && !MySessionInfo.CanCheckOutItem(MyEditItem.MyItemInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message)) + { + //someone else has the procedure checked out so cannot swap out of view only mode + message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "\r\n\r\nYou will be unable to turn off View Only Mode for this procedure until it is checked in by the user specified above."); + MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + else if (MyEditItem.MyStepPanel.VwMode == E_ViewMode.View) + { + //swapping into edit mode, so check out procedure and Setup Security + (this.Parent as StepTabPanel).MyDisplayTabItem.OwnerID = MySessionInfo.CheckOutItem(MyEditItem.MyItemInfo.MyProcedure.ItemID, 0); + (this.Parent as StepTabPanel).MyDisplayTabItem.SetupSecurity(MyItemInfo); + } + else + { + //swapping into View Only mode, so check in procedure + OwnerInfo oi = OwnerInfo.GetByItemID(MyEditItem.MyItemInfo.MyProcedure.ItemID, CheckOutType.Procedure); + MySessionInfo.CheckInItem(oi.OwnerID); + } + MyEditItem.MyStepPanel.VwMode = MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? E_ViewMode.View : E_ViewMode.Edit; + //enable / disable the Step Properties Panel based on the ViewMode + OnEnableDisableStepProperties(new StepTabRibbonEventArgs(MyEditItem.MyItemInfo, 0, MyEditItem.MyStepPanel.VwMode)); MyEditItem.ToggleEditView(MyEditItem.MyStepPanel.VwMode); SetButtonAndMenuEnabling(true); SetStepButtonAndMenuEnabling(true); @@ -3377,7 +3448,62 @@ namespace Volian.Controls.Library // btnEnhancedDocSync.Checked = !btnEnhancedDocSync.Checked; //} + //C2019-036 View Only mode work with Checked Out Procedures + // using a blocking collection to make it thread safe in case someone + // spams hitting the refresh button + private BlockingCollection blockingRefreshProcedure = new BlockingCollection(); + //C2019-036 View Only mode work with Checked Out Procedures + private void btnRefreshProcedure_Click(object sender, EventArgs e) + { + //Consumer + Task.Run(() => + { + //Blocks until a newRefresh Procedure Run is available + while (!blockingRefreshProcedure.IsCompleted) + { + _ = blockingRefreshProcedure.Take(); + RefreshProcedure(); + } + }); + + //Producer + Task.Run(() => { blockingRefreshProcedure.Add(true); }); + } + + public void RefreshProcedure() + { + StepTabPanel stab_Panel = Parent as StepTabPanel; + + if (MyEditItem != null) + { + if (!MyEditItem.MyStepPanel.ContainsFocus) + this.Invoke((Action)(() => { MyEditItem.MyStepPanel.Focus(); })); + + E_ViewMode mode = MyEditItem.MyStepPanel.VwMode; + Application.DoEvents(); + this.Invoke((Action)(() => {MyEditItem.MyStepPanel.ResetAll();})); + Application.DoEvents(); + this.Invoke((Action)(() => {MyEditItem.MyStepPanel.Refresh();})); + Application.DoEvents(); + MyEditItem.MyStepPanel.VwMode = mode; + Application.DoEvents(); + } + else if (stab_Panel != null) + { + if (!stab_Panel.MyStepPanel.ContainsFocus) + this.Invoke((Action)(() => {stab_Panel.MyStepPanel.Focus();})); + + E_ViewMode mode = stab_Panel.MyStepPanel.VwMode; + Application.DoEvents(); + this.Invoke((Action)(() => {stab_Panel.MyStepPanel.ResetAll();})); + Application.DoEvents(); + this.Invoke((Action)(() => {stab_Panel.MyStepPanel.Refresh();})); + Application.DoEvents(); + stab_Panel.MyStepPanel.VwMode = mode; + Application.DoEvents(); + } + } private void btnROEdit_Click(object sender, EventArgs e) { if (VlnSettings.ReleaseMode.Equals("DEMO")) @@ -4212,15 +4338,19 @@ namespace Volian.Controls.Library if (oring == eEventSource.Keyboard) _OringFlg = 1; + int selectedSlave = MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave; if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return; if (MyEditItem != null) MyEditItem.SaveCurrentAndContents(); + MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = selectedSlave; OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 0); } private void btnPdfQuickCreate_Click(object sender, EventArgs e) { + int selectedSlave = MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave; if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return; if (MyEditItem != null) MyEditItem.SaveCurrentAndContents(); + MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = selectedSlave; OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 1); } @@ -4883,10 +5013,11 @@ namespace Volian.Controls.Library public class StepTabRibbonEventArgs : EventArgs { public StepTabRibbonEventArgs() { ; } - public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0) + public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0, E_ViewMode viewMode = E_ViewMode.Edit) { _Proc = proc; OringFlg = oringFlg; + ViewMode = viewMode; } private ItemInfo _Proc; @@ -4902,6 +5033,9 @@ namespace Volian.Controls.Library get { return _OringFlg; } set { _OringFlg = value; } } + + //C2019-036 View Only mode work with Checked Out Procedures + public E_ViewMode ViewMode { get; set; } } public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args); diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs index f08f2f5a..a7dc72ad 100644 Binary files a/PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs and b/PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs differ diff --git a/PROMS/Volian.Controls.Library/ToolStripMenuItemwithValue.cs b/PROMS/Volian.Controls.Library/ToolStripMenuItemwithValue.cs new file mode 100644 index 00000000..16f35ab1 --- /dev/null +++ b/PROMS/Volian.Controls.Library/ToolStripMenuItemwithValue.cs @@ -0,0 +1,16 @@ +using System.Windows.Forms; + +namespace Volian.Controls.Library +{ + //ToolStripMenuItem with Added Value Property + public class ToolStripMenuItemwithValue : ToolStripMenuItem + { + public readonly object Value; + + public ToolStripMenuItemwithValue(string text, object value) + { + Value = value; + Text = text; + } + } +} diff --git a/PROMS/Volian.Controls.Library/VlnSpellCheck.cs b/PROMS/Volian.Controls.Library/VlnSpellCheck.cs index 00261916..e9a71054 100644 --- a/PROMS/Volian.Controls.Library/VlnSpellCheck.cs +++ b/PROMS/Volian.Controls.Library/VlnSpellCheck.cs @@ -27,10 +27,26 @@ namespace Volian.Controls.Library while (MyEditItem.SpellCheckNext()) { ItemInfo next = MyEditItem.MyItemInfo.SearchNext; - if (next == null || !next.IsStep) // B2016-063 check if next is not a step type instead of specifically a section - return; // spell check only current section - MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next); - } + //C2025-037 Evaluate the way that Spell Check (in step editor sections) is currently closing after one section. + + if (next == null || next.IsProcedure) // B2016-063 check if next is not a step type instead of specifically a section + { + return; // spell check only current procedure + } + + //If it is a word document, find the next non-word document + while (next.HasWordContent) + { + next = next.SearchNext; + + if (next == null || next.IsProcedure) // B2016-063 check if next is not a step type instead of specifically a section + { + return; // spell check only current procedure + } + } + + MyEditItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next); + } MyEditItem.SetFocus(); } diff --git a/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj b/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj index 42a8db20..21fb8341 100644 --- a/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj +++ b/PROMS/Volian.Controls.Library/Volian.Controls.Library.csproj @@ -384,6 +384,9 @@ TablePropertiesControl.cs + + Component + Component diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 5c1d3608..73889378 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -1269,6 +1269,11 @@ namespace Volian.Controls.Library if (ok) if (pia == null && tn.VEObject as StepInfo == null) cm.MenuItems.Add("Properties...", new EventHandler(mi_Click)); #endregion + #region Refresh_Tree + //C2021-035 Add Refresh Tree Option at highest level + if (tn == (VETreeNode)Nodes[0]) + cm.MenuItems.Add("Refresh Tree", new EventHandler(mi_Click)); + #endregion //_MyLog.WarnFormat("Context Menu 7 - {0}", GC.GetTotalMemory(true)); if (fi != null && fi.HasWorkingDraft) @@ -2352,6 +2357,10 @@ namespace Volian.Controls.Library case "Print All Approved Procedures": //C2025-017 print all approved procedures OnPrintAllApprovedProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); break; + //C2021-035 Add Refresh Tree Option at highest level + case "Refresh Tree": + RefreshTree(); + break; default: if (mi.Text.StartsWith("Showing Change Bars Starting")) OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); @@ -3926,6 +3935,13 @@ namespace Volian.Controls.Library if (Processing != null) Processing(this, new vlnTreeStatusEventArgs(status, message)); } + //C2021-035 Add Refresh Tree Option at highest level + public event vlnTreeViewStatusEvent RefreshFormats; + private void OnRefreshFormats(bool status, string message) + { + if (RefreshFormats != null) + RefreshFormats(this, new vlnTreeStatusEventArgs(status, message)); + } #endregion #region SetLastValuesAndSaveIfChangedStuff private void SetLastValues(VETreeNode node) @@ -4648,6 +4664,36 @@ namespace Volian.Controls.Library if (myFolder.FolderID == ((FolderInfo)obj2).FolderID) return true; return false; } + + //C2021-035 Add Refresh Tree Option at highest level + public void RefreshTree() + { + //reload the base node + VETreeNode tbase = (VETreeNode) Nodes[0]; + tbase.ChildrenLoaded = false; + + //Refresh the formats + OnRefreshFormats(true, "Refreshing Formats"); + + //reset the procedure lists so db is re-queried in case they changed + //also clear other caches in case added steps / sections / etc... + PartInfo.ClearPartInfoCache(); + ItemInfo.ClearItemInfoCache(); + DocVersionInfo.ResetAllProcedures(); + FolderInfo.ClearFolderInfoCache(); + + //Refresh the base VEPROMS object + var fldr = tbase.VEObject as FolderInfo; + if (fldr != null) + { + Invoke((Action)(() => { tbase.VEObject = FolderInfo.Get(fldr.FolderID); })); + } + + //refresh the tree + Invoke((Action)(() => { tbase.RefreshNode(); })); + this.Invoke((Action)(() => { this.Update(); })); + } + } #region DragHelper public class DragHelper diff --git a/PROMS/Volian.Print.Library/PromsPrinter.cs b/PROMS/Volian.Print.Library/PromsPrinter.cs index 90103d95..de678a4b 100644 --- a/PROMS/Volian.Print.Library/PromsPrinter.cs +++ b/PROMS/Volian.Print.Library/PromsPrinter.cs @@ -85,6 +85,14 @@ namespace Volian.Print.Library ProgressSetup, LoadVlnParagraph } + + //B2025-048 Problem with Printing CAS Steps + public enum PromsPrinterPrintType + { + Normal, + CAS_Only, + TCAS_only + } public class PromsPrinter { public bool NeedSupInfoBreak = false; @@ -331,6 +339,18 @@ namespace Volian.Print.Library get { return _MergedPdf; } set { _MergedPdf = value; } } + + //B2025-048 Problem with Printing CAS Steps + // default to Normal + // will skip certain logic if CAS Only or CTS Only + public PromsPrinterPrintType PromsPrinterPrintType { get; set; } = PromsPrinterPrintType.Normal; + + //B2025-054 Wrong Page Numbers in CAS Summary + // when section title continued and CAS + // Flag for when should build the CAS_CTAS + //to avoid overwriting data + public bool ShouldPrint_CAS_CTAS { get; set; } = true; + public PromsPrinter(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, string backgroundFolder, bool openPDF, bool overWrite, ChangeBarDefinition cbd, String pdfFile, bool insertBlankPages, bool batchPrint, string prefix, bool saveLinks, int removeTrailngHardReturnsAndManualPageBreaks, string blankPageText, bool didAll, MergedPdf mergedPdf, string watermarkColor, int PrtSectID = -1) { @@ -1266,7 +1286,7 @@ namespace Volian.Print.Library set { _MyTimeCriticalActSummary = value; } } - public void CreateWordDocPdf(PdfContentByte cb, SectionInfo mySection) + public void CreateWordDocPdf(PdfContentByte cb, SectionInfo mySection) { if (mySection.PageNumber == -1) // If page num transition goes to a section, need the pagenumber of section. { diff --git a/PROMS/Volian.Print.Library/Volian.Print.Library.csproj b/PROMS/Volian.Print.Library/Volian.Print.Library.csproj index 2f0665a3..d4694ccd 100644 --- a/PROMS/Volian.Print.Library/Volian.Print.Library.csproj +++ b/PROMS/Volian.Print.Library/Volian.Print.Library.csproj @@ -99,8 +99,8 @@ - - ..\VEPROMS\VlnStatus64\bin\Debug\VlnStatus64.dll + + ..\ReferencedObjects\LibSource\VlnStatus\bin\Debug\VlnStatus.dll diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index afacd8a5..591ed771 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1855,7 +1855,10 @@ namespace Volian.Print.Library if (doSectionContinue) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, null); // If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it // B2020-164 added check for SpecialCaseCalvert to bypass IsSeparateSubsection STP O-67B-2 step 6.5 - if ((!MyItemInfo.IsSection || MyItemInfo.IsSubsection) && + // B2025-060 no section continue message if previous was not in same section or sub-section + // fixes Vogtle units 3&4 3-AOP-116 Attachments 2 & 3 + if ((!MyItemInfo.IsSection || MyItemInfo.IsSubsection) && + (MyItemInfo.MyPrevious != null && MyItemInfo.ActiveSection == MyItemInfo.MyPrevious.ActiveSection) && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || (MyItemInfo.IsSeparateSubsection || MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert))) { @@ -2159,12 +2162,15 @@ namespace Volian.Print.Library } // If "doSectionTitleContinued" is true then print the section title with "(Continued)" appended to it // format must have ContinueSectinHeader format flag set to true + //B2025-048 Problem with Printing CAS Steps + // skip this if printing CAS or CTAS - was causing it to + // skip/overwrite data if (doSectionTitleContinued) { vlnParagraph sectContPara; string contMsg = (MyItemInfo.ActiveSection != null) ? MyItemInfo.ActiveSection.MyDocStyle.Continue.SectionTitle.AppendToTitle : ""; // C2018-003 fixed use of getting the active section - // For Calvert, the xoffset will be the highest level sections xoffset (there are metasections, - // don't use their xoffset or the continue message is indented too much) + // For Calvert, the xoffset will be the highest level sections xoffset (there are metasections, + // don't use their xoffset or the continue message is indented too much) if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvert) { float secContinueTabXoff = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin; @@ -2184,6 +2190,12 @@ namespace Volian.Print.Library // get to the correct section for the message, i.e. if on a section, the message should be the parent // section (not the activesection which is myself); if on a step, the message should be the active section ItemInfo sectForCont = MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection ? MyItemInfo.MyParent : MyItemInfo.ActiveSection; + //B2025-054 Wrong Page Numbers in CAS Summary + // when section title continued and CAS + //to avoid overwriting data + // - this will be built at a different call to vlnParagraph + if (MyPromsPrinter.PromsPrinterPrintType != PromsPrinterPrintType.Normal) + MyPromsPrinter.ShouldPrint_CAS_CTAS = false; sectContPara = new vlnParagraph(MyParent.MyParent, cb, sectForCont, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter); if (sectContPara.PartsLeft.Count > 0) { @@ -2194,7 +2206,7 @@ namespace Volian.Print.Library vt.XOffset = secContinueTabXoff; vt.Width = secContinueXoff - secContinueTabXoff; sectContPara.XOffset = secContinueXoff; - if ((wd + 12) > secContinueXoff - secContinueTabXoff) // 12 is 2 characters + if ((wd + 12) > secContinueXoff - secContinueTabXoff) // 12 is 2 characters { float dif = wd + 12 - (secContinueXoff - secContinueTabXoff); vt.Width += dif; @@ -2209,12 +2221,20 @@ namespace Volian.Print.Library } else { + //B2025-054 Wrong Step Numbers + // when section title continued and CAS + //to avoid overwriting data + // - this will be built at a different call to vlnParagraph + if (MyPromsPrinter.PromsPrinterPrintType != PromsPrinterPrintType.Normal) + MyPromsPrinter.ShouldPrint_CAS_CTAS = false; sectContPara = new vlnParagraph(MyParent.MyParent, cb, MyItemInfo.ActiveSection, MyParent.XOffset, 0, 0, 0, MyParent.MyItemInfo.ActiveFormat, null, (contMsg == null || contMsg == "") ? " (Continued)" : contMsg, 0, false, MyPromsPrinter); float mytmpfloat = sectContPara.ParagraphToPdf(cb, yTopMargin, yTopMargin, yBottomMargin); if (sectContPara.SectionContinuePrinted) yPageStart -= sectContPara.Height + SixLinesPerInch; } } + //out of section title section - reset this back to true (default) + MyPromsPrinter.ShouldPrint_CAS_CTAS = true; // see if this hls has footnotes, add to the footnote datastructure for processing at end of page. if (MyItemInfo.IsHigh && MyPageHelper.NotesToFootNotesHLS.ContainsKey(MyItemInfo.ItemID)) AddFootNote(cb); @@ -3593,11 +3613,11 @@ namespace Volian.Print.Library BuildPlacekeeper(parent, itemInfo); // Save step text information to be used to create a Continuous Action Summary - BuildContinuousActionSummary(parent, itemInfo); + if (MyPromsPrinter.ShouldPrint_CAS_CTAS) BuildContinuousActionSummary(parent, itemInfo); // F2022-024 Time Critical Step // Save step text information to be used to create a Time Critical Action Summary - BuildTimeCriticalActionSummary(parent, itemInfo); + if (MyPromsPrinter.ShouldPrint_CAS_CTAS) BuildTimeCriticalActionSummary(parent, itemInfo); if (itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj != null) _MyBoxLeftAdj = float.Parse(itemInfo.ActiveFormat.MyStepSectionLayoutData.BoxLeftAdj);