Added a missing MAXRECURSION 10000

Changed Through Transition Format and User Interface
Added Automatic Print Options to shutoff DebugText (/NT), DebugPagination (/NP) and Compare (/NC)
Added logic to allow the use of the default path for PDFs.
Update the Print_PDFLocation property of the Working Draft when the user changes the value on the Working Draft property page.  Fixed Bug B2013-117
Set the date/time stamp for the Document based upon the current time.
Make sure that the output is set to Final without revisions and comments before ROs are replaced.
Added function to restore valid previous version of MSWord document if the current version is not a valid document.
Check for Null to eliminate errors.
Removed Unused field DocPDF
Support MSWord document restore function.
Add check for Transition Node count before updating values.
Restore latest valid MSWord document if the current version is not valid.
Eliminate File Commands so that the user can only close the MSWord section, and then verify if the changes to the document will be saved.
This commit is contained in:
Rich
2013-07-01 17:39:15 +00:00
parent 569ed454b8
commit 78add0ccd2
13 changed files with 165 additions and 33 deletions

View File

@@ -90,9 +90,11 @@ namespace Volian.Controls.Library
//private frmPG _frm = null;
#region Constructors
private Timer _RefreshTimer;
public DSOTabPanel(DocumentInfo documentInfo, DisplayTabControl myDisplayTabControl)
private ItemInfo _ItemInfo;
public DSOTabPanel(DocumentInfo documentInfo, DisplayTabControl myDisplayTabControl, ItemInfo itemInfo)
{
_MyDisplayTabControl = myDisplayTabControl;
_ItemInfo = itemInfo;
InitializeComponent();
SetupDSOTabPanel();
_MyDocumentInfo = documentInfo;
@@ -159,14 +161,23 @@ namespace Volian.Controls.Library
{
if (dail.Count > 0)
{
DocumentAuditInfo dai = dail[0];
foreach (DocumentAuditInfo tmpa in dail)
{
if (tmpa.DTS > dai.DTS) dai = tmpa;
}
//DocumentAuditInfo dai = dail[0];
//foreach (DocumentAuditInfo tmpa in dail)
//{
// if (tmpa.DTS > dai.DTS) dai = tmpa;
//}
if(MessageBox.Show("Do you want to revert to a previous version?", "Error in MS Word section",
MessageBoxButtons.YesNo, MessageBoxIcon.Question)==DialogResult.Yes)
fs.Write(dai.DocContent, 0, dai.DocContent.Length);
{
//fs.Write(dai.DocContent, 0, dai.DocContent.Length);
using (Document myDoc = Document.Get(MyDocumentInfo.DocID))
{
myDoc.RestoreWordDoc(_ItemInfo);
_DSOFile = null;
_MyDocumentInfo = DocumentInfo.Get(MyDocumentInfo.DocID);
}
}
}
else
MessageBox.Show("Reverting to Blank Document", "Error in MS Word section",
@@ -175,7 +186,20 @@ namespace Volian.Controls.Library
fs.Close();
this._MyDSOFramer.Open(MyDSOFile.MyFile.FullName);
}
this._MyDSOFramer.Menubar = false;
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
Console.WriteLine("Version {0}", doc.Application.Version);
float ver;
if (!float.TryParse(doc.Application.Version, out ver))
ver = 12.0F;
this._MyDSOFramer.Menubar = ver < 12.0F;
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFileClose, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFileNew, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFilePageSetup, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFilePrint, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFilePrintPreview, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFileProperties, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFileSave, false);
this._MyDSOFramer.set_EnableFileCommand(DSOFramer.dsoFileCommandType.dsoFileSaveAs, false);
this._MyDSOFramer.Titlebar = false;
//if (_MyCount < 20)
// this._MyDSOFramer.FrameHookPolicy = DSOFramer.dsoFrameHookPolicy.dsoResetNow;
@@ -191,7 +215,6 @@ namespace Volian.Controls.Library
//this.GotFocus += new EventHandler(DSOTabPanel_GotFocus);
//this.LostFocus += new EventHandler(DSOTabPanel_LostFocus);
Application.DoEvents();
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
// The following line corrects Symbol characters in MSWord Sections
// CheckForSymbolCharacters(doc);
InitializeWordDocument(doc);
@@ -364,6 +387,8 @@ namespace Volian.Controls.Library
return;
}
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
while (doc.Saved = false)
Application.DoEvents();
string tmp = GetReflectiveProperty(_MyDSOFramer.ActiveDocument, "FullName");
if (System.IO.File.Exists(tmp))
MyDSOFile.FullName = tmp;