This commit is contained in:
parent
6cf5c943df
commit
b35612736d
@ -1477,7 +1477,7 @@ namespace Volian.Controls.Library
|
|||||||
Match myMatch = regRefObj.Match(link);
|
Match myMatch = regRefObj.Match(link);
|
||||||
if (myMatch.Success)
|
if (myMatch.Success)
|
||||||
{
|
{
|
||||||
int dbid = int.Parse(myMatch.Groups[2].Value.Substring(0, 4))-1;
|
int dbid = int.Parse(myMatch.Groups[2].Value.Substring(0, 4));
|
||||||
int rodbid = int.Parse(myMatch.Groups[3].Value);
|
int rodbid = int.Parse(myMatch.Groups[3].Value);
|
||||||
ROFstInfo myROFst = myDocVersion.GetROFst(rodbid);
|
ROFstInfo myROFst = myDocVersion.GetROFst(rodbid);
|
||||||
return myROFst.IsSetpointDB(dbid);
|
return myROFst.IsSetpointDB(dbid);
|
||||||
|
@ -16,15 +16,15 @@ namespace Volian.Controls.Library
|
|||||||
private bool findingbookmarks = false;
|
private bool findingbookmarks = false;
|
||||||
|
|
||||||
//private bool _offsetStartPos = false;
|
//private bool _offsetStartPos = false;
|
||||||
private StepItem _MyStepItem;
|
private RTBItem _MyRTBItem;
|
||||||
public StepItem MyStepItem
|
public RTBItem MyRTBItem
|
||||||
{
|
{
|
||||||
get { return _MyStepItem; }
|
get { return _MyRTBItem; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_MyStepItem = value;
|
_MyRTBItem = value;
|
||||||
//DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
//DocVersionInfo dvi = _MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo; //MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
_MyDocVersion = _MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
_MyDocVersion = _MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
SetupContextMenu();
|
SetupContextMenu();
|
||||||
//_offsetStartPos = false; // in a different rtf box, don't offset find position first time around
|
//_offsetStartPos = false; // in a different rtf box, don't offset find position first time around
|
||||||
}
|
}
|
||||||
@ -35,9 +35,9 @@ namespace Volian.Controls.Library
|
|||||||
// get
|
// get
|
||||||
// {
|
// {
|
||||||
// if (_MyDVI != null) return _MyDVI;
|
// if (_MyDVI != null) return _MyDVI;
|
||||||
// if (_MyStepItem != null)
|
// if (_MyRTBItem != null)
|
||||||
// {
|
// {
|
||||||
// ItemInfo procInfo = _MyStepItem.MyItemInfo.MyProcedure as ItemInfo;
|
// ItemInfo procInfo = _MyRTBItem.MyItemInfo.MyProcedure as ItemInfo;
|
||||||
// if (procInfo == null) return null;
|
// if (procInfo == null) return null;
|
||||||
// _MyDVI = procInfo.ActiveParent as DocVersionInfo;
|
// _MyDVI = procInfo.ActiveParent as DocVersionInfo;
|
||||||
// return _MyDVI;
|
// return _MyDVI;
|
||||||
@ -81,7 +81,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public FindReplace()
|
public FindReplace()
|
||||||
{
|
{
|
||||||
//DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
//DocVersionInfo dvi = MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
LoadFindReplaceTextListBox();
|
LoadFindReplaceTextListBox();
|
||||||
//if (dvi != null && dvi.VersionType > 127)
|
//if (dvi != null && dvi.VersionType > 127)
|
||||||
@ -91,8 +91,8 @@ namespace Volian.Controls.Library
|
|||||||
btnFindNext.Enabled = false;
|
btnFindNext.Enabled = false;
|
||||||
btnReplace.Enabled = false;
|
btnReplace.Enabled = false;
|
||||||
btnRplAll.Enabled = false;
|
btnRplAll.Enabled = false;
|
||||||
//if (MyStepItem.MyStepRTB.SelectionLength > 0)
|
//if (MyRTBItem.MyStepRTB.SelectionLength > 0)
|
||||||
// cmboFindText.Text = MyStepItem.MyStepRTB.SelectedText;
|
// cmboFindText.Text = MyRTBItem.MyStepRTB.SelectedText;
|
||||||
cmboFindText.Focus();
|
cmboFindText.Focus();
|
||||||
//SetupContextMenu();
|
//SetupContextMenu();
|
||||||
}
|
}
|
||||||
@ -114,10 +114,10 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public FindReplace(StepItem stpitm)
|
//public FindReplace(RTBItem stpitm)
|
||||||
//{
|
//{
|
||||||
// MyStepItem = stpitm;
|
// MyRTBItem = stpitm;
|
||||||
// DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
// DocVersionInfo dvi = MyRTBItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||||
// InitializeComponent();
|
// InitializeComponent();
|
||||||
// if (dvi != null && dvi.VersionType > 127)
|
// if (dvi != null && dvi.VersionType > 127)
|
||||||
// InApproved = false; // in approved
|
// InApproved = false; // in approved
|
||||||
@ -126,8 +126,8 @@ namespace Volian.Controls.Library
|
|||||||
// btnFindNext.Enabled = false;
|
// btnFindNext.Enabled = false;
|
||||||
// btnReplace.Enabled = false;
|
// btnReplace.Enabled = false;
|
||||||
// btnRplAll.Enabled = false;
|
// btnRplAll.Enabled = false;
|
||||||
// if (MyStepItem.MyStepRTB.SelectionLength > 0)
|
// if (MyRTBItem.MyStepRTB.SelectionLength > 0)
|
||||||
// cmboFindText.Text = MyStepItem.MyStepRTB.SelectedText;
|
// cmboFindText.Text = MyRTBItem.MyStepRTB.SelectedText;
|
||||||
// cmboFindText.Focus();
|
// cmboFindText.Focus();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
btnFindNext_Click(sender, e);
|
btnFindNext_Click(sender, e);
|
||||||
if (found) // found is set in btnFindNext_Click()
|
if (found) // found is set in btnFindNext_Click()
|
||||||
MyStepItem.MyStepRTB.ReplaceText(cmboReplaceText.Text, cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked, false, null);
|
MyRTBItem.MyStepRTB.ReplaceText(cmboReplaceText.Text, cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked, false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnRplAll_Click(object sender, EventArgs e)
|
private void btnRplAll_Click(object sender, EventArgs e)
|
||||||
@ -144,7 +144,7 @@ namespace Volian.Controls.Library
|
|||||||
btnFindNext_Click(sender, e);
|
btnFindNext_Click(sender, e);
|
||||||
while (found) // found is set in btnFindNext_Click()
|
while (found) // found is set in btnFindNext_Click()
|
||||||
{
|
{
|
||||||
if (MyStepItem.MyStepRTB.ReplaceText(cmboReplaceText.Text, cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked, true, this) == DialogResult.Cancel)
|
if (MyRTBItem.MyStepRTB.ReplaceText(cmboReplaceText.Text, cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked, true, this) == DialogResult.Cancel)
|
||||||
found = false;
|
found = false;
|
||||||
else
|
else
|
||||||
btnFindNext_Click(sender, e);
|
btnFindNext_Click(sender, e);
|
||||||
@ -157,11 +157,11 @@ namespace Volian.Controls.Library
|
|||||||
btnFindNext_Click(sender, e);
|
btnFindNext_Click(sender, e);
|
||||||
while (found) // found is set in btnFindNext_Click()
|
while (found) // found is set in btnFindNext_Click()
|
||||||
{
|
{
|
||||||
MyDisplayBookMarks.AddBookMark(MyStepItem.MyItemInfo);
|
MyDisplayBookMarks.AddBookMark(MyRTBItem.MyItemInfo);
|
||||||
btnFindNext_Click(sender, e);
|
btnFindNext_Click(sender, e);
|
||||||
}
|
}
|
||||||
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Bookmarks");
|
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("Bookmarks");
|
||||||
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
|
MyRTBItem.MyStepPanel.OnTabDisplay(sender, args);
|
||||||
findingbookmarks = false;
|
findingbookmarks = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,9 +177,9 @@ namespace Volian.Controls.Library
|
|||||||
found = false;
|
found = false;
|
||||||
AddToComboLists();
|
AddToComboLists();
|
||||||
doingfind = true;
|
doingfind = true;
|
||||||
while (!MyStepItem.MyStepRTB.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked))
|
while (!MyRTBItem.MyStepRTB.FindText(cmboFindText.Text, cbxCaseSensitive.Checked, cbxWholeWord.Checked, cbxReverse.Checked))
|
||||||
{
|
{
|
||||||
ItemInfo next = (cbxReverse.Checked) ? MyStepItem.MyItemInfo.SearchPrev : MyStepItem.MyItemInfo.SearchNext;
|
ItemInfo next = (cbxReverse.Checked) ? MyRTBItem.MyItemInfo.SearchPrev : MyRTBItem.MyItemInfo.SearchNext;
|
||||||
while (!next.IsSection && !next.MyContent.Text.ToUpper().Contains(cmboFindText.Text.ToUpper()))
|
while (!next.IsSection && !next.MyContent.Text.ToUpper().Contains(cmboFindText.Text.ToUpper()))
|
||||||
next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext;
|
next = (cbxReverse.Checked) ? next.SearchPrev : next.SearchNext;
|
||||||
if (next.IsSection)
|
if (next.IsSection)
|
||||||
@ -193,11 +193,11 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MyStepItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
|
MyRTBItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OpenItem(next);
|
||||||
if (cbxReverse.Checked)
|
if (cbxReverse.Checked)
|
||||||
MyStepItem.MyStepRTB.SelectionStart = MyStepItem.MyStepRTB.Text.Length;
|
MyRTBItem.MyStepRTB.SelectionStart = MyRTBItem.MyStepRTB.Text.Length;
|
||||||
}
|
}
|
||||||
MyStepItem.MyStepRTB.Focus();
|
MyRTBItem.MyStepRTB.Focus();
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private void FindReplace_Activated(object sender, EventArgs e)
|
private void FindReplace_Activated(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
StepRTB srtb = MyStepItem.MyStepRTB;
|
StepRTB srtb = MyRTBItem.MyStepRTB;
|
||||||
if (srtb.SelectionLength > 0 && !doingfind)
|
if (srtb.SelectionLength > 0 && !doingfind)
|
||||||
{
|
{
|
||||||
if (srtb.IsSelectionLinked(srtb.SelectionStart, srtb.SelectionLength))
|
if (srtb.IsSelectionLinked(srtb.SelectionStart, srtb.SelectionLength))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user