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 if (!DisablePing)// If Ping is disabled don't do ping - This was causing a deadlock during import
{ {
List<int> myList = MySessionInfo.PingSession(); 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)) foreach (DisplayTabItem dti in tc.MyBar.Items)
MyCloseTabList.PushDTI(dti); {
if (!myList.Contains(dti.OwnerID))
MyCloseTabList.PushDTI(dti);
}
} }
} }
MySemaphore.Release(); MySemaphore.Release();
@ -1334,12 +1338,13 @@ namespace VEPROMS
{ {
//if (SkipRefresh) return; //if (SkipRefresh) return;
//MySemaphore.WaitOne(); //MySemaphore.WaitOne();
Int64 lastChanged = 0; Int64 lastChanged = 0;
//_MyLog.WarnFormat(">>> RefreshChanged"); //_MyLog.WarnFormat(">>> RefreshChanged");
try try
{ {
//Int64 lastChanged = 0; //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) foreach (int id in MySessionInfo.ChangedItems.Keys)
{ {
@ -1348,7 +1353,8 @@ namespace VEPROMS
MyFindNodeAndExpand(id); 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) foreach (int id in MySessionInfo.ChangedContents.Keys)
{ {
if (ContentInfo.IsInCache(id)) if (ContentInfo.IsInCache(id))
@ -1363,8 +1369,8 @@ namespace VEPROMS
} }
} }
} }
lastChanged = MySessionInfo.ChangedContents[id]; lastChanged = MySessionInfo.ChangedContents[id];
} }
MySessionInfo.ChangedItems.Clear(); MySessionInfo.ChangedItems.Clear();
MySessionInfo.ChangedContents.Clear(); MySessionInfo.ChangedContents.Clear();
if (lastChanged > 0) if (lastChanged > 0)
@ -1941,7 +1947,11 @@ namespace VEPROMS
{ {
DisplayTabItem dti = MyCloseTabList.PopDTI(); DisplayTabItem dti = MyCloseTabList.PopDTI();
if (dti.MyDSOTabPanel != null) if (dti.MyDSOTabPanel != null)
{
dti.MyDSOTabPanel.OverrideClose = true; dti.MyDSOTabPanel.OverrideClose = true;
// Add error log message for forced check-in
_MyLog.WarnFormat("===============Override Close====================");
}
tc.CloseTabItem(dti); tc.CloseTabItem(dti);
} }
tmrCloseTabItems.Enabled = true; tmrCloseTabItems.Enabled = true;
@ -3233,7 +3243,8 @@ namespace VEPROMS
ctrlAnnotationDetails.Enabled = true; ctrlAnnotationDetails.Enabled = true;
if (args.MyEditItem.MyItemInfo.IsSection || args.MyEditItem.MyItemInfo.IsProcedure) 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; infotabTags.Visible = false;
displayTags.Visible = false; displayTags.Visible = false;
} }
@ -3259,7 +3270,7 @@ namespace VEPROMS
displayTags.IsVisible = true; displayTags.IsVisible = true;
} }
infotabHistory.Visible = 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; infotabApplicability.Visible = true;
displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo; displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo;
@ -3288,7 +3299,7 @@ namespace VEPROMS
displayRO.ProgressBar = bottomProgBar; 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); _CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted);
dlgFindReplace.MyEditItem = args.MyEditItem; dlgFindReplace.MyEditItem = args.MyEditItem;
SpellChecker.MyEditItem = args.MyEditItem; SpellChecker.MyEditItem = args.MyEditItem;
@ -3322,6 +3333,12 @@ namespace VEPROMS
else else
{ {
SelectedDVI = args.MyItemInfo.MyDocVersion; 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.ROTypeFilter = E_ROValueType.All; // allow all RO types for Word attachments (but fix)
displayRO.SetFindDocROButton(true); displayRO.SetFindDocROButton(true);
} }