bug fixes and changes to search results reports, changes to wording on search panel for step types

This commit is contained in:
John Jenko 2011-07-11 19:57:01 +00:00
parent a0bcd7d9c0
commit daddf5d47c
3 changed files with 416 additions and 253 deletions

View File

@ -62,6 +62,11 @@ namespace Volian.Controls.Library
this.rbtnSrchTxt = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbxSrchTypeUsage = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.tabStepTypeSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.gpFindROs = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbxFndUnLnkROVals = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmboTreeROs = new DevComponents.DotNetBar.Controls.ComboTree();
this.tabROSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel();
this.gpSrchAnnoText = new DevComponents.DotNetBar.Controls.GroupPanel();
this.panel4 = new System.Windows.Forms.Panel();
@ -71,11 +76,6 @@ namespace Volian.Controls.Library
this.label2 = new System.Windows.Forms.Label();
this.cbxAnnoTypes = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.tabAnnotationSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.gpFindROs = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbxFndUnLnkROVals = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmboTreeROs = new DevComponents.DotNetBar.Controls.ComboTree();
this.tabROSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.contextMenuBar1 = new DevComponents.DotNetBar.ContextMenuBar();
this.btnCMIFindText = new DevComponents.DotNetBar.ButtonItem();
this.btnCMEdit = new DevComponents.DotNetBar.ButtonItem();
@ -126,11 +126,11 @@ namespace Volian.Controls.Library
this.gpSrchText.SuspendLayout();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.tabControlPanel2.SuspendLayout();
this.gpFindROs.SuspendLayout();
this.tabControlPanel3.SuspendLayout();
this.gpSrchAnnoText.SuspendLayout();
this.panel4.SuspendLayout();
this.tabControlPanel2.SuspendLayout();
this.gpFindROs.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).BeginInit();
@ -146,8 +146,8 @@ namespace Volian.Controls.Library
this.tabSearchTypes.CloseButtonOnTabsAlwaysDisplayed = false;
this.tabSearchTypes.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right;
this.tabSearchTypes.Controls.Add(this.tabControlPanel4);
this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
this.tabSearchTypes.Controls.Add(this.tabControlPanel2);
this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
this.tabSearchTypes.Controls.Add(this.contextMenuBar1);
this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top;
this.tabSearchTypes.Location = new System.Drawing.Point(0, 0);
@ -179,10 +179,10 @@ namespace Volian.Controls.Library
this.tabControlPanel4.Name = "tabControlPanel4";
this.tabControlPanel4.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel4.Size = new System.Drawing.Size(369, 114);
this.tabControlPanel4.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.tabControlPanel4.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(195)))), ((int)(((byte)(195)))), ((int)(((byte)(195)))));
this.tabControlPanel4.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel4.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel4.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel4.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70)))));
this.tabControlPanel4.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tabControlPanel4.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel4.Style.GradientAngle = 90;
@ -383,8 +383,9 @@ namespace Volian.Controls.Library
this.cbxSrchTypeUsage.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxSrchTypeUsage.Name = "cbxSrchTypeUsage";
this.cbxSrchTypeUsage.Size = new System.Drawing.Size(367, 22);
this.superTooltip1.SetSuperTooltip(this.cbxSrchTypeUsage, new DevComponents.DotNetBar.SuperTooltipInfo("Find Selected Step Elements", "", "This option will have Search show you where the selected Step Elements are used.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbxSrchTypeUsage.TabIndex = 4;
this.cbxSrchTypeUsage.Text = " Find Selected Types";
this.cbxSrchTypeUsage.Text = " Find Selected Step Elements";
this.cbxSrchTypeUsage.CheckedChanged += new System.EventHandler(this.cbxSrchTypeUsage_CheckedChanged);
//
// tabStepTypeSearch
@ -396,6 +397,117 @@ namespace Volian.Controls.Library
this.tabStepTypeSearch.Text = "Text";
this.tabStepTypeSearch.Click += new System.EventHandler(this.tabStepTypeSearch_Click);
//
// tabControlPanel2
//
this.tabControlPanel2.Controls.Add(this.gpFindROs);
this.tabControlPanel2.Controls.Add(this.cmboTreeROs);
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 24);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(369, 114);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel2.Style.GradientAngle = 90;
this.tabControlPanel2.TabIndex = 2;
this.tabControlPanel2.TabItem = this.tabROSearch;
//
// gpFindROs
//
this.gpFindROs.CanvasColor = System.Drawing.SystemColors.Control;
this.gpFindROs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.gpFindROs.Controls.Add(this.cbxFndUnLnkROVals);
this.gpFindROs.Dock = System.Windows.Forms.DockStyle.Fill;
this.gpFindROs.Location = new System.Drawing.Point(1, 26);
this.gpFindROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.gpFindROs.Name = "gpFindROs";
this.gpFindROs.Size = new System.Drawing.Size(367, 87);
//
//
//
this.gpFindROs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.gpFindROs.Style.BackColorGradientAngle = 90;
this.gpFindROs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.gpFindROs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderBottomWidth = 1;
this.gpFindROs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.gpFindROs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderLeftWidth = 1;
this.gpFindROs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderRightWidth = 1;
this.gpFindROs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderTopWidth = 1;
this.gpFindROs.Style.Class = "";
this.gpFindROs.Style.CornerDiameter = 4;
this.gpFindROs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.gpFindROs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.gpFindROs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.gpFindROs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.gpFindROs.StyleMouseDown.Class = "";
this.gpFindROs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.gpFindROs.StyleMouseOver.Class = "";
this.gpFindROs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.gpFindROs.TabIndex = 3;
this.gpFindROs.EnabledChanged += new System.EventHandler(this.gpFindROs_EnabledChanged);
//
// cbxFndUnLnkROVals
//
this.cbxFndUnLnkROVals.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.cbxFndUnLnkROVals.BackgroundStyle.Class = "";
this.cbxFndUnLnkROVals.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbxFndUnLnkROVals.Enabled = false;
this.cbxFndUnLnkROVals.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxFndUnLnkROVals.Location = new System.Drawing.Point(0, 4);
this.cbxFndUnLnkROVals.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxFndUnLnkROVals.Name = "cbxFndUnLnkROVals";
this.cbxFndUnLnkROVals.Size = new System.Drawing.Size(234, 23);
this.superTooltip1.SetSuperTooltip(this.cbxFndUnLnkROVals, new DevComponents.DotNetBar.SuperTooltipInfo("Find Linked Values", "", "Finding unlinked values does the search for a specific RO.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbxFndUnLnkROVals.TabIndex = 2;
this.cbxFndUnLnkROVals.Text = "Find Unlinked Values of Selected RO";
//
// cmboTreeROs
//
this.cmboTreeROs.BackColor = System.Drawing.SystemColors.Window;
//
//
//
this.cmboTreeROs.BackgroundStyle.Class = "TextBoxBorder";
this.cmboTreeROs.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cmboTreeROs.ButtonDropDown.Visible = true;
this.cmboTreeROs.Dock = System.Windows.Forms.DockStyle.Top;
this.cmboTreeROs.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboTreeROs.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
this.cmboTreeROs.Location = new System.Drawing.Point(1, 1);
this.cmboTreeROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmboTreeROs.Name = "cmboTreeROs";
this.cmboTreeROs.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.cmboTreeROs.Size = new System.Drawing.Size(367, 25);
this.superTooltip1.SetSuperTooltip(this.cmboTreeROs, new DevComponents.DotNetBar.SuperTooltipInfo("Select the RO to Search", "", "Select the Referenced Object to search for.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cmboTreeROs.TabIndex = 1;
this.cmboTreeROs.ThemeAware = true;
this.cmboTreeROs.WatermarkText = "Select an RO to seach";
this.cmboTreeROs.SelectedIndexChanged += new System.EventHandler(this.cmboTreeROs_SelectedIndexChanged);
//
// tabROSearch
//
this.tabROSearch.AttachedControl = this.tabControlPanel2;
this.tabROSearch.Name = "tabROSearch";
this.tabROSearch.Text = "Referenced Objects";
//
// tabControlPanel3
//
this.tabControlPanel3.Controls.Add(this.gpSrchAnnoText);
@ -406,10 +518,10 @@ namespace Volian.Controls.Library
this.tabControlPanel3.Name = "tabControlPanel3";
this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel3.Size = new System.Drawing.Size(369, 114);
this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.tabControlPanel3.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(195)))), ((int)(((byte)(195)))), ((int)(((byte)(195)))));
this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel3.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel3.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70)))));
this.tabControlPanel3.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel3.Style.GradientAngle = 90;
@ -572,117 +684,6 @@ namespace Volian.Controls.Library
this.tabAnnotationSearch.Text = "Annotations";
this.tabAnnotationSearch.Click += new System.EventHandler(this.tabAnnotationSearch_Click);
//
// tabControlPanel2
//
this.tabControlPanel2.Controls.Add(this.gpFindROs);
this.tabControlPanel2.Controls.Add(this.cmboTreeROs);
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 24);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(369, 114);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
this.tabControlPanel2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(195)))), ((int)(((byte)(195)))), ((int)(((byte)(195)))));
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(70)))), ((int)(((byte)(70)))), ((int)(((byte)(70)))));
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel2.Style.GradientAngle = 90;
this.tabControlPanel2.TabIndex = 2;
this.tabControlPanel2.TabItem = this.tabROSearch;
//
// gpFindROs
//
this.gpFindROs.CanvasColor = System.Drawing.SystemColors.Control;
this.gpFindROs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.gpFindROs.Controls.Add(this.cbxFndUnLnkROVals);
this.gpFindROs.Dock = System.Windows.Forms.DockStyle.Fill;
this.gpFindROs.Location = new System.Drawing.Point(1, 26);
this.gpFindROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.gpFindROs.Name = "gpFindROs";
this.gpFindROs.Size = new System.Drawing.Size(367, 87);
//
//
//
this.gpFindROs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.gpFindROs.Style.BackColorGradientAngle = 90;
this.gpFindROs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.gpFindROs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderBottomWidth = 1;
this.gpFindROs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.gpFindROs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderLeftWidth = 1;
this.gpFindROs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderRightWidth = 1;
this.gpFindROs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderTopWidth = 1;
this.gpFindROs.Style.Class = "";
this.gpFindROs.Style.CornerDiameter = 4;
this.gpFindROs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.gpFindROs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.gpFindROs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.gpFindROs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.gpFindROs.StyleMouseDown.Class = "";
this.gpFindROs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.gpFindROs.StyleMouseOver.Class = "";
this.gpFindROs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.gpFindROs.TabIndex = 3;
this.gpFindROs.EnabledChanged += new System.EventHandler(this.gpFindROs_EnabledChanged);
//
// cbxFndUnLnkROVals
//
this.cbxFndUnLnkROVals.BackColor = System.Drawing.Color.Transparent;
//
//
//
this.cbxFndUnLnkROVals.BackgroundStyle.Class = "";
this.cbxFndUnLnkROVals.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbxFndUnLnkROVals.Enabled = false;
this.cbxFndUnLnkROVals.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxFndUnLnkROVals.Location = new System.Drawing.Point(0, 4);
this.cbxFndUnLnkROVals.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxFndUnLnkROVals.Name = "cbxFndUnLnkROVals";
this.cbxFndUnLnkROVals.Size = new System.Drawing.Size(234, 23);
this.superTooltip1.SetSuperTooltip(this.cbxFndUnLnkROVals, new DevComponents.DotNetBar.SuperTooltipInfo("Find Linked Values", "", "Finding unlinked values does the search for a specific RO.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbxFndUnLnkROVals.TabIndex = 2;
this.cbxFndUnLnkROVals.Text = "Find Unlinked Values of Selected RO";
//
// cmboTreeROs
//
this.cmboTreeROs.BackColor = System.Drawing.SystemColors.Window;
//
//
//
this.cmboTreeROs.BackgroundStyle.Class = "TextBoxBorder";
this.cmboTreeROs.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cmboTreeROs.ButtonDropDown.Visible = true;
this.cmboTreeROs.Dock = System.Windows.Forms.DockStyle.Top;
this.cmboTreeROs.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboTreeROs.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
this.cmboTreeROs.Location = new System.Drawing.Point(1, 1);
this.cmboTreeROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmboTreeROs.Name = "cmboTreeROs";
this.cmboTreeROs.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.cmboTreeROs.Size = new System.Drawing.Size(367, 25);
this.superTooltip1.SetSuperTooltip(this.cmboTreeROs, new DevComponents.DotNetBar.SuperTooltipInfo("Select the RO to Search", "", "Select the Referenced Object to search for.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cmboTreeROs.TabIndex = 1;
this.cmboTreeROs.ThemeAware = true;
this.cmboTreeROs.WatermarkText = "Select an RO to seach";
this.cmboTreeROs.SelectedIndexChanged += new System.EventHandler(this.cmboTreeROs_SelectedIndexChanged);
//
// tabROSearch
//
this.tabROSearch.AttachedControl = this.tabControlPanel2;
this.tabROSearch.Name = "tabROSearch";
this.tabROSearch.Text = "Referenced Objects";
//
// contextMenuBar1
//
this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Top;
@ -1218,9 +1219,9 @@ namespace Volian.Controls.Library
this.xpStepTypes.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
this.xpStepTypes.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
this.xpStepTypes.Style.GradientAngle = 90;
this.superTooltip1.SetSuperTooltip(this.xpStepTypes, new DevComponents.DotNetBar.SuperTooltipInfo("Filter Search by Selected Types", "", "This allows you to search in only the selected types.\r\n\r\nIf you do not enter text" +
" to search, it will show you where the selected types are used in your procedure" +
"s.\r\n", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(252, 120)));
this.superTooltip1.SetSuperTooltip(this.xpStepTypes, new DevComponents.DotNetBar.SuperTooltipInfo("Filter Search by Selected Step Elements", "", "This allows you to search in only the selected step elements.\r\n\r\nIf the Find Sele" +
"cted Step Elements option is selected, search will show you where the selected " +
"Step Elements are use.\r\n", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(240, 155)));
this.xpStepTypes.TabIndex = 8;
this.xpStepTypes.ThemeAware = true;
this.xpStepTypes.TitleStyle.Alignment = System.Drawing.StringAlignment.Center;
@ -1230,7 +1231,7 @@ namespace Volian.Controls.Library
this.xpStepTypes.TitleStyle.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.xpStepTypes.TitleStyle.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.xpStepTypes.TitleStyle.GradientAngle = 90;
this.xpStepTypes.TitleText = "Search By Types";
this.xpStepTypes.TitleText = "Search By Step Element";
this.xpStepTypes.ExpandedChanged += new DevComponents.DotNetBar.ExpandChangeEventHandler(this.xpStepTypes_ExpandedChanged);
//
// superTooltip1
@ -1257,13 +1258,13 @@ namespace Volian.Controls.Library
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel3.ResumeLayout(false);
this.tabControlPanel2.ResumeLayout(false);
this.gpFindROs.ResumeLayout(false);
this.tabControlPanel3.ResumeLayout(false);
this.tabControlPanel3.PerformLayout();
this.gpSrchAnnoText.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.tabControlPanel2.ResumeLayout(false);
this.gpFindROs.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).EndInit();

View File

@ -999,6 +999,14 @@ namespace Volian.Controls.Library
SearchResults = null;
bool includeRTFformat = false;
bool includeSpecialChars = true;
// Build list of selected types that were searched
string typstr = null;
foreach (string s in lstCheckedStepTypesStr) typstr = typstr == null ? s : typstr + ", " + s;
TypesSelected = "Filtered By: " + ((typstr != null) ? typstr : "All Step Types");
//TypesSelected = "Step Types Searched: " + ((typstr != null) ? typstr : "all step types");
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "all step types");
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[0]) // Text Search
{
if (cbxSrchTypeUsage.Checked) // find just the usage of the selected types
@ -1012,9 +1020,11 @@ namespace Volian.Controls.Library
}
else
{
string typstr = null;
foreach (string s in lstCheckedStepTypesStr) typstr = typstr==null?s:typstr + ", " + s;
ReportTitle = "Proms - Search by Type: " + typstr;
//string typstr = null;
//foreach (string s in lstCheckedStepTypesStr) typstr = typstr==null?s:typstr + ", " + s;
//ReportTitle = "Search for Selected Types"; //"Proms - Search by Type: " + typstr;
ReportTitle = "Step Element Report"; //"Proms - Search by Type: " + typstr;
TypesSelected = "Filtered By: " + typstr;
SearchString = null;
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, "", cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, ItemSearchIncludeLinks.Value, includeRTFformat, includeSpecialChars);
cmbResultsStyleIndex = 1; //display step locations in results
@ -1029,8 +1039,11 @@ namespace Volian.Controls.Library
//}
//else
//{
ReportTitle = string.Format("Proms - {0} Search for '{1}'", cbxBooleanTxtSrch.Checked ? "Boolean" : "Text", TextSearchString);
//ReportTitle = string.Format("Proms - {0} Search for '{1}'", cbxBooleanTxtSrch.Checked ? "Boolean" : "Text", TextSearchString);
ReportTitle = string.Format("Search for '{0}'", TextSearchString);
SearchString = TextSearchString;
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types");
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars);
cmbResultsStyleIndex = 3; // display step text in results
//}
@ -1039,8 +1052,18 @@ namespace Volian.Controls.Library
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]) // Annotation Search
{
SearchString = null;
ReportTitle = string.Format("Proms - Annotation Search for '{0}'", cbxTextSearchAnnotation.Text);
//ReportTitle = string.Format("Proms - Annotation Search for '{0}'", cbxTextSearchAnnotation.Text);
if (cbxTextSearchAnnotation.Text == null || cbxTextSearchAnnotation.Text == "")
{
ReportTitle = string.Format("Find {0}{1}", cbxAnnoTypes.Text, (cbxAnnoTypes.SelectedIndex > 0)?" Annotations" : "" );
}
else
{
ReportTitle = string.Format("Search {0}{1} For '{2}'", cbxAnnoTypes.Text, (cbxAnnoTypes.SelectedIndex > 0) ? " Annotations" : "", cbxTextSearchAnnotation.Text);
}
//ReportTitle = string.Format("Search Annotations for '{0}'", cbxTextSearchAnnotation.Text);
//string srchStr = ConvertSpecialChars(cbxTextSearchAnnotation.Text);//cbxTextSearchAnnotation.Text;
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types");
//SearchResults = ItemInfoList.GetListFromAnnotationSearch(dviSearchList, typeSearchList, textSearchString, srchStr, cbxCaseSensitiveAnnoText.Checked);
SearchResults = ItemInfoList.GetListFromAnnotationSearch(DVISearchList, TypeSearchList, AnnotationSearchType, cbxTextSearchAnnotation.Text, cbxCaseSensitiveAnnoText.Checked);
@ -1050,7 +1073,9 @@ namespace Volian.Controls.Library
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[2]) // RO Search
{
SearchString = null;
ReportTitle = "Proms - Referenced Object Search";
//ReportTitle = "Proms - Referenced Object Search";
ReportTitle = string.Format("Search For Referenced Object:\n{0}", cmboTreeROs.Text);
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "All Step Types");
if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked)
{
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, ROSearchList, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars);
@ -1296,13 +1321,19 @@ namespace Volian.Controls.Library
n.Style = DevComponents.AdvTree.NodeStyles.Apple;
if (sd == null)
{
lstCheckedStepTypes.Add(0); //use zero to identify attachment search
lstCheckedStepTypesStr.Add("Accessory Sections");
if (!lstCheckedStepTypesStr.Contains("Accessory Sections"))
{
lstCheckedStepTypes.Add(0); //use zero to identify attachment search
lstCheckedStepTypesStr.Add("Accessory Sections");
}
}
else
{
lstCheckedStepTypes.Add((int)sd.Index);
lstCheckedStepTypesStr.Add(advTreeStepTypes.SelectedNode.Text);
if (!lstCheckedStepTypesStr.Contains(advTreeStepTypes.SelectedNode.Text))
{
lstCheckedStepTypes.Add((int)sd.Index);
lstCheckedStepTypesStr.Add(advTreeStepTypes.SelectedNode.Text);
}
}
}
else
@ -1316,7 +1347,8 @@ namespace Volian.Controls.Library
else
{
lstCheckedStepTypes.Remove((int)sd.Index);
lstCheckedStepTypesStr.Remove(sd.Type);
//lstCheckedStepTypesStr.Remove(sd.Type);
lstCheckedStepTypesStr.Remove(advTreeStepTypes.SelectedNode.Text);
}
}
buildStepTypePannelTitle();
@ -1334,19 +1366,20 @@ namespace Volian.Controls.Library
{
if (xpStepTypes.Expanded)
{
xpStepTypes.TitleText = "Select Types To Search";
xpStepTypes.TitleText = "Select Step Elements To Search";//"Select Types To Search";
advTreeStepTypes.Focus();
advTreeStepTypes.Nodes[0].SelectedCell = advTreeStepTypes.Nodes[0].Cells[0];
}
else
xpStepTypes.TitleText = "Click Here To Search By Types";
xpStepTypes.TitleText = "Click Here To Search By Step Element";//"Click Here To Search By Types";
xpStepTypes.TitleStyle.BackColor1.Color = saveXpStepTypeTitleColor;
}
else //lstCheckedStepTypes.Count > 0
{
// show how many selected whether pannel is expanded or not
xpStepTypes.TitleText = string.Format("{0} Step Styles Selected", lstCheckedStepTypes.Count);
//xpStepTypes.TitleText = string.Format("{0} Step Styles Selected", lstCheckedStepTypes.Count);
xpStepTypes.TitleText = string.Format("{0} Step Element{0} Selected", lstCheckedStepTypes.Count, (lstCheckedStepTypes.Count > 1)?"s":"");
xpStepTypes.TitleStyle.BackColor1.Color = Color.PapayaWhip;
}
}
@ -1599,9 +1632,16 @@ namespace Volian.Controls.Library
get { return _SearchString; }
set { _SearchString = value; }
}
private string _TypesSelected;
public string TypesSelected
{
get { return _TypesSelected; }
set { _TypesSelected = value; }
}
private void btnPrnSrchRslts_Click(object sender, EventArgs e)
{
OnPrintRequest(new DisplaySearchEventArgs(ReportTitle, SearchString, lbSrchResults.DataSource as ICollection<ItemInfo>));
OnPrintRequest(new DisplaySearchEventArgs(ReportTitle, TypesSelected, SearchString, lbSrchResults.DataSource as ICollection<ItemInfo>));
}
private void panSearchButtons_Resize(object sender, EventArgs e)
{
@ -1648,15 +1688,22 @@ namespace Volian.Controls.Library
get { return _SearchString; }
set { _SearchString = value; }
}
private string _TypesSelected;
public string TypesSelected
{
get { return _TypesSelected; }
set { _TypesSelected = value; }
}
private ICollection<ItemInfo> _MyItemInfoList;
public ICollection<ItemInfo> MyItemInfoList
{
get { return _MyItemInfoList; }
set { _MyItemInfoList = value; }
}
public DisplaySearchEventArgs(string reportTitle, string searchString, ICollection<ItemInfo> myItemInfoList)
public DisplaySearchEventArgs(string reportTitle, string typesSelected, string searchString, ICollection<ItemInfo> myItemInfoList)
{
_ReportTitle = reportTitle;
_TypesSelected = typesSelected;
_MyItemInfoList = myItemInfoList;
_SearchString = searchString;
}

View File

@ -31,6 +31,13 @@ namespace Volian.Print.Library
get { return _ReportTitle; }
set { _ReportTitle = value; }
}
private string _TypesSelected;
public string TypesSelected
{
get { return _TypesSelected; }
set { _TypesSelected = value; }
}
private bool _ShowAnnotations = true;
public bool ShowAnnotations
{
@ -43,112 +50,113 @@ namespace Volian.Print.Library
get { return _SearchString; }
set { _SearchString = VEPROMS.CSLA.Library.ItemInfo.ConvertToDisplayText(value); }
}
public PDFReport(string reportTitle, ICollection<ItemInfo> resultList, string fileName)
public PDFReport(string reportTitle, string typesSelected, ICollection<ItemInfo> resultList, string fileName)
{
_ResultList = resultList;
_FileName = fileName;
_ReportTitle = VEPROMS.CSLA.Library.ItemInfo.ConvertToDisplayText(reportTitle);
_TypesSelected = VEPROMS.CSLA.Library.ItemInfo.ConvertToDisplayText(typesSelected);
}
public void Build2()
{
iTextSharp.text.Document document = new iTextSharp.text.Document(PageSize.LETTER, 36, 36, 36, 36);
try
{
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(_FileName, FileMode.Create));
//public void Build2()
//{
// iTextSharp.text.Document document = new iTextSharp.text.Document(PageSize.LETTER, 36, 36, 36, 36);
// try
// {
// PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(_FileName, FileMode.Create));
// we add some meta information to the document
document.SetMargins(36, 36, 36, 36);
// step 3: we open the document
document.Open();
AddTable(document, 20, 80);
//AddTable(document, 10, 90);
//AddTable(document, 10, 100);
//AddTable(document, 15, 75);
//AddTable(document, 20, 70);
//AddTable(document, 25, 65);
//AddTable(document, 30, 60);
document.Close();
}
catch (Exception ex)
{
}
}
// // we add some meta information to the document
// document.SetMargins(36, 36, 36, 36);
// // step 3: we open the document
// document.Open();
// AddTable(document, 20, 80);
// //AddTable(document, 10, 90);
// //AddTable(document, 10, 100);
// //AddTable(document, 15, 75);
// //AddTable(document, 20, 70);
// //AddTable(document, 25, 65);
// //AddTable(document, 30, 60);
// document.Close();
// }
// catch (Exception ex)
// {
// }
//}
private void AddTable(iTextSharp.text.Document document, int width1, int width2)
{
float[] headerwidths = { width1, width2 };
PdfPTable datatable = new PdfPTable(headerwidths);
datatable.HeaderRows = 3;
datatable.FooterRows = 1;
//datatable.Padding = 4;
//datatable.DefaultCell.Padding = 4;
//datatable.Spacing = 0;
//datatable.setBorder(Rectangle.NO_BORDER);
//datatable.Widths = headerwidths;
//datatable.WidthPercentage = 100;
datatable.TotalWidth = (width1 + width2) * 5;
datatable.LockedWidth = true;
// the first cell spans 10 columns
//iTextSharp.text.Font f1 = FontFactory.GetFont("Arial Unicode MS", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 14, Font.BOLD);
iTextSharp.text.Font f1 = pdf.GetFont("Arial Unicode MS", 14, 1, Color.BLACK);
//private void AddTable(iTextSharp.text.Document document, int width1, int width2)
//{
// float[] headerwidths = { width1, width2 };
// PdfPTable datatable = new PdfPTable(headerwidths);
// datatable.HeaderRows = 3;
// datatable.FooterRows = 1;
// //datatable.Padding = 4;
// //datatable.DefaultCell.Padding = 4;
// //datatable.Spacing = 0;
// //datatable.setBorder(Rectangle.NO_BORDER);
// //datatable.Widths = headerwidths;
// //datatable.WidthPercentage = 100;
// datatable.TotalWidth = (width1 + width2) * 5;
// datatable.LockedWidth = true;
// // the first cell spans 10 columns
// //iTextSharp.text.Font f1 = FontFactory.GetFont("Arial Unicode MS", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 14, Font.BOLD);
// iTextSharp.text.Font f1 = pdf.GetFont("Arial Unicode MS", 14, 1, Color.BLACK);
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
//Font f2 = FontFactory.GetFont(FontFactory.HELVETICA, 10);
//FontFactory.RegisterDirectory(FontFind.FontDir);
//iTextSharp.text.Font f2 = FontFactory.GetFont("Arial Unicode MS", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 10);
iTextSharp.text.Font f2 = pdf.GetFont("Arial Unicode MS", 10, 0, Color.BLACK);
//iTextSharp.text.Font f3 = FontFactory.GetFont("Prestige Elite Tall", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 9);
iTextSharp.text.Font f3 = pdf.GetFont("Prestige Elite Tall", 9, 0, Color.BLACK);
cell.HorizontalAlignment = Element.ALIGN_CENTER;
//cell.Leading = 20;
cell.Colspan = 2;
//cell.Border = Rectangle.NO_BORDER;
cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0);
datatable.AddCell(cell);
Color subHeaderColor = new Color(0xD0, 0xF0, 0xD0);
// These cells span 2 rows
//datatable.DefaultCellBorderWidth = 2;
//datatable.DefaultHorizontalAlignment = 1;
//datatable.DefaultRowspan = 2;
datatable.DefaultCell.Padding = 4;
datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
AddCell(datatable, "Step", f2, subHeaderColor);
AddCell(datatable, "Text", f2, subHeaderColor);
AddCell(datatable, "Step", f2, subHeaderColor);
AddCell(datatable, "Text", f2, subHeaderColor);
datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT;
//datatable.DefaultCellBorderWidth = 1;
//datatable.DefaultRowspan = 1;
//datatable.DefaultHorizontalAlignment = Element.ALIGN_LEFT;
string lastDvPath = "";
string lastPath = "";
Color AnnoColor = new Color(0xFF, 0xFF, 0xC0);
Color TextColor = Color.WHITE;
Color SectColor = Color.LIGHT_GRAY;
foreach (ItemInfo item in _ResultList)
{
if (item.SearchDVPath != lastDvPath)
AddGroup(datatable, item.SearchDVPath, lastDvPath, f2, false, new Color(0xC0, 0xFF, 0xC0));
lastDvPath = item.SearchDVPath;
//if (item.SearchPath != lastPath)
string stepPath = AddGroup(datatable, item.SearchPath, lastPath, f2, true, new Color(0xE0, 0xFF, 0xE0));
lastPath = item.SearchPath;
AddCell(datatable, stepPath, f2, (item.IsSection ? SectColor : TextColor));
if (item.DisplayText.Contains("|")) // Need a better way to determine if it is a table.
AddCell(datatable, item.DisplayText, f3, TextColor);
else
AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
if (item.ItemAnnotationCount > 0)
{
foreach (AnnotationInfo ai in item.ItemAnnotations)
{
AddCell(datatable, ai.MyAnnotationType.Name, f2, AnnoColor);
AddCell(datatable, ai.SearchText, f2, AnnoColor);
}
}
}
document.Add(datatable);
}
// PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
// //Font f2 = FontFactory.GetFont(FontFactory.HELVETICA, 10);
// //FontFactory.RegisterDirectory(FontFind.FontDir);
// //iTextSharp.text.Font f2 = FontFactory.GetFont("Arial Unicode MS", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 10);
// iTextSharp.text.Font f2 = pdf.GetFont("Arial Unicode MS", 10, 0, Color.BLACK);
// //iTextSharp.text.Font f3 = FontFactory.GetFont("Prestige Elite Tall", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 9);
// iTextSharp.text.Font f3 = pdf.GetFont("Prestige Elite Tall", 9, 0, Color.BLACK);
// cell.HorizontalAlignment = Element.ALIGN_CENTER;
// //cell.Leading = 20;
// cell.Colspan = 2;
// //cell.Border = Rectangle.NO_BORDER;
// cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0);
// datatable.AddCell(cell);
// Color subHeaderColor = new Color(0xD0, 0xF0, 0xD0);
// // These cells span 2 rows
// //datatable.DefaultCellBorderWidth = 2;
// //datatable.DefaultHorizontalAlignment = 1;
// //datatable.DefaultRowspan = 2;
// datatable.DefaultCell.Padding = 4;
// datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
// AddCell(datatable, "Step", f2, subHeaderColor);
// AddCell(datatable, "Text", f2, subHeaderColor);
// AddCell(datatable, "Step", f2, subHeaderColor);
// AddCell(datatable, "Text", f2, subHeaderColor);
// datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT;
// //datatable.DefaultCellBorderWidth = 1;
// //datatable.DefaultRowspan = 1;
// //datatable.DefaultHorizontalAlignment = Element.ALIGN_LEFT;
// string lastDvPath = "";
// string lastPath = "";
// Color AnnoColor = new Color(0xFF, 0xFF, 0xC0);
// Color TextColor = Color.WHITE;
// Color SectColor = Color.LIGHT_GRAY;
// foreach (ItemInfo item in _ResultList)
// {
// if (item.SearchDVPath != lastDvPath)
// AddGroup(datatable, item.SearchDVPath, lastDvPath, f2, false, new Color(0xC0, 0xFF, 0xC0));
// lastDvPath = item.SearchDVPath;
// //if (item.SearchPath != lastPath)
// string stepPath = AddGroup(datatable, item.SearchPath, lastPath, f2, true, new Color(0xE0, 0xFF, 0xE0));
// lastPath = item.SearchPath;
// AddCell(datatable, stepPath, f2, (item.IsSection ? SectColor : TextColor));
// if (item.DisplayText.Contains("|")) // Need a better way to determine if it is a table.
// AddCell(datatable, item.DisplayText, f3, TextColor);
// else
// AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
// if (item.ItemAnnotationCount > 0)
// {
// foreach (AnnotationInfo ai in item.ItemAnnotations)
// {
// AddCell(datatable, ai.MyAnnotationType.Name, f2, AnnoColor);
// AddCell(datatable, ai.SearchText, f2, AnnoColor);
// }
// }
// }
// document.Add(datatable);
//}
//private static void AddCell(PdfPTable datatable, string str, iTextSharp.text.Font fnt, Color bgColor)
//{
// PdfPCell cell = new PdfPCell(new Phrase(str, fnt));
@ -239,6 +247,7 @@ namespace Volian.Print.Library
try
{
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(fileName, FileMode.Create));
writer.PageEvent = new MyPageHelper(); // JSJ - 7/8/2011
document.SetMargins(36, 36, 36, 36);
document.Open();
_FileName = fileName;
@ -287,7 +296,7 @@ namespace Volian.Print.Library
float[] headerwidths = { 20, 80 };
PdfPTable datatable = new PdfPTable(headerwidths);
datatable.HeaderRows = 3;
datatable.FooterRows = 1;
//datatable.FooterRows = 1;
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
datatable.LockedWidth = true;
//FontFactory.RegisterDirectory(FontFind.FontDir);
@ -296,19 +305,26 @@ namespace Volian.Print.Library
//iTextSharp.text.Font f3 = FontFactory.GetFont("Prestige Elite Tall", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 9);
iTextSharp.text.Font f1 = pdf.GetFont("Arial Unicode MS", 14, 1, Color.BLACK);
iTextSharp.text.Font f2 = pdf.GetFont("Arial Unicode MS", 10, 0, Color.BLACK);
iTextSharp.text.Font f3 = pdf.GetFont("Prestige Elite Tall", 9, 0, Color.BLACK);
iTextSharp.text.Font f3 = pdf.GetFont("Arial Unicode MS", 12, 0, Color.BLACK);
//iTextSharp.text.Font f3 = pdf.GetFont("Prestige Elite Tall", 9, 0, Color.BLACK);
PdfPCell cell = new PdfPCell(new Phrase(ReportTitle, f1));
cell.HorizontalAlignment = Element.ALIGN_CENTER;
cell.Colspan = 2;
cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0);
datatable.AddCell(cell);
cell = new PdfPCell(new Phrase(TypesSelected,f3));
cell.HorizontalAlignment = Element.ALIGN_LEFT;
cell.Colspan = 2;
cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0);
datatable.AddCell(cell);
Color subHeaderColor = new Color(0xD0, 0xF0, 0xD0);
datatable.DefaultCell.Padding = 4;
datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
AddCell(datatable, "Step", f2, subHeaderColor);
AddCell(datatable, "Text", f2, subHeaderColor);
AddCell(datatable, "Step", f2, subHeaderColor);
AddCell(datatable, "Text", f2, subHeaderColor);
// This puts "Step" and "Text" column headers at the bottom of the page
//AddCell(datatable, "Step", f2, subHeaderColor);
//AddCell(datatable, "Text", f2, subHeaderColor);
datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT;
string lastDvPath = "";
string lastPath = "";
@ -323,9 +339,10 @@ namespace Volian.Print.Library
string stepPath = AddGroup(datatable, item.SearchPath, lastPath, f2, true, new Color(0xE0, 0xFF, 0xE0));
lastPath = item.SearchPath;
AddCell(datatable, stepPath, f2, (item.IsSection ? SectColor : TextColor));
if (item.DisplayText.Contains("|")) // Need a better way to determine if it is a table.
AddCell(datatable, item.DisplayText, f3, TextColor);
else
// This was for the old 16-bit style of table - jsj 7/7/2011
//if (item.DisplayText.Contains("|")) // Need a better way to determine if it is a table.
// AddCell(datatable, item.DisplayText, f3, TextColor);
//else
AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
if (item.ItemAnnotationCount > 0)
{
@ -406,4 +423,102 @@ namespace Volian.Print.Library
}
}
public class MyPageHelper : PdfPageEventHelper
{
protected PdfTemplate total;
protected BaseFont helv;
private int ptSize = 10; // text point size of page number and page total
public override void OnOpenDocument(PdfWriter writer, iTextSharp.text.Document document)
{
total = writer.DirectContent.CreateTemplate(100, 100);
total.BoundingBox = new Rectangle(-20, -20, 100, 100);
//try
//{
helv = BaseFont.CreateFont(BaseFont.HELVETICA,
BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
//}
//catch (Exception)
//{
// //throw new ExceptionConverter(e);
//}
}
public override void OnEndPage(PdfWriter writer, iTextSharp.text.Document document)
{
PdfContentByte cb = writer.DirectContent;
cb.SaveState();
String text = "Page " + writer.PageNumber + " of ";
float textBase = document.Bottom - 19;//20;
float textSize = helv.GetWidthPoint(text, ptSize);
cb.BeginText();
cb.SetFontAndSize(helv, ptSize);
//if ((writer.PageNumber % 2) == 1)
//{
// cb.SetTextMatrix(document.Left, textBase);
// cb.ShowText(text);
// cb.EndText();
// cb.AddTemplate(total, document.Left + textSize, textBase);
//}
//else
//{
// float adjust = helv.GetWidthPoint("0", 12);
// cb.SetTextMatrix(
// document.Right - textSize - adjust, textBase);
// cb.ShowText(text);
// cb.EndText();
// cb.AddTemplate(total, document.Right - adjust, textBase);
//}
float posCenter = document.Left + ((document.Right - document.Left) / 2) - (helv.GetWidthPoint(text+"XX", ptSize) / 2);
cb.SetTextMatrix(posCenter, textBase);
cb.ShowText(text);
cb.EndText();
cb.AddTemplate(total, posCenter + helv.GetWidthPoint(text, ptSize), textBase);
cb.RestoreState();
AddVolianFooter(writer,document);
AddDateFooter(writer, document);
}
private void AddVolianFooter(PdfWriter writer, iTextSharp.text.Document document)
{
PdfContentByte cb = writer.DirectContent;
cb.SaveState();
String text = "PROMS Search Results";
float textBase = document.Bottom - 19;//20;
float textSize = helv.GetWidthPoint(text, ptSize);
cb.BeginText();
cb.SetFontAndSize(helv, ptSize);
cb.SetTextMatrix(document.Left, textBase);
cb.ShowText(text);
cb.EndText();
cb.RestoreState();
}
private void AddDateFooter(PdfWriter writer, iTextSharp.text.Document document)
{
PdfContentByte cb = writer.DirectContent;
cb.SaveState();
String text = DateTime.Today.ToShortDateString();
float textBase = document.Bottom - 19;//20;
float textSize = helv.GetWidthPoint(text, ptSize);
float posRight = document.Right - helv.GetWidthPoint(text, ptSize);
cb.BeginText();
cb.SetFontAndSize(helv, ptSize);
cb.SetTextMatrix(posRight, textBase);
cb.ShowText(text);
cb.EndText();
cb.RestoreState();
}
public override void OnCloseDocument(PdfWriter writer, iTextSharp.text.Document document)
{
total.BeginText();
total.SetFontAndSize(helv, ptSize);
total.SetTextMatrix(0, 0);
total.ShowText((writer.PageNumber - 1).ToString());
total.EndText();
base.OnCloseDocument(writer, document);
}
}
}