Compare commits

...

16 Commits

Author SHA1 Message Date
bd89af5e8c C2019-036 View Only mode work with Checked Out Procedures 2025-11-17 07:05:52 -05:00
b0e4128d3c Merge pull request 'B2025-062 Fixed a null reference bug in the printing of Vogtle Units 3 & 4 AOP-204' (#655) from B2025-062_Vogtle_AOP_Null_Ref into Development
Looks Good. Read for QA!
2025-11-14 11:38:25 -05:00
875a8f101a B2025-062 Fixed a null reference bug in the printing of Vogtle Units 3 & 4 AOP-204 2025-11-14 11:36:23 -05:00
c5a8ef57ac Merge pull request 'B2025-060 Fixes the printing a sub-section top continue message when the section is forced to start on the next page, either by PROMS print logic or when that sub-section is set to separate pagination.' (#654) from B2025_060_SectContPrintBug into Development
Looks Good! Ready for QA!
2025-11-10 09:28:42 -05:00
c8adeed187 B2025-060 Fixes the printing a sub-section top continue message when the section is forced to start on the next page, either by PROMS print logic or when that sub-section is set to separate pagination. 2025-11-10 09:25:26 -05:00
49f5f506d4 Merge pull request 'F2025-036 Removed the Two Column Attachment section style that is no longer needed because it’s identical to the “Attachment - Two Column Step Editor” section style' (#653) from F2025-036_Vogtle_3_4_rmvExtraSectStyle into Development
Format only change.  Good for testing
2025-11-07 09:51:13 -05:00
1c87585570 F2025-036 Removed the Two Column Attachment section style that is no longer needed because it’s identical to the “Attachment - Two Column Step Editor” section style 2025-11-07 09:51:18 -05:00
30eb52da77 Merge pull request 'F2025-035 Change the open/closed parenthesis on the 2nd and 3rd sub-step levelsl to just the close parenthesis' (#652) from F2025-035_Vogtle_3_4_substep_tab into Development
Format only change. Good for testing phase.
2025-11-06 16:00:49 -05:00
6f089482e6 F2025-035 Change the open/closed parenthesis on the 2nd and 3rd sub-step levelsl to just the close parenthesis 2025-11-06 15:58:30 -05:00
8e221cc263 Merge pull request 'F2025-034 Updated Transition format to turn off putting parenthesis around section title and turn off the attempt of title-casing the procedure title.' (#651) from F2025-034_VogtleTransitions into Development
format only change - good for testing phase
2025-11-06 15:14:13 -05:00
441917b670 F2025-034 Updated Transition format to turn off putting parenthesis around section title and turn off the attempt of title-casing the procedure title. 2025-11-06 15:13:50 -05:00
6251de3b38 Merge pull request 'F2025-033 Removed the hard coded text “OPERATOR ACTIONS” from the Two Column Attachment section style in Vogtle Two Column format' (#649) from F2025-033_Vogtle_3&4_Remove_Operator_Actions into Development
Format only change - good for testing
2025-11-05 11:53:01 -05:00
d731125a14 F2025-033 Removed the hard coded text “OPERATOR ACTIONS” from the Two Column Attachment section style in Vogtle Two Column format 2025-11-05 11:51:19 -05:00
d6fe64bc40 Merge pull request 'B2025-058 and B2025-061 Removed the Continuous Action Step indicator from the sub-step number when being referenced in a transition.' (#648) from B2025-058_061_Vogtle_TransitionFix into Development
Looks Good. Ready for QA!
2025-11-04 16:05:13 -05:00
f8b93807ae B2025-058 and B2025-061 Removed the Continuous Action Step indicator from the sub-step number when being referenced in a transition. 2025-11-04 16:01:00 -05:00
2287a111c1 Merge pull request 'F2025-031Corrected “Return To” in ReplaceWords list so that lower cased “return to” will remain lowercased and still be bolded.' (#647) from F2025-031_Vogtle3&4_ReplaceWordsFix into Development
Format only change - good for testing phase
2025-11-03 12:22:25 -05:00
16 changed files with 217 additions and 29 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -98,6 +98,8 @@ namespace VEPROMS
_SelectedStepTabPanel.MyStepTabRibbon.ContActionSummaryRequest += MyStepTabRibbon_ContActionSummaryRequest;
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree -= new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
_SelectedStepTabPanel.MyStepTabRibbon.AddProcToDVInTree += new StepTabRibbonEvent(MyStepTabRibbon_AddProcToDocVersionInTree);
_SelectedStepTabPanel.MyStepTabRibbon.EnableDisableStepProperties -= EnableDisableStepProperties;
_SelectedStepTabPanel.MyStepTabRibbon.EnableDisableStepProperties += new StepTabRibbonEvent(EnableDisableStepProperties);
// F2022-024 Time Critical Action Summary
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest -= MyStepTabRibbon_TimeCriticalActionSummaryRequest;
_SelectedStepTabPanel.MyStepTabRibbon.TimeCriticalActionSummaryRequest += MyStepTabRibbon_TimeCriticalActionSummaryRequest;
@@ -119,7 +121,7 @@ namespace VEPROMS
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi);
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
@@ -372,12 +374,12 @@ namespace VEPROMS
cmbFont.SelectedIndex = -1;
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
string db = Volian.Base.Library.VlnSettings.GetDB();
if (db != null)
Database.SelectedDatabase = db;
//B2018-129 Most Recently Used list was being cleared. Needed to remove a (string) type case in the IF statement
if (!string.IsNullOrEmpty((string)Properties.Settings.Default["DefaultDB"]))
if (!string.IsNullOrEmpty((string)Properties.Settings.Default["DefaultDB"]))
Database.LastDatabase = Properties.Settings.Default.DefaultDB;
// Setup the Context menu for DisplaySearch including the symbols
@@ -416,7 +418,7 @@ namespace VEPROMS
// B2019-107 Error Log message for inconsistent PromsFixes
_MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>{5}"
, Application.ProductVersion, Database.RevDate, Environment.UserDomainName, Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt"), FormatInfo.Failed ?? "");
// C2022-030 Notify the user if the stored procedure in the database are not update to date
// with those in the PROMSFixes.sql delivered with the PROMS executable
string pfVersion = ExeInfo.GetAssocicatedPROMSFixesVersion();
@@ -546,7 +548,7 @@ namespace VEPROMS
tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo);
tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF);
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets);
tv.PrintTransitionReport += new vlnTreeViewEvent(tv_PrintTransitionReport);
tv.ProcessingComplete += tv_ProcessingComplete;
@@ -587,7 +589,7 @@ namespace VEPROMS
}
}
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
void tv_SelectDateToStartChangeBars(object sender, vlnTreeEventArgs args)
{
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
if (pi == null) return;
@@ -1196,6 +1198,7 @@ namespace VEPROMS
if (!MySessionInfo.CanCheckOutItem(pi.ItemID, CheckOutType.Procedure, ref message))
{
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
@@ -2085,7 +2088,10 @@ namespace VEPROMS
{
foreach (DisplayTabItem dti in tc.MyBar.Items)
{
if (!myList.Contains(dti.OwnerID))
//C2019-036 View Only mode work with Checked Out Procedures
// View Only Mode is no longer checked out, so no longer has an OwnerID
// This will keep those tabs from auto-closing based on the timer
if (!myList.Contains(dti.OwnerID) && dti.MyStepTabPanel.MyStepPanel.VwMode != E_ViewMode.View)
{
MyCloseTabList.PushDTI(dti);
}
@@ -3926,6 +3932,7 @@ namespace VEPROMS
string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(args.ProcedureConfig.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
{
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.Cursor = Cursors.Default;
return DialogResult.None;
@@ -3949,6 +3956,7 @@ namespace VEPROMS
string message = string.Empty;
if (!MySessionInfo.CanCheckOutItem(args.SectionConfig.MySection.MySectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
{
message = message.Replace("\r\nWould You like to open the procedure in View Only Mode?", "");
MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
this.Cursor = Cursors.Default;
return DialogResult.None;
@@ -4749,6 +4757,11 @@ namespace VEPROMS
// B2022-026 RO Memory reduction coding (Jakes Merge)
displayRO.SetFindDocROButton(false);
displayRO.LoadTree();
//C2019-036 View Only mode work with Checked Out Procedures
//In View Only Mode - Step Properties should be disabled
EnableDisableStepProperties(sender, new StepTabRibbonEventArgs(args.MyEditItem.MyItemInfo, 0, args.MyEditItem.MyStepPanel.VwMode));
}
else
{
@@ -4780,6 +4793,22 @@ namespace VEPROMS
}
//C2019-036 View Only mode work with Checked Out Procedures
//In View Only Mode - Step Properties should be disabled
public void EnableDisableStepProperties(object sender, StepTabRibbonEventArgs args)
{
if (args.ViewMode == E_ViewMode.View && (infoTabs.Enabled || infoTabs.SelectedTab != infotabTags))
{
infoTabs.Enabled = true;
infoTabs.SelectedTab = infotabTags;
infoTabs.Enabled = false;
}
else if (args.ViewMode != E_ViewMode.View && !infoTabs.Enabled)
{
infoTabs.Enabled = true;
}
}
void _LastStepRTB_EditModeChanged(object sender, EventArgs args)
{
if (_LastStepRTB.EditMode) // going into edit mode in a cell of the grid.

View File

@@ -7984,12 +7984,20 @@ namespace VEPROMS.CSLA.Library
public ProcedureInfo(SafeDataReader dr) : base(dr) { }
#endif
private ProcedureInfo() : base() { ;}
public new static ProcedureInfo Get(int itemID)
public new static ProcedureInfo Get(int itemID, bool forcerefresh = false)
{
//if (!CanGetObject())
// throw new System.Security.SecurityException("User not authorized to view a Item");
try
{
//C2019-036 View Only mode work with Checked Out Procedures
// fixes caching issue
// so this forces a refresh of the cache
if (forcerefresh)
{
_CacheByPrimaryKey.Remove(itemID.ToString());
}
ProcedureInfo tmp = GetCachedByPrimaryKey(itemID);
if (tmp == null)
{

View File

@@ -186,7 +186,7 @@ namespace VEPROMS.CSLA.Library
if (string.IsNullOrEmpty(name))
{ name = tmpproc.DisplayText; }
message = string.Format("The procedure {0} is already checked out to {1}", name, si.UserID);
message = string.Format("The procedure {0} is already checked out to {1}.\r\nWould You like to open the procedure in View Only Mode?", name, si.UserID);
rv = rv && false;
}
else if (si.ProcessID != this.ProcessID && objectType == CheckOutType.Document)

View File

@@ -1145,8 +1145,12 @@ namespace VEPROMS.CSLA.Library
{
//string thisTab = StepInfo.Get(pitem.ItemID).MyTab.CleanText;
string thisTab = pitem.MyTab.CleanText;// StepInfo.Get(pitem.ItemID).MyTab.CleanText;
//B2025-058 remove continuous action indicator
string medittag = pitem.FormatStepData.TabData.MacroEditTag;
if (medittag != null && thisTab.StartsWith(medittag))
thisTab = thisTab.Substring(medittag.Length);
// remove delimiters of '.' and ')' in tab.
if (!hasDelim)
if (!hasDelim)
{
// get list of delimiters to remove from the format:
foreach (string rmvDelim in DelimList) thisTab = thisTab.Replace(rmvDelim, "");

View File

@@ -990,12 +990,21 @@ namespace VEPROMS.CSLA.Library
}
return tmp;
}
public static Content Get(int contentID)
public static Content Get(int contentID, bool forcerefresh = false)
{
if (!CanGetObject())
throw new System.Security.SecurityException("User not authorized to view a Content");
try
{
//C2019-036 View Only mode work with Checked Out Procedures
// fixes caching issue
// this forces a refresh of the cache for a case when need to do a hard refresh
if (forcerefresh)
{
ConvertListToDictionary();
_CacheByPrimaryKey.Remove(contentID.ToString());
}
Content tmp = GetCachedByPrimaryKey(contentID);
if (tmp == null)
{

View File

@@ -603,6 +603,8 @@ namespace Volian.Controls.Library
{
ItemInfo myItemInfo = myItemInfo2;
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
{
@@ -620,8 +622,11 @@ 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;
//C2019-036 View Only mode work with Checked Out Procedures
if (MessageBox.Show(this, message, "Procedure Already Checked Out", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
viewonlymode = true;
else
return null;
}
}
else
@@ -682,7 +687,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
{
@@ -1178,7 +1183,7 @@ namespace Volian.Controls.Library
//}
//public Dictionary<DocVersionInfo, frmEnhanced> dicEnhancedDocuments = new Dictionary<DocVersionInfo, frmEnhanced>();
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();
@@ -1197,7 +1202,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)
{

View File

@@ -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,6 +133,11 @@ namespace Volian.Controls.Library
private bool MesssageShown = false;
public void SetupSecurity(ItemInfo myItem)
{
//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)
return;
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
if (ui == null)
@@ -246,7 +256,7 @@ namespace Volian.Controls.Library
/// <summary>
/// Creates and sets-up a StepTabPanel
/// </summary>
private void SetupStepTabPanel()
private void SetupStepTabPanel(bool viewonlymode = false)
{
((System.ComponentModel.ISupportInitialize)(_MyDisplayTabControl.MyBar)).BeginInit();
_MyDisplayTabControl.MyBar.SuspendLayout();
@@ -276,7 +286,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)

View File

@@ -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<int> itemIDs = Controls.OfType<RTBItem>().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);
}
/// <summary>
/// Currently selected StepRTB
/// </summary>

View File

@@ -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
{
@@ -906,6 +908,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);
@@ -916,8 +923,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);
@@ -937,7 +942,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);
@@ -2067,6 +2071,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;
}
@@ -3338,10 +3345,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);
@@ -3355,7 +3395,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<bool> blockingRefreshProcedure = new BlockingCollection<bool>();
//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"))
@@ -4865,10 +4960,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;
@@ -4884,6 +4980,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);

View File

@@ -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)))
{