This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user