This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user