Hooks for Find/Replace

This commit is contained in:
John Jenko 2010-01-08 17:30:26 +00:00
parent 70a88b5638
commit da8f9e40a9

View File

@ -33,6 +33,8 @@ namespace VEPROMS
Color _CommentTitleBckColor; Color _CommentTitleBckColor;
DocVersionInfo _SelectedDVI = null; DocVersionInfo _SelectedDVI = null;
StepTabPanel _SelectedStepTabPanel=null; StepTabPanel _SelectedStepTabPanel=null;
public FindReplace dlgFindReplace = null;
public StepTabPanel SelectedStepTabPanel public StepTabPanel SelectedStepTabPanel
{ {
get get
@ -131,6 +133,7 @@ namespace VEPROMS
infoPanel.Expanded = false; infoPanel.Expanded = false;
toolsPanel.Expanded = false; toolsPanel.Expanded = false;
ribbonControl1.ExpandedChanged +=new EventHandler(ribbonControl1_ExpandedChanged); ribbonControl1.ExpandedChanged +=new EventHandler(ribbonControl1_ExpandedChanged);
dlgFindReplace = new FindReplace();
} }
bool tv_InsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args) bool tv_InsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args)
@ -810,6 +813,11 @@ namespace VEPROMS
infoTabs.SelectedTab = infotabTags; infoTabs.SelectedTab = infotabTags;
displayTags.HighlightChangeStep(); displayTags.HighlightChangeStep();
} }
else if (args.PanelTabName == "FndRpl")
{
dlgFindReplace.InApproved = (_SelectedDVI != null && _SelectedDVI.VersionType == 127);
dlgFindReplace.Visible = true;
}
} }
private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args) private void tc_StepPanelModeChange(object sender, StepRTBModeChangeEventArgs args)
{ {
@ -874,6 +882,7 @@ namespace VEPROMS
displayRO.ProgressBar = bottomProgBar; displayRO.ProgressBar = bottomProgBar;
lblEditView.Text = args.MyStepItem.MyStepRTB.ViewRTB ? "View" : "Edit"; lblEditView.Text = args.MyStepItem.MyStepRTB.ViewRTB ? "View" : "Edit";
_CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted); _CurrentItem.Deleted += new ItemInfoEvent(_CurrentItem_Deleted);
dlgFindReplace.MyStepItem = args.MyStepItem;
} }
if(tc.SelectedDisplayTabItem != null) if(tc.SelectedDisplayTabItem != null)
SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel; SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;