Move frmErrors when frmLoader is moved
Shutoff SpellCheck for StepRTB Use using for temporary StepRTB Use using for vlnFlexGrid Added debug output to track StepRTBs and vlnFlexGrids in memory Limit bottom margin to 0 or above Dispose of roImage after it is done being used Dispose of Figure after it is done being used. Use GetJustRODB so that images are not loaded. Added ErrorHandler if annotation is deleted after a search Track create, dispose and finalize Add static variable to control if SpellCheck is used Use using for temporary StepRTB Lazy Load SelectionStack Clean-up on Dispose Track create, dispose and finalize Make MyCopyInfo Lazy Loaded Use using for temporary StepRTB Add Dispose method for TableCellEditor Cleanup on Dispose Only kill MSWord instances that are invisible
This commit is contained in:
@@ -118,10 +118,11 @@ namespace DataLoader
|
||||
string fixStpText = "";
|
||||
if (IsATable(content.Type))
|
||||
{
|
||||
//if (ProcNumber == "EOP-ES-1.2")
|
||||
// Console.WriteLine("here");
|
||||
bool hasBorder = !WithoutBorder(content.Type);
|
||||
fixStpText = ConvertTableToGrid(stptext, content, fmt, isROTable, hasBorder ? GridLinePattern.Single : GridLinePattern.None );
|
||||
frmMain.AddInfo("Memory After Grid Convert {0}", GC.GetTotalMemory(true)); // This will force a Garbage Collection
|
||||
frmMain.AddInfo("VlnFlexGrid Counts: {0}, {1}, {2}", VlnFlexGrid.CountCreated, VlnFlexGrid.CountNotDisposed, VlnFlexGrid.CountNotFinalized);
|
||||
frmMain.AddInfo("StepRTB Counts: {0}, {1}, {2}", StepRTB.CountCreated, StepRTB.CountNotDisposed, StepRTB.CountNotFinalized);
|
||||
int? typ = ConvertTableType(content, fmt);
|
||||
if (typ != null) content.Type = typ;
|
||||
else _ContentMigrationErrors.Add(content.ContentID, null);
|
||||
@@ -372,25 +373,26 @@ namespace DataLoader
|
||||
{
|
||||
//string savethis = stepText;
|
||||
string strGrid = "";
|
||||
VlnFlexGrid grd = new VlnFlexGrid(1, 1);
|
||||
grd.IsRoTable = isROTable;
|
||||
VE_Font vefont = fmt.PlantFormat.FormatData.StepDataList.Table.Font;
|
||||
Font GridFont = new Font(vefont.Family, (float)vefont.Size);
|
||||
grd.Font = GridFont; // this also changes the default Row Height "Rows.DefaultSize"
|
||||
grd.ParseTableFromText(stepText,border);
|
||||
grd.AutoSizeCols();
|
||||
grd.AutoSizeRows();
|
||||
grd.MakeRTFcells();
|
||||
|
||||
using (StringWriter sw = new StringWriter())
|
||||
//MessageBox.Show("Before ConvertTableToGrid " + GC.GetTotalMemory(true).ToString());
|
||||
using (VlnFlexGrid grd = new VlnFlexGrid(1, 1))
|
||||
{
|
||||
grd.WriteXml(sw);
|
||||
//Console.WriteLine(sw.GetStringBuilder().ToString());
|
||||
content.MyGrid.Data = sw.GetStringBuilder().ToString();
|
||||
strGrid = grd.GetSearchableText();
|
||||
sw.Close();
|
||||
grd.IsRoTable = isROTable;
|
||||
VE_Font vefont = fmt.PlantFormat.FormatData.StepDataList.Table.Font;
|
||||
Font GridFont = new Font(vefont.Family, (float)vefont.Size);
|
||||
grd.Font = GridFont; // this also changes the default Row Height "Rows.DefaultSize"
|
||||
grd.ParseTableFromText(stepText, border);
|
||||
grd.AutoSizeCols();
|
||||
grd.AutoSizeRows();
|
||||
grd.MakeRTFcells();
|
||||
using (StringWriter sw = new StringWriter())
|
||||
{
|
||||
grd.WriteXml(sw);
|
||||
//Console.WriteLine(sw.GetStringBuilder().ToString());
|
||||
content.MyGrid.Data = sw.GetStringBuilder().ToString();
|
||||
strGrid = grd.GetSearchableText();
|
||||
sw.Close();
|
||||
}
|
||||
}
|
||||
grd.Dispose();
|
||||
return strGrid;
|
||||
}
|
||||
|
||||
|
@@ -16,9 +16,13 @@ namespace DataLoader
|
||||
{
|
||||
InitializeComponent();
|
||||
_MyParent = myParent;
|
||||
_MyParent.Move += new EventHandler(_MyParent_Move);
|
||||
}
|
||||
void _MyParent_Move(object sender, EventArgs e)
|
||||
{
|
||||
AdjustLocation();
|
||||
}
|
||||
private int _ErrorCount = 0;
|
||||
|
||||
public int ErrorCount
|
||||
{
|
||||
get { return _ErrorCount; }
|
||||
@@ -67,9 +71,18 @@ namespace DataLoader
|
||||
}
|
||||
private void frmErrors_Load(object sender, EventArgs e)
|
||||
{
|
||||
Rectangle rec = Screen.GetWorkingArea(this);
|
||||
AdjustLocation();
|
||||
}
|
||||
private void AdjustLocation()
|
||||
{
|
||||
int maxRight = Screen.GetWorkingArea(this).Right;
|
||||
if (Screen.AllScreens.Length > 1)
|
||||
{
|
||||
foreach (Screen sc in Screen.AllScreens)
|
||||
if (sc.WorkingArea.Right > maxRight) maxRight = sc.WorkingArea.Right;
|
||||
}
|
||||
Top = _MyParent.Top;
|
||||
Left = _MyParent.Right + Width > rec.Right ? rec.Right - Width : _MyParent.Right;
|
||||
Left = _MyParent.Right + Width > maxRight ? maxRight - Width : _MyParent.Right;
|
||||
}
|
||||
public void Save(string path)
|
||||
{
|
||||
|
@@ -588,6 +588,7 @@ namespace DataLoader
|
||||
_Loading = false;
|
||||
MSWordToPDF.CloseWordWhenDone = false;
|
||||
Format.FormatLoaded += new FormatEvent(Format_FormatLoaded);
|
||||
StepRTB.DoSpellCheck = false;
|
||||
}
|
||||
void Format_FormatLoaded(object sender, FormatEventArgs args)
|
||||
{
|
||||
@@ -601,21 +602,23 @@ namespace DataLoader
|
||||
//List<int> cachePdfInfo = PdfInfo.CacheList;
|
||||
//List<int> cacheDocVersionInfo = DocVersionInfo.CacheList;
|
||||
//if (!CheckLogPath()) return;
|
||||
StepRTB rtb = new StepRTB();
|
||||
TransitionFixer myFixer = new TransitionFixer(rtb,MySettings.LogFilePath);
|
||||
myFixer.StatusChanged += new TransitionFixerEvent(myFixer_StatusChanged);
|
||||
TimeSpan howlong = myFixer.Process(MySettings.CheckRTF);
|
||||
string TransFixTime = string.Format("Fix Transitions completion time: {0:D2}:{1:D2}:{2:D2}.{3}", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds);
|
||||
MyInfo = TransFixTime;
|
||||
if(!ProcessComplete) MessageBox.Show(string.Format("{0}\r\n\n({1} Total Seconds)", TransFixTime, howlong.TotalSeconds));
|
||||
//MessageBox.Show(string.Format("Fix Transitions completion time: {0:D2}:{1:D2}:{2:D2}.{3}\r\n\n({4} Total Seconds)", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds, howlong.TotalSeconds));
|
||||
CreateBackupRestoreBatchFiles();
|
||||
ItemInfo.RestoreCacheList(cacheItemInfo);
|
||||
ContentInfo.RestoreCacheList(cacheContentInfo);
|
||||
//EntryInfo.RestoreCacheList(cacheEntryInfo);
|
||||
//PdfInfo.RestoreCacheList(cachePdfInfo);
|
||||
//DocVersionInfo.RestoreCacheList(cacheDocVersionInfo);
|
||||
MyInfo = CSLACache.UsageAll;
|
||||
using (StepRTB rtb = new StepRTB())
|
||||
{
|
||||
TransitionFixer myFixer = new TransitionFixer(rtb, MySettings.LogFilePath);
|
||||
myFixer.StatusChanged += new TransitionFixerEvent(myFixer_StatusChanged);
|
||||
TimeSpan howlong = myFixer.Process(MySettings.CheckRTF);
|
||||
string TransFixTime = string.Format("Fix Transitions completion time: {0:D2}:{1:D2}:{2:D2}.{3}", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds);
|
||||
MyInfo = TransFixTime;
|
||||
if (!ProcessComplete) MessageBox.Show(string.Format("{0}\r\n\n({1} Total Seconds)", TransFixTime, howlong.TotalSeconds));
|
||||
//MessageBox.Show(string.Format("Fix Transitions completion time: {0:D2}:{1:D2}:{2:D2}.{3}\r\n\n({4} Total Seconds)", howlong.Hours, howlong.Minutes, howlong.Seconds, howlong.Milliseconds, howlong.TotalSeconds));
|
||||
CreateBackupRestoreBatchFiles();
|
||||
ItemInfo.RestoreCacheList(cacheItemInfo);
|
||||
ContentInfo.RestoreCacheList(cacheContentInfo);
|
||||
//EntryInfo.RestoreCacheList(cacheEntryInfo);
|
||||
//PdfInfo.RestoreCacheList(cachePdfInfo);
|
||||
//DocVersionInfo.RestoreCacheList(cacheDocVersionInfo);
|
||||
MyInfo = CSLACache.UsageAll;
|
||||
}
|
||||
}
|
||||
|
||||
void myFixer_StatusChanged(object sender, TransitionFixerEventArgs args)
|
||||
|
Reference in New Issue
Block a user