This commit is contained in:
parent
60c807b0bd
commit
be255b4758
@ -73,7 +73,12 @@ namespace Volian.Controls.Library
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsDirty
|
public bool IsDirty
|
||||||
{
|
{
|
||||||
get { return _MyDSOFramer.IsDirty; }
|
get
|
||||||
|
{
|
||||||
|
if (_MyDSOFramer == null) return false;
|
||||||
|
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
|
||||||
|
return !doc.Saved;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public E_ViewMode PanelViewEditMode = E_ViewMode.Edit;
|
public E_ViewMode PanelViewEditMode = E_ViewMode.Edit;
|
||||||
#endregion
|
#endregion
|
||||||
@ -172,14 +177,33 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private void CheckForSymbolCharacters(LBDocumentClass doc)
|
private void CheckForSymbolCharacters(LBDocumentClass doc)
|
||||||
{
|
{
|
||||||
|
if (doc.FontHasSymbolCharacters != null)
|
||||||
if (doc.HasSymbolCharacters)
|
|
||||||
{
|
{
|
||||||
if (MessageBox.Show("This document contains Symbol Characters.\r\n\r\nDo you want to correct this? (Select Yes!)\r\n\r\nAlso, contact Rich, Kathy or John and let them know which Procedure and Section.",
|
// do a string for the log message, depending if this is a libdoc.
|
||||||
"Replace Symbol Characters", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
string msg = null;
|
||||||
|
if (MyDocumentInfo.LibTitle == null || MyDocumentInfo.LibTitle == "")
|
||||||
|
{
|
||||||
|
if (MyDocumentInfo.DocumentEntryCount>0)
|
||||||
|
msg = string.Format("Procedure = {0}, Section {1}", MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyProcedure, MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].DisplayText);
|
||||||
|
else
|
||||||
|
msg = string.Format("Procedure and Section can't be determined");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
msg = string.Format("Library Document: {0}", MyDocumentInfo.LibTitle);
|
||||||
|
if (doc.AttemptToFixASymbolCharacter()) // font is installed correctly, 'fix' this file.
|
||||||
|
{
|
||||||
|
MessageBox.Show(string.Format("This document uses the font {0}, which previously had an error.\r\nThe program will attempt to fix the problem for this Word section.", doc.FontHasSymbolCharacters),
|
||||||
|
"Font Being Corrected", MessageBoxButtons.OK);
|
||||||
doc.FixSymbolCharacters();
|
doc.FixSymbolCharacters();
|
||||||
|
_MyLog.Info(string.Format("Font problem being fixed in Font: {0}, {1}.",doc.FontHasSymbolCharacters, msg));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show(string.Format("This document uses the font {0}, which has an error.\r\n\r\nReinstall this font.", doc.FontHasSymbolCharacters),
|
||||||
|
"Reinstall Font", MessageBoxButtons.OK);
|
||||||
|
_MyLog.Info(string.Format("Font problem found in Font: {0}, {1}.",doc.FontHasSymbolCharacters, msg));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeWordDocument(LBDocumentClass doc)
|
private void InitializeWordDocument(LBDocumentClass doc)
|
||||||
@ -397,7 +421,7 @@ namespace Volian.Controls.Library
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool SaveDirty()
|
public bool SaveDirty()
|
||||||
{
|
{
|
||||||
if (_MyDSOFramer != null && _MyDSOFramer.IsDirty)
|
if (IsDirty)
|
||||||
{
|
{
|
||||||
// Unfortunately, the only way to handle view mode for DSO Framer is to not save.
|
// Unfortunately, the only way to handle view mode for DSO Framer is to not save.
|
||||||
if (PanelViewEditMode == E_ViewMode.View)
|
if (PanelViewEditMode == E_ViewMode.View)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user