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:
@@ -19,6 +19,12 @@ namespace VEPROMS
|
||||
#region Log4Net
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
#endregion
|
||||
frmVEPROMS _MyFrmVEPROMS = null;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
public frmVEPROMS MyFrmVEPROMS
|
||||
{
|
||||
get { return _MyFrmVEPROMS; }
|
||||
set { _MyFrmVEPROMS = value; }
|
||||
}
|
||||
private bool _ConvertROsToTextDuringImport = false;
|
||||
private bool _ConvertROsAndTransitionsToText = false; // set to true when Approval creates an Export file
|
||||
|
||||
@@ -59,22 +65,25 @@ namespace VEPROMS
|
||||
xa.InnerText = value;
|
||||
return xa;
|
||||
}
|
||||
public dlgExportImport(string mode, FolderInfo folderInfo)
|
||||
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS)
|
||||
{
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyMode = mode;
|
||||
MyFolder = folderInfo;
|
||||
InitializeComponent();
|
||||
this.Text = mode + " Dialog for " + folderInfo.Name;
|
||||
}
|
||||
public dlgExportImport(string mode, DocVersionInfo docVersionInfo)
|
||||
{
|
||||
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS)
|
||||
{
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyMode = mode;
|
||||
MyDocVersion = docVersionInfo;
|
||||
InitializeComponent();
|
||||
this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name;
|
||||
}
|
||||
public dlgExportImport(string mode, ProcedureInfo procedureInfo)
|
||||
{
|
||||
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS)
|
||||
{
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyMode = mode;
|
||||
MyProcedure = procedureInfo;
|
||||
InitializeComponent();
|
||||
@@ -218,9 +227,11 @@ namespace VEPROMS
|
||||
if (MyFolder != null) // import a folder - a .expx file
|
||||
{
|
||||
TurnChangeManagerOff.Execute();
|
||||
MyFrmVEPROMS.DisablePing = true;// Turn-off SessionPing
|
||||
TryToLoadImportDataDocument();// Added Try Catch Error Handling to assure that the Change Manager is tuned-on
|
||||
MyDocVersion = null;
|
||||
isImported = true;
|
||||
MyFrmVEPROMS.DisablePing = false;// Turn-on SessionPing
|
||||
TurnChangeManagerOn.Execute();
|
||||
}
|
||||
if (MyDocVersion != null) // import a procedure - a .pxml file
|
||||
@@ -3013,23 +3024,37 @@ namespace VEPROMS
|
||||
{
|
||||
XmlNode image = nd.SelectSingleNode("image");
|
||||
int imageid = int.Parse(image.Attributes.GetNamedItem("imageid").InnerText);
|
||||
ROImage roimage = ROImage.Get(imageid);
|
||||
string config;
|
||||
DateTime dts;
|
||||
string userid;
|
||||
if (roimage == null)
|
||||
using (ROImage roimage = ROImage.GetJustROImage(imageid))//Dispose when done
|
||||
{
|
||||
string filename = image.Attributes.GetNamedItem("filename").InnerText;
|
||||
byte[] content = Convert.FromBase64String(image.Attributes.GetNamedItem("content").InnerText);
|
||||
config = image.Attributes.GetNamedItem("config").InnerText;
|
||||
dts = DateTime.Parse(image.Attributes.GetNamedItem("dts").InnerText);
|
||||
userid = image.Attributes.GetNamedItem("userid").InnerText;
|
||||
roimage = ROImage.MakeROImage(MyRODb, filename, content, config, dts, userid);
|
||||
string config;
|
||||
DateTime dts;
|
||||
string userid;
|
||||
if (roimage == null)
|
||||
{
|
||||
string filename = image.Attributes.GetNamedItem("filename").InnerText;
|
||||
byte[] content = Convert.FromBase64String(image.Attributes.GetNamedItem("content").InnerText);
|
||||
config = image.Attributes.GetNamedItem("config").InnerText;
|
||||
dts = DateTime.Parse(image.Attributes.GetNamedItem("dts").InnerText);
|
||||
userid = image.Attributes.GetNamedItem("userid").InnerText;
|
||||
// Dispose when done
|
||||
using (ROImage roimage1 = ROImage.MakeROImage(MyRODb, filename, content, config, dts, userid))
|
||||
{
|
||||
config = nd.Attributes.GetNamedItem("config").InnerText;
|
||||
dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||
userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||
// Dispose when done
|
||||
using(Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid)){;}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
config = nd.Attributes.GetNamedItem("config").InnerText;
|
||||
dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||
userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||
// Dispose when done
|
||||
using(Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid)){;}
|
||||
}
|
||||
}
|
||||
config = nd.Attributes.GetNamedItem("config").InnerText;
|
||||
dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||
userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||
Figure fig = Figure.MakeFigure(rofst, roimage, config, dts, userid);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user