Added Edit/Initialized config to the Documents
Check to see if MSWord changes should be saved if PROMS is closing
This commit is contained in:
parent
58d3fcc524
commit
0b3693fef8
@ -270,7 +270,9 @@ namespace DataLoader
|
||||
}
|
||||
private int SaveWordDoc(string temppath, string stype, string sectName)
|
||||
{
|
||||
return SaveWordDoc(temppath, String.Empty, stype, null, sectName);
|
||||
ConfigInfo ci = new ConfigInfo(null);
|
||||
ci.AddItem("Edit", "Initialized", "true");
|
||||
return SaveWordDoc(temppath, String.Empty, stype, ci, sectName);
|
||||
}
|
||||
private int SaveTheDoc(string temppath, string title, ConfigInfo ci, string ascii)
|
||||
{
|
||||
|
@ -70,6 +70,7 @@ namespace DataLoader
|
||||
ConfigInfo ci = new ConfigInfo(null);
|
||||
string title = null; // for docname, remove the '.lib', i.e. substring(0,8)
|
||||
DateTime dts = DateTime.Now;
|
||||
ci.AddItem("Edit", "Initialized", "true");
|
||||
string tmpRtfFileName = GetLibDocData(fi, ci, ref title);
|
||||
int Docid = SaveWordDoc(tmpRtfFileName, title, null, ci, string.Empty);
|
||||
File.Delete(tmpRtfFileName);
|
||||
|
@ -67,6 +67,24 @@ namespace VEPROMS.CSLA.Library
|
||||
OnPropertyChanged("LibDoc_Comment");
|
||||
}
|
||||
}
|
||||
[Category("Edit")]
|
||||
[DisplayName("Initialized")]
|
||||
[Description("Initialized")]
|
||||
public bool Edit_Initialized
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = _Xp["Edit", "Initialized"];
|
||||
if (s == string.Empty) // If there is no value, then default to false
|
||||
s = "false"; // default
|
||||
return bool.Parse(s);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Xp["Edit", "Initialized"] = value.ToString();
|
||||
OnPropertyChanged("Edit_Initialized");
|
||||
}
|
||||
}
|
||||
// RHM 20110415 - These are now stored in the PDF table.
|
||||
//[Category("Printing")]
|
||||
//[DisplayName("Length")]
|
||||
|
@ -330,6 +330,7 @@ namespace VEPROMS.CSLA.Library
|
||||
doc.DocAscii = ascii;
|
||||
//doc.UpdateDocAscii(_MyFile.FullName);
|
||||
DocumentConfig cfg = new DocumentConfig(doc);
|
||||
cfg.Edit_Initialized = true;
|
||||
doc.Config = cfg.ToString();
|
||||
doc.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||
doc.DTS = _MyFile.LastWriteTime;
|
||||
|
@ -350,6 +350,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsBeingDeleted)
|
||||
SaveDirty();
|
||||
this.Enter -= new EventHandler(DSOTabPanel_Enter);
|
||||
// this.Leave -= new EventHandler(DSOTabPanel_Leave);
|
||||
// SaveDirty(); // SaveDirty happens in CloseDSO(bool)
|
||||
@ -415,6 +417,7 @@ namespace Volian.Controls.Library
|
||||
try
|
||||
{
|
||||
_MyDSOFramer.Save();
|
||||
_MyDSOFramer_OnSaveCompleted(this, null);
|
||||
// These are handled in the method above
|
||||
//LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
|
||||
//MyDSOFile.FullName = GetReflectiveProperty(_MyDSOFramer.ActiveDocument, "FullName");
|
||||
@ -476,8 +479,6 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (_MyDSOFramer != null)
|
||||
{
|
||||
if(!IsBeingDeleted)
|
||||
SaveDirty();
|
||||
_MyDSOFramer.Close();
|
||||
Controls.Remove(_MyDSOFramer);
|
||||
components.Remove(_MyDSOFramer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user