Added frmVEPROMS parameter to the constructor so that SessionPing can be disabled.
Added frmVEPROMS parameter to the constructor so that SessionPing can be disabled. Disabled SessionPing when Importing a Procedure Set, Added frmVEPROMS parameter to the constructor so that SessionPing can be disabled. Added logic to disable SessionPing.
This commit is contained in:
@@ -521,7 +521,7 @@ namespace VEPROMS
|
||||
else
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Session);
|
||||
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi);
|
||||
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
if (args.Index == 1 && dlg.MyNewFolder != null)
|
||||
@@ -546,7 +546,7 @@ namespace VEPROMS
|
||||
return;
|
||||
}
|
||||
int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion);
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi);
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi, this);//Added frmVEPROMS Parameter
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
@@ -568,7 +568,7 @@ namespace VEPROMS
|
||||
else
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(pi.ItemID, CheckOutType.Procedure);
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi);
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, this);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
}
|
||||
@@ -717,7 +717,7 @@ namespace VEPROMS
|
||||
}
|
||||
int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion);
|
||||
dvi.DocVersionConfig.SelectedSlave = args.UnitIndex;
|
||||
dlgApproveProcedure dlg = new dlgApproveProcedure(dvi, true);
|
||||
dlgApproveProcedure dlg = new dlgApproveProcedure(dvi, true, this);//Added frmVEPROMS Parameter
|
||||
dlg.MySessionInfo = MySessionInfo;
|
||||
dlg.ShowDialog(this);
|
||||
displayHistory.RefreshList();
|
||||
@@ -738,7 +738,7 @@ namespace VEPROMS
|
||||
}
|
||||
int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion);
|
||||
dvi.DocVersionConfig.SelectedSlave = args.UnitIndex;
|
||||
dlgApproveProcedure dlg = new dlgApproveProcedure(dvi);
|
||||
dlgApproveProcedure dlg = new dlgApproveProcedure(dvi,this);//Added frmVEPROMS Parameter
|
||||
dlg.MySessionInfo = MySessionInfo;
|
||||
dlg.ShowDialog(this);
|
||||
displayHistory.RefreshList();
|
||||
@@ -814,7 +814,7 @@ namespace VEPROMS
|
||||
return;
|
||||
}
|
||||
int ownerid = MySessionInfo.CheckOutItem(pi.ItemID, 0);
|
||||
dlgApproveProcedure dlg = new dlgApproveProcedure(pi);
|
||||
dlgApproveProcedure dlg = new dlgApproveProcedure(pi,this);//Added frmVEPROMS Parameter
|
||||
dlg.MySessionInfo = MySessionInfo;
|
||||
dlg.ShowDialog(this);
|
||||
displayHistory.RefreshList();
|
||||
@@ -1193,14 +1193,27 @@ namespace VEPROMS
|
||||
{
|
||||
get { return _MyCloseTabList; }
|
||||
}
|
||||
private bool _DisablePing = false;
|
||||
public bool DisablePing
|
||||
{
|
||||
get { return _DisablePing; }
|
||||
set
|
||||
{
|
||||
_DisablePing = value;
|
||||
//_MyLog.WarnFormat("DisableSessionPing = {0}", value);
|
||||
}
|
||||
}
|
||||
private void PingSession(Object obj)
|
||||
{
|
||||
MySemaphore.WaitOne();
|
||||
List<int> myList = MySessionInfo.PingSession();
|
||||
foreach (DisplayTabItem dti in tc.MyBar.Items)
|
||||
if (!DisablePing)// If Ping is disabled don't do ping - This was causing a deadlock during import
|
||||
{
|
||||
if (!myList.Contains(dti.OwnerID))
|
||||
MyCloseTabList.PushDTI(dti);
|
||||
List<int> myList = MySessionInfo.PingSession();
|
||||
foreach (DisplayTabItem dti in tc.MyBar.Items)
|
||||
{
|
||||
if (!myList.Contains(dti.OwnerID))
|
||||
MyCloseTabList.PushDTI(dti);
|
||||
}
|
||||
}
|
||||
MySemaphore.Release();
|
||||
}
|
||||
|
Reference in New Issue
Block a user