B2017-244 Open RO Panel for MSWord sections

B2017-245 Leave RO Menu expanded for Section Titles or Procedure Titles.
B2017-247 Added Error Handling for PingSession so that the code will not crash
B2017-250 Added an error log message when a procedure or MSWord section is forced closed by the administrator.
This commit is contained in:
Rich 2017-11-06 16:47:10 +00:00
parent 0d8be26409
commit 95ae4efc58

View File

@ -1291,10 +1291,14 @@ namespace VEPROMS
if (!DisablePing)// If Ping is disabled don't do ping - This was causing a deadlock during import
{
List<int> myList = MySessionInfo.PingSession();
foreach (DisplayTabItem dti in tc.MyBar.Items)
// B2017-247 Error Handler for Ping Session
if (myList != null)
{
if (!myList.Contains(dti.OwnerID))
MyCloseTabList.PushDTI(dti);
foreach (DisplayTabItem dti in tc.MyBar.Items)
{
if (!myList.Contains(dti.OwnerID))
MyCloseTabList.PushDTI(dti);
}
}
}
MySemaphore.Release();
@ -1334,12 +1338,13 @@ namespace VEPROMS
{
//if (SkipRefresh) return;
//MySemaphore.WaitOne();
Int64 lastChanged = 0;
//_MyLog.WarnFormat(">>> RefreshChanged");
Int64 lastChanged = 0;
//_MyLog.WarnFormat(">>> RefreshChanged");
try
{
//Int64 lastChanged = 0;
if (MySessionInfo.ChangedItems.Count > 0)
// B2017-247 Error Handler for Ping Session
if (MySessionInfo.ChangedItems != null && MySessionInfo.ChangedItems.Count > 0)
{
foreach (int id in MySessionInfo.ChangedItems.Keys)
{
@ -1348,7 +1353,8 @@ namespace VEPROMS
MyFindNodeAndExpand(id);
}
}
if (MySessionInfo.ChangedContents.Count > 0)
// B2017-247 Error Handler for Ping Session
if (MySessionInfo.ChangedContents != null && MySessionInfo.ChangedContents.Count > 0)
foreach (int id in MySessionInfo.ChangedContents.Keys)
{
if (ContentInfo.IsInCache(id))
@ -1363,8 +1369,8 @@ namespace VEPROMS
}
}
}
lastChanged = MySessionInfo.ChangedContents[id];
}
lastChanged = MySessionInfo.ChangedContents[id];
}
MySessionInfo.ChangedItems.Clear();
MySessionInfo.ChangedContents.Clear();
if (lastChanged > 0)
@ -1941,7 +1947,11 @@ namespace VEPROMS
{
DisplayTabItem dti = MyCloseTabList.PopDTI();
if (dti.MyDSOTabPanel != null)
{
dti.MyDSOTabPanel.OverrideClose = true;
// Add error log message for forced check-in
_MyLog.WarnFormat("===============Override Close====================");
}
tc.CloseTabItem(dti);
}
tmrCloseTabItems.Enabled = true;
@ -3233,7 +3243,8 @@ namespace VEPROMS
ctrlAnnotationDetails.Enabled = true;
if (args.MyEditItem.MyItemInfo.IsSection || args.MyEditItem.MyItemInfo.IsProcedure)
{
infotabRO.Visible = infotabTransition.Visible = false;
//infotabRO.Visible = // B2017-245 Allow Ro Menu to be seen for Procedures and Sections
infotabTransition.Visible = false;
infotabTags.Visible = false;
displayTags.Visible = false;
}
@ -3252,14 +3263,14 @@ namespace VEPROMS
}
else
infotabRO.Visible = infotabTransition.Visible = false;
// When infotabTags is set to Visible, the matching panel also needs to be set to visible
// the other panels will appear as they are selected by the user.
infotabControlPanelTags.Visible = true;
displayTags.IsVisible = true;
}
infotabHistory.Visible = true;
if (args.MyItemInfo.MyDocVersion.MultiUnitCount > 1 && !args.MyItemInfo.IsProcedure )
if (args.MyItemInfo.MyDocVersion.MultiUnitCount > 1 && !args.MyItemInfo.IsProcedure)
{
infotabApplicability.Visible = true;
displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo;
@ -3281,14 +3292,14 @@ namespace VEPROMS
// When infotabTags is set to Visible, it is given focus. The next line returns focus to the StepRTB
args.MyEditItem.SetFocus();
displayTransition.MyRTB = args.MyEditItem.MyStepRTB;
displayRO.MyRTB = args.MyEditItem.MyStepRTB;
displayBookMarks.MyEditItem = args.MyEditItem;
displayHistory.MyEditItem = args.MyEditItem;
displayRO.ProgressBar = bottomProgBar;
lblEditView.Text = args.MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? "Edit" : "View" ;
lblEditView.Text = args.MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit ? "Edit" : "View";
_CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted);
dlgFindReplace.MyEditItem = args.MyEditItem;
SpellChecker.MyEditItem = args.MyEditItem;
@ -3322,6 +3333,12 @@ namespace VEPROMS
else
{
SelectedDVI = args.MyItemInfo.MyDocVersion;
//B2017-244 Open RO Panel for MSWord Sections
if (args.MyItemInfo.MyDocVersion.DocVersionAssociationCount > 0)
{
displayRO.MyROFSTLookup = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(args.MyItemInfo.MyDocVersion);
displayRO.MyROFST = args.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
}
displayRO.ROTypeFilter = E_ROValueType.All; // allow all RO types for Word attachments (but fix)
displayRO.SetFindDocROButton(true);
}