Пример #1
0
        public QueryDocument(IHandlerRegistry handlerRegistry, Query query)
        {
            InitializeComponent();

            _objectSelectionHandler              = handlerRegistry.GetHandler <IObjectSelectionHandler>();
            _syntaxEditorClipboardHandler        = new SyntaxEditorClipboardHandler(syntaxEditor);
            _syntaxEditorUndoRedoHandler         = new SyntaxEditorUndoRedoHandler(syntaxEditor);
            _resultsDataGridViewClipboardHandler = new ResultsDataGridViewClipboardHandler(resultsDataGridView);
            _errorListClipboardHandler           = new ErrorListClipboardHandler(errorsListView);

            _query = query;

            _actiproLink = new ActiproLink(components);
            _actiproLink.SyntaxEditor = syntaxEditor;
            _actiproLink.Evaluatable  = _query;

            _queryBrowser = new QueryBrowser(handlerRegistry, _query);

            resultsDataGridView.AllowUserToResizeRows       = false;
            resultsDataGridView.BackgroundColor             = System.Drawing.SystemColors.Window;
            resultsDataGridView.BorderStyle                 = System.Windows.Forms.BorderStyle.Fixed3D;
            resultsDataGridView.ColumnHeadersBorderStyle    = DataGridViewHeaderBorderStyle.None;
            resultsDataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            resultsDataGridView.GridColor         = System.Drawing.SystemColors.ActiveBorder;
            resultsDataGridView.RowHeadersVisible = false;
            resultsDataGridView.DataError        += delegate { };

            syntaxEditor.Text = _query.Text;

            ClearStatusPanel();
        }
Пример #2
0
        private void evaluatableBrowser_SelectedItemChanged(object sender, EventArgs e)
        {
            IObjectSelectionHandler objectSelectionHandler = _handlerRegistry.GetHandler <IObjectSelectionHandler>();

            if (objectSelectionHandler != null)
            {
                objectSelectionHandler.SelectedObject = evaluatableBrowser.SelectedItem;
            }
        }