Esempio n. 1
0
        public DataGridResultViewer(OutputViewer outputViewer, StatementExecutionResult executionResult, ResultInfo resultInfo)
        {
            _outputViewer    = outputViewer;
            _executionResult = executionResult;
            _resultInfo      = resultInfo;

            Title = resultInfo.Title;

            InitializeComponent();

            var header =
                new HeaderedContentControl
            {
                Content = new AccessText {
                    Text = Title
                }
            };

            TabItem =
                new TabItem
            {
                Header  = header,
                Content = this
            };

            header.MouseEnter += DataGridTabHeaderMouseEnterHandler;

            _refreshProgressBarTimer = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher)
            {
                Interval = TimeSpan.FromSeconds(0.25)
            };
            _refreshProgressBarTimer.Tick += RefreshTimerProgressBarTickHandler;
        }
Esempio n. 2
0
        private DataGridResultViewer CreateResultViewer(StatementExecutionResult statementResult, ResultInfo resultInfo)
        {
            var refreshInterval = DocumentPage.WorkDocument.RefreshInterval;

            if (refreshInterval == TimeSpan.Zero)
            {
                refreshInterval = DefaultRefreshInterval;
            }

            var resultViewer =
                new DataGridResultViewer(this, statementResult, resultInfo)
            {
                AutoRefreshInterval = refreshInterval
            };

            resultViewer.TabItem.AddHandler(Selector.SelectedEvent, (RoutedEventHandler)ResultTabSelectedHandler);

            return(resultViewer);
        }