Kill the process after closing the main app window. The process was remaining in memory for an extended period of time after it was closed. This removes it from memory immediately.

Added "Fix Symbol Font" button
Don't open a DSOFramer if it fails - Fixed B2012-267.
Replace an automatic function with a manual function to fix Symbol fonts. Fixed B2012-259.
This commit is contained in:
Rich
2012-10-10 19:12:59 +00:00
parent 6e082b3076
commit 537213ee7a
4 changed files with 55 additions and 19 deletions

View File

@@ -166,7 +166,8 @@ namespace Volian.Controls.Library
//this.LostFocus += new EventHandler(DSOTabPanel_LostFocus);
Application.DoEvents();
LBDocumentClass doc = new LBDocumentClass(_MyDSOFramer.ActiveDocument);
CheckForSymbolCharacters(doc);
// The following line corrects Symbol characters in MSWord Sections
// CheckForSymbolCharacters(doc);
InitializeWordDocument(doc);
FindSearchString();
}
@@ -178,10 +179,14 @@ namespace Volian.Controls.Library
// TODO: Should try to do a direct open using Word.
}
}
public void FixSymbolCharacters()
{
CheckForSymbolCharacters(new LBDocumentClass(_MyDSOFramer.ActiveDocument));
}
private void CheckForSymbolCharacters(LBDocumentClass doc)
{
if (doc.FontHasSymbolCharacters != null)
string fontHasSymbolCharacters = doc.FontHasSymbolCharacters;
if (fontHasSymbolCharacters != null)
{
// do a string for the log message, depending if this is a libdoc.
string msg = null;
@@ -196,16 +201,16 @@ namespace Volian.Controls.Library
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);
//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.", fontHasSymbolCharacters),
// "Font Being Corrected", MessageBoxButtons.OK);
doc.FixSymbolCharacters();
_MyLog.Info(string.Format("Font problem being fixed in Font: {0}, {1}.",doc.FontHasSymbolCharacters, msg));
_MyLog.Info(string.Format("Font problem being fixed in Font: {0}, {1}.",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),
MessageBox.Show(string.Format("This document uses the font {0}, which has an error.\r\n\r\nReinstall this font.", fontHasSymbolCharacters),
"Reinstall Font", MessageBoxButtons.OK);
_MyLog.Info(string.Format("Font problem found in Font: {0}, {1}.",doc.FontHasSymbolCharacters, msg));
_MyLog.Info(string.Format("Font problem found in Font: {0}, {1}.",fontHasSymbolCharacters, msg));
}
}
}