This commit is contained in:
John Jenko 2011-03-29 17:30:09 +00:00
parent 7f22d62f00
commit 0d79abd34d
4 changed files with 95 additions and 69 deletions

View File

@ -974,6 +974,7 @@ namespace VEPROMS
private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args)
{
this.lblEditView.Text = args.ViewMode == E_ViewMode.Edit ? "Edit" : "View";
this.dlgFindReplace.ToggleReplaceTab(args.ViewMode);
}
private ItemInfo _CurrentItem = null;
private StepRTB _LastStepRTB = null;

View File

@ -93,10 +93,10 @@ namespace Volian.Controls.Library
//
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(200, 149);
this.btnReplace.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnReplace.Location = new System.Drawing.Point(267, 183);
this.btnReplace.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnReplace.Name = "btnReplace";
this.btnReplace.Size = new System.Drawing.Size(56, 28);
this.btnReplace.Size = new System.Drawing.Size(75, 34);
this.btnReplace.TabIndex = 9;
this.btnReplace.Text = "Replace";
this.btnReplace.Visible = false;
@ -107,10 +107,10 @@ namespace Volian.Controls.Library
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(368, 149);
this.btnFndRplDone.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnFndRplDone.Location = new System.Drawing.Point(491, 183);
this.btnFndRplDone.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnFndRplDone.Name = "btnFndRplDone";
this.btnFndRplDone.Size = new System.Drawing.Size(56, 27);
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);
@ -119,10 +119,10 @@ namespace Volian.Controls.Library
//
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(8, 149);
this.btnFindNext.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnFindNext.Location = new System.Drawing.Point(11, 183);
this.btnFindNext.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnFindNext.Name = "btnFindNext";
this.btnFindNext.Size = new System.Drawing.Size(56, 27);
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);
@ -135,11 +135,11 @@ namespace Volian.Controls.Library
this.cmboReplaceText.DisplayMember = "Text";
this.cmboReplaceText.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmboReplaceText.FormattingEnabled = true;
this.cmboReplaceText.Location = new System.Drawing.Point(83, 41);
this.cmboReplaceText.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cmboReplaceText.Location = new System.Drawing.Point(111, 50);
this.cmboReplaceText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmboReplaceText.MaxDropDownItems = 10;
this.cmboReplaceText.Name = "cmboReplaceText";
this.cmboReplaceText.Size = new System.Drawing.Size(345, 21);
this.cmboReplaceText.Size = new System.Drawing.Size(459, 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)));
@ -152,11 +152,12 @@ namespace Volian.Controls.Library
//
//
this.lblRplTxt.BackgroundStyle.Class = "";
this.lblRplTxt.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
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(4, 40);
this.lblRplTxt.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.lblRplTxt.Location = new System.Drawing.Point(5, 49);
this.lblRplTxt.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.lblRplTxt.Name = "lblRplTxt";
this.lblRplTxt.Size = new System.Drawing.Size(79, 23);
this.lblRplTxt.Size = new System.Drawing.Size(105, 28);
this.lblRplTxt.TabIndex = 6;
this.lblRplTxt.Text = "Replace Text:";
this.lblRplTxt.Visible = false;
@ -169,11 +170,11 @@ namespace Volian.Controls.Library
this.cmboFindText.DisplayMember = "Text";
this.cmboFindText.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmboFindText.FormattingEnabled = true;
this.cmboFindText.Location = new System.Drawing.Point(83, 8);
this.cmboFindText.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cmboFindText.Location = new System.Drawing.Point(111, 10);
this.cmboFindText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmboFindText.MaxDropDownItems = 10;
this.cmboFindText.Name = "cmboFindText";
this.cmboFindText.Size = new System.Drawing.Size(345, 21);
this.cmboFindText.Size = new System.Drawing.Size(459, 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";
@ -186,11 +187,12 @@ namespace Volian.Controls.Library
//
//
this.labelX3.BackgroundStyle.Class = "";
this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
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(22, 8);
this.labelX3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.labelX3.Location = new System.Drawing.Point(29, 10);
this.labelX3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.labelX3.Name = "labelX3";
this.labelX3.Size = new System.Drawing.Size(56, 21);
this.labelX3.Size = new System.Drawing.Size(75, 26);
this.labelX3.TabIndex = 8;
this.labelX3.Text = "Find Text: ";
//
@ -198,10 +200,10 @@ namespace Volian.Controls.Library
//
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(261, 149);
this.btnRplAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnRplAll.Location = new System.Drawing.Point(348, 183);
this.btnRplAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnRplAll.Name = "btnRplAll";
this.btnRplAll.Size = new System.Drawing.Size(80, 28);
this.btnRplAll.Size = new System.Drawing.Size(107, 34);
this.btnRplAll.TabIndex = 10;
this.btnRplAll.Text = "Replace All";
this.btnRplAll.Visible = false;
@ -222,10 +224,10 @@ namespace Volian.Controls.Library
this.panelEx1.Controls.Add(this.cmboReplaceText);
this.panelEx1.Controls.Add(this.cmboFindText);
this.panelEx1.Dock = System.Windows.Forms.DockStyle.Top;
this.panelEx1.Location = new System.Drawing.Point(0, 19);
this.panelEx1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panelEx1.Location = new System.Drawing.Point(0, 23);
this.panelEx1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panelEx1.Name = "panelEx1";
this.panelEx1.Size = new System.Drawing.Size(437, 124);
this.panelEx1.Size = new System.Drawing.Size(583, 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)))));
@ -241,10 +243,10 @@ namespace Volian.Controls.Library
this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Top;
this.contextMenuBar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.btnCmFndRpl});
this.contextMenuBar1.Location = new System.Drawing.Point(115, 68);
this.contextMenuBar1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.contextMenuBar1.Location = new System.Drawing.Point(153, 84);
this.contextMenuBar1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.contextMenuBar1.Name = "contextMenuBar1";
this.contextMenuBar1.Size = new System.Drawing.Size(56, 25);
this.contextMenuBar1.Size = new System.Drawing.Size(75, 29);
this.contextMenuBar1.Stretch = true;
this.contextMenuBar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.contextMenuBar1.TabIndex = 13;
@ -314,6 +316,7 @@ namespace Volian.Controls.Library
//
//
this.galSymbols.BackgroundStyle.Class = "";
this.galSymbols.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.galSymbols.EnableGalleryPopup = false;
this.galSymbols.MinimumSize = new System.Drawing.Size(150, 200);
this.galSymbols.Name = "galSymbols";
@ -325,10 +328,11 @@ namespace Volian.Controls.Library
//
//
this.cbxReverse.BackgroundStyle.Class = "";
this.cbxReverse.Location = new System.Drawing.Point(8, 103);
this.cbxReverse.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbxReverse.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbxReverse.Location = new System.Drawing.Point(11, 127);
this.cbxReverse.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxReverse.Name = "cbxReverse";
this.cbxReverse.Size = new System.Drawing.Size(103, 19);
this.cbxReverse.Size = new System.Drawing.Size(137, 23);
this.cbxReverse.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxReverse.TabIndex = 5;
this.cbxReverse.Text = "Reverse Find";
@ -339,10 +343,11 @@ namespace Volian.Controls.Library
//
//
this.cbxWholeWord.BackgroundStyle.Class = "";
this.cbxWholeWord.Location = new System.Drawing.Point(8, 84);
this.cbxWholeWord.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbxWholeWord.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbxWholeWord.Location = new System.Drawing.Point(11, 103);
this.cbxWholeWord.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxWholeWord.Name = "cbxWholeWord";
this.cbxWholeWord.Size = new System.Drawing.Size(94, 22);
this.cbxWholeWord.Size = new System.Drawing.Size(125, 27);
this.cbxWholeWord.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxWholeWord.TabIndex = 4;
this.cbxWholeWord.Text = "Whole Word";
@ -353,10 +358,11 @@ namespace Volian.Controls.Library
//
//
this.cbxCaseSensitive.BackgroundStyle.Class = "";
this.cbxCaseSensitive.Location = new System.Drawing.Point(8, 68);
this.cbxCaseSensitive.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cbxCaseSensitive.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbxCaseSensitive.Location = new System.Drawing.Point(11, 84);
this.cbxCaseSensitive.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxCaseSensitive.Name = "cbxCaseSensitive";
this.cbxCaseSensitive.Size = new System.Drawing.Size(103, 19);
this.cbxCaseSensitive.Size = new System.Drawing.Size(137, 23);
this.cbxCaseSensitive.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cbxCaseSensitive.TabIndex = 3;
this.cbxCaseSensitive.Text = "Case Sensitive";
@ -372,10 +378,10 @@ namespace Volian.Controls.Library
this.comboItem2,
this.comboItem3,
this.comboItem4});
this.cmbScope.Location = new System.Drawing.Point(236, 84);
this.cmbScope.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cmbScope.Location = new System.Drawing.Point(315, 103);
this.cmbScope.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmbScope.Name = "cmbScope";
this.cmbScope.Size = new System.Drawing.Size(187, 22);
this.cmbScope.Size = new System.Drawing.Size(248, 22);
this.cmbScope.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbScope.TabIndex = 6;
this.cmbScope.Visible = false;
@ -402,11 +408,12 @@ namespace Volian.Controls.Library
//
//
this.labelX1.BackgroundStyle.Class = "";
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
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(190, 84);
this.labelX1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.labelX1.Location = new System.Drawing.Point(253, 103);
this.labelX1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(42, 19);
this.labelX1.Size = new System.Drawing.Size(56, 23);
this.labelX1.TabIndex = 12;
this.labelX1.Text = "Scope:";
this.labelX1.Visible = false;
@ -416,10 +423,10 @@ namespace Volian.Controls.Library
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(100, 149);
this.btnBookMrkAll.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnBookMrkAll.Location = new System.Drawing.Point(133, 183);
this.btnBookMrkAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.btnBookMrkAll.Name = "btnBookMrkAll";
this.btnBookMrkAll.Size = new System.Drawing.Size(70, 27);
this.btnBookMrkAll.Size = new System.Drawing.Size(93, 33);
this.btnBookMrkAll.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnBookMrkAll.TabIndex = 8;
this.btnBookMrkAll.Text = "Bookmark All";
@ -449,11 +456,11 @@ namespace Volian.Controls.Library
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.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
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(437, 19);
this.tabControl1.Size = new System.Drawing.Size(583, 23);
this.tabControl1.Style = DevComponents.DotNetBar.eTabStripStyle.Office2007Document;
this.tabControl1.TabIndex = 14;
this.tabControl1.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox;
@ -464,11 +471,11 @@ namespace Volian.Controls.Library
// tabControlPanel1
//
this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel1.Location = new System.Drawing.Point(0, 22);
this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tabControlPanel1.Location = new System.Drawing.Point(0, 24);
this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tabControlPanel1.Name = "tabControlPanel1";
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel1.Size = new System.Drawing.Size(437, 0);
this.tabControlPanel1.Size = new System.Drawing.Size(583, 0);
this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
@ -489,11 +496,11 @@ namespace Volian.Controls.Library
// tabControlPanel2
//
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 22);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
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(437, 0);
this.tabControlPanel2.Size = new System.Drawing.Size(583, 0);
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;
@ -514,11 +521,11 @@ namespace Volian.Controls.Library
// FindReplace
//
this.AcceptButton = this.btnFindNext;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.CancelButton = this.btnFndRplDone;
this.ClientSize = new System.Drawing.Size(437, 180);
this.ClientSize = new System.Drawing.Size(583, 222);
this.Controls.Add(this.panelEx1);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.btnBookMrkAll);
@ -527,8 +534,9 @@ namespace Volian.Controls.Library
this.Controls.Add(this.btnFndRplDone);
this.Controls.Add(this.btnReplace);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.Name = "FindReplace";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Find and Replace";

View File

@ -357,6 +357,17 @@ namespace Volian.Controls.Library
if (find != null) cmboFindText.Text = find;
}
}
public void ToggleReplaceTab(E_ViewMode vm)
{
if (vm == E_ViewMode.View)
{
if (tabReplace.IsSelected)
tabFind.PerformClick();
tabReplace.Visible = false;
}
else
tabReplace.Visible = true;
}
}
}

View File

@ -577,13 +577,15 @@ namespace Volian.Controls.Library
int sl = MyStepRTB.SelectionLength;
MyFlexGrid.StartEditing();
MyStepRTB.Select(ss, sl); // need to reset selection because startediting positions to end.
if (!MyStepRTB.ReadOnly)
if (MyStepRTB.ReadOnly)
{
string oldRtf = MyStepRTB.Rtf;
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
MessageBox.Show("Cannot replace linked text!", "Find/Replace", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
return DialogResult.Yes;
}
string oldRtf = MyStepRTB.Rtf;
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
}
c = c + 1;
if (c == w)
@ -609,13 +611,15 @@ namespace Volian.Controls.Library
int sl = MyStepRTB.SelectionLength;
MyFlexGrid.StartEditing();
MyStepRTB.Select(ss, sl);
if (!MyStepRTB.ReadOnly)
if (MyStepRTB.ReadOnly)
{
string oldRtf = MyStepRTB.Rtf;
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
MessageBox.Show("Cannot replace linked text!", "Find/Replace", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
return DialogResult.Yes;
}
string oldRtf = MyStepRTB.Rtf;
DialogResult dr = MyStepRTB.ReplaceText(rpltxt, fndstr, caseSensitive, matchWholeWord, reverse, prompt, fndrpldlg);
if (oldRtf != MyStepRTB.Rtf) MyFlexGrid[r, c] = MyStepRTB.Rtf;
if (dr == DialogResult.Yes || dr == DialogResult.Cancel) return dr;
}
c = c - 1;
if (c < 0)
@ -636,6 +640,8 @@ namespace Volian.Controls.Library
}
public override bool FindText(string str, bool caseSensitive, bool matchWholeWord, bool reverse)
{
if (MyFlexGrid.Row < 0) MyFlexGrid.Row = (reverse) ? MyFlexGrid.Rows.Count - 1 : 0;
if (MyFlexGrid.Col < 0) MyFlexGrid.Col = (reverse) ? MyFlexGrid.Cols.Count - 1 : 0;
int r = MyFlexGrid.Row;
int c = MyFlexGrid.Col;
if (!reverse)