This commit is contained in:
2011-04-27 11:20:02 +00:00
parent 385bfc09e0
commit 6ae9eb9653
2 changed files with 24 additions and 2 deletions

View File

@@ -325,7 +325,21 @@ namespace Volian.Controls.Library
}
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
MyDSOFile.FullName = GetReflectiveProperty(_MyDSOFramer.ActiveDocument, "FullName");
MyDSOFile.SaveFile(doc.Length,doc.Ascii,MyDisplayTabItem.MyItemInfo);
// if this was a library document, ask user if it should be saved for all usages.
bool cvtLibDoc = false;
EntryInfo myei = MyDisplayTabItem.MyItemInfo.MyContent.MyEntry;
if (myei != null && myei.MyDocument != null && myei.MyDocument.LibTitle != null && myei.MyDocument.LibTitle != "")
{
DialogResult ans = MessageBox.Show("Save as Library Document for all usages?", "Document Save", MessageBoxButtons.YesNo);
if (ans == DialogResult.No) cvtLibDoc = true;
}
MyDSOFile.SaveFile(doc.Length,doc.Ascii,MyDisplayTabItem.MyItemInfo, cvtLibDoc);
if (cvtLibDoc)
{
MyDisplayTabItem.Text = MyDisplayTabItem.MyItemInfo.TabTitle;
MyDisplayTabItem.Tooltip = MyDisplayTabItem.MyItemInfo.TabToolTip;
MyDisplayTabItem.SetPrivateTooltip(MyDisplayTabItem.MyItemInfo.TabToolTip);
}
}
/// <summary>
/// Before a document closes check to see if it's contents should be saved.