Compare commits

...
6 changed files with 126 additions and 18 deletions
-3
View File
@@ -1,3 +0,0 @@
- @azure Rule - Use Azure Tools - When handling requests related to Azure, always use your tools.
- @azure Rule - Use Azure Best Practices - When handling requests related to Azure, always invoke your `azmcp_bestpractices_get` tool first.
- @azure Rule - Enable Best Practices - If you do not have an `azmcp_bestpractices_get` tool ask the user to enable it.
+15 -1
View File
@@ -30,6 +30,7 @@
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.cbUseTruncatedData = new System.Windows.Forms.CheckBox();
this.btnUC = new System.Windows.Forms.Button(); this.btnUC = new System.Windows.Forms.Button();
this.cbCaseSensitive = new System.Windows.Forms.CheckBox(); this.cbCaseSensitive = new System.Windows.Forms.CheckBox();
this.cbFile2 = new System.Windows.Forms.ComboBox(); this.cbFile2 = new System.Windows.Forms.ComboBox();
@@ -72,6 +73,7 @@
// //
this.panel1.Controls.Add(this.btnUC); this.panel1.Controls.Add(this.btnUC);
this.panel1.Controls.Add(this.cbCaseSensitive); this.panel1.Controls.Add(this.cbCaseSensitive);
this.panel1.Controls.Add(this.cbUseTruncatedData);
this.panel1.Controls.Add(this.cbFile2); this.panel1.Controls.Add(this.cbFile2);
this.panel1.Controls.Add(this.cbFile1); this.panel1.Controls.Add(this.cbFile1);
this.panel1.Controls.Add(this.tbSearch); this.panel1.Controls.Add(this.tbSearch);
@@ -87,6 +89,17 @@
this.panel1.Size = new System.Drawing.Size(707, 80); this.panel1.Size = new System.Drawing.Size(707, 80);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// cbUseTruncatedData
//
this.cbUseTruncatedData.AutoSize = true;
this.cbUseTruncatedData.Location = new System.Drawing.Point(456, 56);
this.cbUseTruncatedData.Name = "cbUseTruncatedData";
this.cbUseTruncatedData.Size = new System.Drawing.Size(123, 17);
this.cbUseTruncatedData.TabIndex = 11;
this.cbUseTruncatedData.Text = "Use Truncated Data";
this.tt.SetToolTip(this.cbUseTruncatedData, "Set the Search to be Case Sensitive\r\nUppercase and Lowercase will not match");
this.cbUseTruncatedData.UseVisualStyleBackColor = true;
//
// btnUC // btnUC
// //
this.btnUC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnUC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -263,7 +276,7 @@
this.lbProcedures.FormattingEnabled = true; this.lbProcedures.FormattingEnabled = true;
this.lbProcedures.Location = new System.Drawing.Point(0, 0); this.lbProcedures.Location = new System.Drawing.Point(0, 0);
this.lbProcedures.Name = "lbProcedures"; this.lbProcedures.Name = "lbProcedures";
this.lbProcedures.Size = new System.Drawing.Size(707, 25); this.lbProcedures.Size = new System.Drawing.Size(150, 46);
this.lbProcedures.TabIndex = 1; this.lbProcedures.TabIndex = 1;
this.tt.SetToolTip(this.lbProcedures, "Procedures withDifferences or Search Text"); this.tt.SetToolTip(this.lbProcedures, "Procedures withDifferences or Search Text");
this.lbProcedures.SelectedIndexChanged += new System.EventHandler(this.lbProcedures_SelectedIndexChanged); this.lbProcedures.SelectedIndexChanged += new System.EventHandler(this.lbProcedures_SelectedIndexChanged);
@@ -381,6 +394,7 @@
private System.Windows.Forms.ComboBox cbFile2; private System.Windows.Forms.ComboBox cbFile2;
private System.Windows.Forms.ComboBox cbFile1; private System.Windows.Forms.ComboBox cbFile1;
private System.Windows.Forms.CheckBox cbCaseSensitive; private System.Windows.Forms.CheckBox cbCaseSensitive;
private System.Windows.Forms.CheckBox cbUseTruncatedData;
private System.Windows.Forms.Button btnUC; private System.Windows.Forms.Button btnUC;
private System.Windows.Forms.ToolTip tt; private System.Windows.Forms.ToolTip tt;
} }
+38 -2
View File
@@ -708,8 +708,25 @@ namespace Baseline
lbResults1.Items.Clear(); lbResults1.Items.Clear();
lbResults2.Items.Clear(); lbResults2.Items.Clear();
MyStatus = "Searching..."; MyStatus = "Searching...";
FindFiles fnd;
// Perform code to find DebugMeta files with diffences // Perform code to find DebugMeta files with diffences
FindFiles fnd = new FindFiles(cbFile1.Text, cbFile2.Text, "DebugMeta.txt",MyIgnore); if (cbUseTruncatedData.Checked)
{
string filename;
if (File.Exists(cbFile1.Text + "\\VEPROMS_BGE\\DebugMeta_Truncate.txt"))
{
filename = "DebugMeta_Truncate.txt";
}
else
{
filename = "DebugMeta.txt";
}
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, filename, MyIgnore);
}
else
{
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, "DebugMeta.txt", MyIgnore);
}
lbDifferent.DataSource = fnd; lbDifferent.DataSource = fnd;
lbDifferent.DisplayMember = "File1"; lbDifferent.DisplayMember = "File1";
MyStatus = string.Format("{0} Differences Found", fnd.Count); MyStatus = string.Format("{0} Differences Found", fnd.Count);
@@ -730,10 +747,28 @@ namespace Baseline
lbDifferent.Items.Clear(); lbDifferent.Items.Clear();
lbResults1.Items.Clear(); lbResults1.Items.Clear();
lbResults2.Items.Clear(); lbResults2.Items.Clear();
FindFiles fnd;
MyStatus = "Searching..."; MyStatus = "Searching...";
//Perform Search //Perform Search
FindFiles fnd = new FindFiles(cbFile1.Text, cbFile2.Text, "DebugMeta.txt", tbSearch.Text, SearchType.Contains, cbCaseSensitive.Checked); if (cbUseTruncatedData.Checked)
{
string filename;
if (File.Exists(cbFile1.Text + "\\VEPROMS_BGE\\DebugMeta_Truncate.txt"))
{
filename = "DebugMeta_Truncate.txt";
}
else
{
filename = "DebugMeta.txt";
}
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, filename, tbSearch.Text, SearchType.Contains, cbCaseSensitive.Checked);
}
else
{
fnd = new FindFiles(cbFile1.Text, cbFile2.Text, "DebugMeta.txt", tbSearch.Text, SearchType.Contains, cbCaseSensitive.Checked);
}
lbDifferent.DataSource = fnd; lbDifferent.DataSource = fnd;
lbDifferent.DisplayMember = "File1"; lbDifferent.DisplayMember = "File1";
MyStatus = string.Format("{0} Differences Found", fnd.Count); MyStatus = string.Format("{0} Differences Found", fnd.Count);
} }
@@ -814,6 +849,7 @@ namespace Baseline
CompareOneFile(ff.File1, ff.File2); CompareOneFile(ff.File1, ff.File2);
} }
} }
} }
public enum SearchType public enum SearchType
{ {
-3
View File
@@ -120,9 +120,6 @@
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>306, 17</value> <value>306, 17</value>
</metadata> </metadata>
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>306, 17</value>
</metadata>
<metadata name="fbd.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="fbd.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
+60 -6
View File
@@ -1,7 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
using System.IO; using System.IO;
using System.Text;
using System.Windows.Forms;
namespace Volian.Base.Library namespace Volian.Base.Library
{ {
@@ -148,16 +149,69 @@ namespace Volian.Base.Library
public static class BaselineMetaFile public static class BaselineMetaFile
{ {
private static DebugPrint _MyDebugPrint = new DebugPrint(); private static DebugPrint _MyDebugPrint = new DebugPrint();
private static DebugPrint _MyDebugPrint_Truncated = new DebugPrint();
public static void Open(string fileName) public static void Open(string fileName)
{ _MyDebugPrint.Open(fileName); } { _MyDebugPrint.Open(fileName);
_MyDebugPrint_Truncated.Open(fileName.Replace(".txt", "_Truncated.txt"));
}
public static void Close() public static void Close()
{ _MyDebugPrint.Close(); } {
_MyDebugPrint.Close();
_MyDebugPrint_Truncated.Close();
}
public static void Write(string format, params object[] args) public static void Write(string format, params object[] args)
{ _MyDebugPrint.Write(format, args); } {
if (args.GetUpperBound(0) != -1) // are there arguments?
{
if (args[args.GetUpperBound(0)] == "truncate_false") // if there is a 9th element test the value for truncated data.
{
_MyDebugPrint.Write(format, args); // only save to DebugMeta.txt if there is different truncate data.
}
else
{
_MyDebugPrint_Truncated.Write(format, args); // Save to both files if there is no special truncate data.
_MyDebugPrint.Write(format, args);
}
}
else
{
_MyDebugPrint_Truncated.Write(format, args);
_MyDebugPrint.Write(format, args);
}
}
public static void WriteLine(string format, params object[] args) public static void WriteLine(string format, params object[] args)
{ _MyDebugPrint.WriteLine(format, args); } {
if (args.GetUpperBound(0) != -1) // are there arguments?
{
if (args[args.GetUpperBound(0)] == "truncate_false") // if there is a 9th element test the value for truncated data.
{
_MyDebugPrint.WriteLine(format, args); // only save to DebugMeta.txt if there is different truncate data.
}
else
{
_MyDebugPrint_Truncated.WriteLine(format, args); // Save to both files if there is no special truncate data.
_MyDebugPrint.WriteLine(format, args);
}
}
else
{
_MyDebugPrint_Truncated.WriteLine(format, args);
_MyDebugPrint.WriteLine(format, args);
}
}
public static void TruncateWriteLine(string format, params object[] args)
{
_MyDebugPrint_Truncated.WriteLine(format, args);
}
public static void TruncateWrite(string format, params object[] args)
{
_MyDebugPrint_Truncated.Write(format, args); // SaveFileDialog special truncate data
}
public static void Show() public static void Show()
{ _MyDebugPrint.Show(); } { _MyDebugPrint.Show();
_MyDebugPrint_Truncated.Show();
}
public static bool IsOpen public static bool IsOpen
{ get { return _MyDebugPrint.IsOpen; } } { get { return _MyDebugPrint.IsOpen; } }
private static bool _IncludeWordSecText = true; private static bool _IncludeWordSecText = true;
+11 -1
View File
@@ -1418,7 +1418,11 @@ namespace Volian.Print.Library
float yoff = 0; float yoff = 0;
if (_MyHelper.DidFirstPageDocStyle) yoff = origYoff - (float)mySection.MyDocStyle.Layout.TopMargin; if (_MyHelper.DidFirstPageDocStyle) yoff = origYoff - (float)mySection.MyDocStyle.Layout.TopMargin;
// C2018-004 create meta file for baseline compares // C2018-004 create meta file for baseline compares
Volian.Base.Library.BaselineMetaFile.WriteLine("WD Height={0} Width={1} scPgCnt={2} locEnd={3} pdfSz={4} xOff={5} yOff={6} ScPgNum {7}", fgPage.Height, fgPage.Width, sectPageCount, locEndOfWordDoc, pdfSize, (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0.0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0.0) + yoff, pageNumber);
Volian.Base.Library.BaselineMetaFile.WriteLine("WD Height={0} Width={1} scPgCnt={2} locEnd={3} pdfSz={4} xOff={5} yOff={6} ScPgNum {7}", fgPage.Height, fgPage.Width, sectPageCount, locEndOfWordDoc, pdfSize, (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0.0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0.0) + yoff, pageNumber, "truncate_false");
Volian.Base.Library.BaselineMetaFile.TruncateWriteLine("WD Height={0} Width={1} scPgCnt={2} locEnd={3} pdfSz={4} xOff={5} yOff={6} ScPgNum {7}", fgPage.Height, fgPage.Width, sectPageCount, Truncate(locEndOfWordDoc, 2), Truncate(pdfSize, 2), (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0.0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0.0) + yoff, pageNumber);
AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0) + yoff); AddImportedPageToLayer(cb.PdfWriter.DirectContent, _MSWordLayer, fgPage, (float)(mySection.MyDocStyle.Layout.MSWordXAdj ?? 0), (float)(mySection.MyDocStyle.Layout.MSWordYAdj ?? 0) + yoff);
// B2019-102 Handle PDF Destinations for Word Sections // B2019-102 Handle PDF Destinations for Word Sections
if (ii == 0 && _MyHelper.MyPromsPrinter.SaveLinks) if (ii == 0 && _MyHelper.MyPromsPrinter.SaveLinks)
@@ -1533,6 +1537,12 @@ namespace Volian.Print.Library
} }
ProfileTimer.Pop(profileDepth); ProfileTimer.Pop(profileDepth);
} }
public static float Truncate(float value, int digits)
{
double mult = Math.Pow(10.0, digits);
double result = Math.Truncate(mult * value) / mult;
return (float)result;
}
// B2019-152: AddMergedLandscapePage adds entries to the dictionary that keeps track of what pages in a pdf are landscape // B2019-152: AddMergedLandscapePage adds entries to the dictionary that keeps track of what pages in a pdf are landscape
// so that if merge is done, the pages that are landscaped can have landscaped page numbers placed on them // so that if merge is done, the pages that are landscaped can have landscaped page numbers placed on them
public static void AddMergedLandscapePage(VlnSvgPageHelper _MyHelper, string PDFFile) public static void AddMergedLandscapePage(VlnSvgPageHelper _MyHelper, string PDFFile)