示例#1
0
        public FindReplaceDialog(string defaultSearchText, 
            string defaultReplaceText, EditorPreferences preferences,
            FindReplace findReplace)
        {
            _findReplace = findReplace;
            _preferences = preferences;
            InitializeComponent();
            btnOK.Enabled = false;

            foreach (string previousSearch in preferences.RecentSearches)
            {
                cmbFind.Items.Add(previousSearch);
                cmbReplace.Items.Add(previousSearch);
            }

            cmbLookIn.Items.Add(LOOK_IN_CURRENT_DOCUMENT);
            cmbLookIn.Items.Add(LOOK_IN_CURRENT_PROJECT);
            cmbLookIn.Text = _lastSelectedLookIn ?? LOOK_IN_CURRENT_DOCUMENT;

            chkCaseSensitive.Checked = _lastSelectedCaseSensitive;

            cmbFind.Text = defaultSearchText;
            cmbReplace.Text = defaultReplaceText;
            btnCancel.Left = btnReplace.Left;
            cmbFind.Focus();
        }
示例#2
0
 private void ShowFindReplaceDialog(bool showReplace, bool showAll)
 {
     FindReplace findReplace = new FindReplace(_script, _agsEditor,
         _lastSearchText, _lastCaseSensitive);
     findReplace.LastSearchTextChanged += new FindReplace.LastSearchTextChangedHandler(findReplace_LastSearchTextChanged);
     findReplace.ShowFindReplaceDialog(showReplace, showAll);
 }
示例#3
0
 private void ShowFindReplaceDialog(bool showReplace, bool showAll)
 {
     FindReplace findReplace = new FindReplace(_dialog, _agsEditor,
         _lastSearchText, _lastCaseSensitive);
     findReplace.ShowFindReplaceDialog(showReplace, showAll);
 }