Find/Replace dialog box

This commit is contained in:
John Jenko 2010-01-08 17:32:58 +00:00
parent da8f9e40a9
commit 281ef2abd3
3 changed files with 701 additions and 0 deletions

View File

@ -0,0 +1,414 @@
namespace Volian.Controls.Library
{
partial class FindReplace
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FindReplace));
this.btnReplace = new DevComponents.DotNetBar.ButtonX();
this.btnFndRplDone = new DevComponents.DotNetBar.ButtonX();
this.btnFindNext = new DevComponents.DotNetBar.ButtonX();
this.cmboReplaceText = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.lblRplTxt = new DevComponents.DotNetBar.LabelX();
this.cmboFindText = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.labelX3 = new DevComponents.DotNetBar.LabelX();
this.btnRplAll = new DevComponents.DotNetBar.ButtonX();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.cbxReverse = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbxWholeWord = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbxCaseSensitive = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmbScope = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.comboItem1 = new DevComponents.Editors.ComboItem();
this.comboItem2 = new DevComponents.Editors.ComboItem();
this.comboItem3 = new DevComponents.Editors.ComboItem();
this.comboItem4 = new DevComponents.Editors.ComboItem();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.btnBookMrkAll = new DevComponents.DotNetBar.ButtonX();
this.tabControl1 = new DevComponents.DotNetBar.TabControl();
this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel();
this.tabFind = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.tabReplace = new DevComponents.DotNetBar.TabItem(this.components);
this.panelEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tabControl1)).BeginInit();
this.tabControl1.SuspendLayout();
this.SuspendLayout();
//
// btnReplace
//
this.btnReplace.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnReplace.Location = new System.Drawing.Point(267, 179);
this.btnReplace.Name = "btnReplace";
this.btnReplace.Size = new System.Drawing.Size(75, 34);
this.btnReplace.TabIndex = 9;
this.btnReplace.Text = "Replace";
this.btnReplace.Visible = false;
this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
//
// btnFndRplDone
//
this.btnFndRplDone.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnFndRplDone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnFndRplDone.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnFndRplDone.Location = new System.Drawing.Point(491, 179);
this.btnFndRplDone.Name = "btnFndRplDone";
this.btnFndRplDone.Size = new System.Drawing.Size(75, 33);
this.btnFndRplDone.TabIndex = 11;
this.btnFndRplDone.Text = "Done";
this.btnFndRplDone.Click += new System.EventHandler(this.btnFndRplDone_Click);
//
// btnFindNext
//
this.btnFindNext.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnFindNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnFindNext.Location = new System.Drawing.Point(10, 179);
this.btnFindNext.Name = "btnFindNext";
this.btnFindNext.Size = new System.Drawing.Size(75, 33);
this.btnFindNext.TabIndex = 7;
this.btnFindNext.Text = "Find Next";
this.btnFindNext.Click += new System.EventHandler(this.btnFindNext_Click);
//
// cmboReplaceText
//
this.cmboReplaceText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cmboReplaceText.DisplayMember = "Text";
this.cmboReplaceText.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmboReplaceText.FormattingEnabled = true;
this.cmboReplaceText.Location = new System.Drawing.Point(108, 50);
this.cmboReplaceText.Name = "cmboReplaceText";
this.cmboReplaceText.Size = new System.Drawing.Size(463, 23);
this.cmboReplaceText.TabIndex = 2;
this.cmboReplaceText.Visible = false;
this.cmboReplaceText.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboReplaceText.WatermarkText = "Enter replace text";
this.cmboReplaceText.TextChanged += new System.EventHandler(this.cmboReplaceText_TextChanged);
//
// lblRplTxt
//
//
//
//
this.lblRplTxt.BackgroundStyle.Class = "";
this.lblRplTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblRplTxt.Location = new System.Drawing.Point(10, 50);
this.lblRplTxt.Name = "lblRplTxt";
this.lblRplTxt.Size = new System.Drawing.Size(96, 28);
this.lblRplTxt.TabIndex = 6;
this.lblRplTxt.Text = "Replace Text:";
this.lblRplTxt.Visible = false;
//
// cmboFindText
//
this.cmboFindText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cmboFindText.DisplayMember = "Text";
this.cmboFindText.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmboFindText.FormattingEnabled = true;
this.cmboFindText.Location = new System.Drawing.Point(108, 10);
this.cmboFindText.Name = "cmboFindText";
this.cmboFindText.Size = new System.Drawing.Size(463, 23);
this.cmboFindText.TabIndex = 1;
this.cmboFindText.WatermarkFont = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboFindText.WatermarkText = "Enter text to find";
this.cmboFindText.TextChanged += new System.EventHandler(this.cmboFindText_TextChanged);
//
// labelX3
//
//
//
//
this.labelX3.BackgroundStyle.Class = "";
this.labelX3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX3.Location = new System.Drawing.Point(29, 10);
this.labelX3.Name = "labelX3";
this.labelX3.Size = new System.Drawing.Size(74, 26);
this.labelX3.TabIndex = 8;
this.labelX3.Text = "Find Text: ";
//
// btnRplAll
//
this.btnRplAll.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnRplAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnRplAll.Location = new System.Drawing.Point(348, 179);
this.btnRplAll.Name = "btnRplAll";
this.btnRplAll.Size = new System.Drawing.Size(107, 34);
this.btnRplAll.TabIndex = 10;
this.btnRplAll.Text = "Replace All";
this.btnRplAll.Visible = false;
//
// panelEx1
//
this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelEx1.CanvasColor = System.Drawing.Color.Transparent;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.panelEx1.Controls.Add(this.cbxReverse);
this.panelEx1.Controls.Add(this.cbxWholeWord);
this.panelEx1.Controls.Add(this.cbxCaseSensitive);
this.panelEx1.Controls.Add(this.cmbScope);
this.panelEx1.Controls.Add(this.labelX1);
this.panelEx1.Controls.Add(this.labelX3);
this.panelEx1.Controls.Add(this.lblRplTxt);
this.panelEx1.Controls.Add(this.cmboReplaceText);
this.panelEx1.Controls.Add(this.cmboFindText);
this.panelEx1.Location = new System.Drawing.Point(0, 22);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(584, 153);
this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254)))));
this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(142)))), ((int)(((byte)(179)))), ((int)(((byte)(231)))));
this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(59)))), ((int)(((byte)(97)))), ((int)(((byte)(156)))));
this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx1.Style.GradientAngle = 90;
this.panelEx1.TabIndex = 15;
//
// cbxReverse
//
//
//
//
this.cbxReverse.BackgroundStyle.Class = "";
this.cbxReverse.Location = new System.Drawing.Point(10, 127);
this.cbxReverse.Name = "cbxReverse";
this.cbxReverse.Size = new System.Drawing.Size(100, 23);
this.cbxReverse.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxReverse.TabIndex = 5;
this.cbxReverse.Text = "Reverse Find";
//
// cbxWholeWord
//
//
//
//
this.cbxWholeWord.BackgroundStyle.Class = "";
this.cbxWholeWord.Location = new System.Drawing.Point(10, 103);
this.cbxWholeWord.Name = "cbxWholeWord";
this.cbxWholeWord.Size = new System.Drawing.Size(100, 27);
this.cbxWholeWord.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxWholeWord.TabIndex = 4;
this.cbxWholeWord.Text = "Whole Word";
//
// cbxCaseSensitive
//
//
//
//
this.cbxCaseSensitive.BackgroundStyle.Class = "";
this.cbxCaseSensitive.Location = new System.Drawing.Point(10, 84);
this.cbxCaseSensitive.Name = "cbxCaseSensitive";
this.cbxCaseSensitive.Size = new System.Drawing.Size(116, 23);
this.cbxCaseSensitive.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxCaseSensitive.TabIndex = 3;
this.cbxCaseSensitive.Text = "Case Sensitive";
//
// cmbScope
//
this.cmbScope.DisplayMember = "Text";
this.cmbScope.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbScope.FormattingEnabled = true;
this.cmbScope.ItemHeight = 16;
this.cmbScope.Items.AddRange(new object[] {
this.comboItem1,
this.comboItem2,
this.comboItem3,
this.comboItem4});
this.cmbScope.Location = new System.Drawing.Point(315, 104);
this.cmbScope.Name = "cmbScope";
this.cmbScope.Size = new System.Drawing.Size(248, 22);
this.cmbScope.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbScope.TabIndex = 6;
//
// comboItem1
//
this.comboItem1.Text = "Current Section";
//
// comboItem2
//
this.comboItem2.Text = "Current Procedure";
//
// comboItem3
//
this.comboItem3.Text = "Current Tabs";
//
// comboItem4
//
this.comboItem4.Text = "Current Set";
//
// labelX1
//
//
//
//
this.labelX1.BackgroundStyle.Class = "";
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelX1.Location = new System.Drawing.Point(263, 103);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(56, 23);
this.labelX1.TabIndex = 12;
this.labelX1.Text = "Scope:";
//
// btnBookMrkAll
//
this.btnBookMrkAll.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnBookMrkAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnBookMrkAll.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btnBookMrkAll.Location = new System.Drawing.Point(134, 179);
this.btnBookMrkAll.Name = "btnBookMrkAll";
this.btnBookMrkAll.Size = new System.Drawing.Size(94, 33);
this.btnBookMrkAll.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBookMrkAll.TabIndex = 8;
this.btnBookMrkAll.Text = "Bookmark All";
//
// tabControl1
//
this.tabControl1.BackColor = System.Drawing.Color.White;
this.tabControl1.CanReorderTabs = true;
this.tabControl1.ColorScheme.TabItemSelectedBackground2 = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tabControl1.Controls.Add(this.tabControlPanel1);
this.tabControl1.Controls.Add(this.tabControlPanel2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Top;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabControl1.SelectedTabIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(584, 22);
this.tabControl1.TabIndex = 14;
this.tabControl1.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox;
this.tabControl1.Tabs.Add(this.tabFind);
this.tabControl1.Tabs.Add(this.tabReplace);
this.tabControl1.Text = "tabControl1";
//
// tabControlPanel1
//
this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel1.Location = new System.Drawing.Point(0, 26);
this.tabControlPanel1.Name = "tabControlPanel1";
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel1.Size = new System.Drawing.Size(584, 0);
this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tabControlPanel1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254)))));
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(59)))), ((int)(((byte)(97)))), ((int)(((byte)(156)))));
this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel1.Style.GradientAngle = 90;
this.tabControlPanel1.TabIndex = 1;
this.tabControlPanel1.TabItem = this.tabFind;
//
// tabFind
//
this.tabFind.AttachedControl = this.tabControlPanel1;
this.tabFind.Name = "tabFind";
this.tabFind.Text = "Find";
this.tabFind.Click += new System.EventHandler(this.tabFind_Click);
//
// tabControlPanel2
//
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 26);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(584, 0);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tabControlPanel2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(237)))), ((int)(((byte)(254)))));
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(59)))), ((int)(((byte)(97)))), ((int)(((byte)(156)))));
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.tabReplace;
//
// tabReplace
//
this.tabReplace.AttachedControl = this.tabControlPanel2;
this.tabReplace.Name = "tabReplace";
this.tabReplace.Text = "Replace";
this.tabReplace.Click += new System.EventHandler(this.tabReplace_Click);
//
// FindReplace
//
this.AcceptButton = this.btnFindNext;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Gray;
this.CancelButton = this.btnFndRplDone;
this.ClientSize = new System.Drawing.Size(584, 217);
this.Controls.Add(this.panelEx1);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.btnBookMrkAll);
this.Controls.Add(this.btnRplAll);
this.Controls.Add(this.btnFindNext);
this.Controls.Add(this.btnFndRplDone);
this.Controls.Add(this.btnReplace);
this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FindReplace";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Find and Replace";
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindReplace_FormClosing);
this.panelEx1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tabControl1)).EndInit();
this.tabControl1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.ButtonX btnReplace;
private DevComponents.DotNetBar.ButtonX btnFndRplDone;
private DevComponents.DotNetBar.ButtonX btnFindNext;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmboReplaceText;
private DevComponents.DotNetBar.LabelX lblRplTxt;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmboFindText;
private DevComponents.DotNetBar.LabelX labelX3;
private DevComponents.DotNetBar.ButtonX btnRplAll;
private DevComponents.DotNetBar.PanelEx panelEx1;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbScope;
private DevComponents.Editors.ComboItem comboItem1;
private DevComponents.Editors.ComboItem comboItem2;
private DevComponents.Editors.ComboItem comboItem3;
private DevComponents.Editors.ComboItem comboItem4;
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.CheckBoxX cbxCaseSensitive;
private DevComponents.DotNetBar.ButtonX btnBookMrkAll;
private DevComponents.DotNetBar.Controls.CheckBoxX cbxWholeWord;
private DevComponents.DotNetBar.Controls.CheckBoxX cbxReverse;
private DevComponents.DotNetBar.TabControl tabControl1;
private DevComponents.DotNetBar.TabControlPanel tabControlPanel1;
private DevComponents.DotNetBar.TabItem tabFind;
private DevComponents.DotNetBar.TabControlPanel tabControlPanel2;
private DevComponents.DotNetBar.TabItem tabReplace;
}
}

View File

@ -0,0 +1,144 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
namespace Volian.Controls.Library
{
public partial class FindReplace : DevComponents.DotNetBar.Office2007Form
{
//private bool _offsetStartPos = false;
private StepItem _MyStepItem;
public StepItem MyStepItem
{
get { return _MyStepItem; }
set
{
_MyStepItem = value;
//_offsetStartPos = false; // in a different rtf box, don't offset find position first time around
}
}
//private DocVersionInfo _MyDVI;
//public DocVersionInfo MyDVI
//{
// get
// {
// if (_MyDVI != null) return _MyDVI;
// if (_MyStepItem != null)
// {
// ItemInfo procInfo = _MyStepItem.MyItemInfo.MyProcedure as ItemInfo;
// if (procInfo == null) return null;
// _MyDVI = procInfo.ActiveParent as DocVersionInfo;
// return _MyDVI;
// }
// return null;
// }
//}
private bool _InApproved;
public bool InApproved
{
get { return _InApproved; }
set { _InApproved = value; }
}
public FindReplace()
{
//DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
InitializeComponent();
//if (dvi != null && dvi.VersionType > 127)
// InApproved = false; // in approved
cmbScope.SelectedIndex = 0;
btnBookMrkAll.Enabled = false;
btnFindNext.Enabled = false;
btnReplace.Enabled = false;
btnRplAll.Enabled = false;
//if (MyStepItem.MyStepRTB.SelectionLength > 0)
// cmboFindText.Text = MyStepItem.MyStepRTB.SelectedText;
cmboFindText.Focus();
}
//public FindReplace(StepItem stpitm)
//{
// MyStepItem = stpitm;
// DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
// InitializeComponent();
// if (dvi != null && dvi.VersionType > 127)
// InApproved = false; // in approved
// cmbScope.SelectedIndex = 0;
// btnBookMrkAll.Enabled = false;
// btnFindNext.Enabled = false;
// btnReplace.Enabled = false;
// btnRplAll.Enabled = false;
// if (MyStepItem.MyStepRTB.SelectionLength > 0)
// cmboFindText.Text = MyStepItem.MyStepRTB.SelectedText;
// cmboFindText.Focus();
//}
private void btnReplace_Click(object sender, EventArgs e)
{
if (!cmboReplaceText.Items.Contains(cmboReplaceText.Text))
cmboReplaceText.Items.Add(cmboReplaceText.Text);
}
private void btnFndRplDone_Click(object sender, EventArgs e)
{
//this.Close();
this.Visible = false;
}
private void btnFindNext_Click(object sender, EventArgs e)
{
if (!cmboFindText.Items.Contains(cmboFindText.Text))
cmboFindText.Items.Add(cmboFindText.Text);
MyStepItem.MyStepRTB.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked);
MyStepItem.MyStepRTB.Focus();
}
private void cmboFindText_TextChanged(object sender, EventArgs e)
{
bool hastext = this.cmboFindText.Text.Length > 0;
btnFindNext.Enabled = hastext;
btnBookMrkAll.Enabled = hastext;
btnReplace.Enabled = btnRplAll.Enabled = hastext && !InApproved;
}
private void cmboReplaceText_TextChanged(object sender, EventArgs e)
{
btnReplace.Enabled = btnRplAll.Enabled = !InApproved && cmboFindText.Text.Length > 0;
}
public void PerformFindNext()
{
btnFindNext.PerformClick();
}
private void tabFind_Click(object sender, EventArgs e)
{
lblRplTxt.Visible = false;
cmboReplaceText.Visible = false;
btnReplace.Visible = false;
btnRplAll.Visible = false;
}
private void tabReplace_Click(object sender, EventArgs e)
{
lblRplTxt.Visible = true;
cmboReplaceText.Visible = true;
btnReplace.Visible = true;
btnRplAll.Visible = true;
}
private void FindReplace_FormClosing(object sender, FormClosingEventArgs e)
{
btnFndRplDone_Click(sender, e);
e.Cancel = true; // cancel the form close event - the Done_Click() will hide it instead
}
}
}

View File

@ -0,0 +1,143 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAICAQAAAAAADoAgAAJgAAABAQEAAAAAAAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAIAC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIhwAAAAAAAAAACIcAAAAACI
cAAAAAAAAAAAiHAAAAAAiHAAAAAAAAAAAIhwAAAAAIhwAAAAAAAAAACIcAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAIgAAAAAAAAACIAAAAAAAACIBwAAAAAAAAiAcAAAAAAAiAcAAAAIAAAI
gHAAAAAAAIgHAAAACAAACIBwAAAAAACIBwAAAAgAAAiAcAAAAAAAiAcAAAAIAAAIgHAAAAAAAAAHAAAA
AAAAAABwAAAAAAAABwAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIcAAAAAiIcAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdwAAAAAAdwAAAA
AAAAAAAHcAAAAAAHcAAAAAAAAAAAB3AAAAAAB3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
/////////////4A/+AOAP/gDgD/4A4A/+AOAP/gDgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAADgAAAA4AA
AAPAAAAHwAAAB8AAAAf4A4A/+AOAP/gDgD/4A4A//AfAf/wHwH/8B8B//AfAf///////////////////
//8oAAAAEAAAACAAAAABAAQAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA
AACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAACAAAAAAIAAAIAAAAAAgAAAAAAAAAAAAACHAAAACHAAAIcAAAAIcAAAhwAAAAhwAAAA
AAAAAAAAAAiAAACIAAAAAAAAAAAAAAAAcAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP//
AACH4QAAh+EAAIfhAACBgQAAgAEAAIABAACAAQAAgAEAAMGDAADhhwAA4YcAAOGHAAD//wAA//8AAA==
</value>
</data>
</root>