예제 #1
0
        public void ShowSearch()
        {
            if (_parentDbEdtiorTable.dbDataGrid.SelectedCells.Count == 1 && _parentDbEdtiorTable.dbDataGrid.SelectedCells.First().Item is DataRowView)
            {
                _findReplaceWindow.UpdateFindText(_parentDbEdtiorTable.CurrentTable.Rows[_parentDbEdtiorTable.dbDataGrid.Items.IndexOf(_parentDbEdtiorTable.dbDataGrid.SelectedCells.First().Item)]
                                                  [(string)_parentDbEdtiorTable.dbDataGrid.SelectedCells.First().Column.Header].ToString());
            }

            _findReplaceWindow.CurrentMode = FindAndReplaceWindow.FindReplaceMode.FindMode;
            _findReplaceWindow.ReadOnly    = _parentDbEdtiorTable.ReadOnly;
            _findReplaceWindow.Show();
        }
예제 #2
0
        /// <summary>
        /// Executes the command logics.
        /// </summary>
        public override void Invoke()
        {
            var textToFind = this.editor.SelectedText;
            var presenter  = new FindAndReplacePresenter(this.editor)
            {
                TextToFind = textToFind
            };
            var window = new FindAndReplaceWindow(presenter);

            window.Show(editor);
        }
예제 #3
0
        private void FindCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var dialog = new FindAndReplaceWindow(editor.TextArea);

            dialog.Show();
        }