Пример #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;
        }
Пример #2
0
        public void Initialize(OutputViewer outputViewer, IDebuggerSession debuggerSession)
        {
            _outputViewer    = outputViewer;
            _debuggerSession = debuggerSession;

            foreach (var tabItem in TabSourceViewer.Items.Cast <DebuggerTabItem>().ToArray())
            {
                TabSourceViewer.RemoveTabItemWithoutBindingError(tabItem);
            }

            _viewers.Clear();

            WatchItems.Clear();
            foreach (var watchItem in _outputViewer.DocumentPage.WorkDocument.WatchItems)
            {
                WatchItems.Add(new WatchItem {
                    Name = watchItem
                });
            }

            if (!_isInitialized)
            {
                TabDebuggerOptions.SelectedIndex = _outputViewer.DocumentPage.WorkDocument.DebuggerViewDefaultTabIndex;
                _isInitialized = true;
            }

            _debuggerSession.Attached += delegate { Dispatcher.Invoke(DebuggerAttachedHandler); };
        }
Пример #3
0
		public void Initialize(OutputViewer outputViewer, IDebuggerSession debuggerSession)
		{
			_outputViewer = outputViewer;
			_debuggerSession = debuggerSession;

			foreach (var tabItem in TabSourceViewer.Items.Cast<DebuggerTabItem>().ToArray())
			{
				TabSourceViewer.RemoveTabItemWithoutBindingError(tabItem);
			}

			_viewers.Clear();

			WatchItems.Clear();
			foreach (var watchItem in _outputViewer.DocumentPage.WorkDocument.WatchItems)
			{
				WatchItems.Add(new WatchItem { Name = watchItem });
			}

			if (!_isInitialized)
			{
				TabDebuggerOptions.SelectedIndex = _outputViewer.DocumentPage.WorkDocument.DebuggerViewDefaultTabIndex;
				_isInitialized = true;
			}

			_debuggerSession.Attached += delegate { Dispatcher.Invoke(DebuggerAttachedHandler); };
		}
Пример #4
0
        public FileResultViewer(OutputViewer outputViewer)
        {
            InitializeComponent();

            _outputViewer = outputViewer;

            _exportClockTimer = new DispatcherTimer(DispatcherPriority.Normal, Dispatcher)
            {
                Interval = TimeSpan.FromMilliseconds(40)
            };
            _exportClockTimer.Tick += UpdateExportClockTickHandler;

            InitializeSettings();
        }
Пример #5
0
        public DebuggerTabItem(DebugProgramItem programItem, OutputViewer outputViewer)
        {
            ProgramItem  = programItem;
            OutputViewer = outputViewer;

            Header  = programItem.Header;
            Content = CodeViewer = new SqlEditor {
                ColorizeBackground = false
            };
            CodeViewer.Initialize(outputViewer.DocumentPage.InfrastructureFactory, outputViewer.ConnectionAdapter.DatabaseModel);
            CodeViewer.Editor.TextArea.TextView.BackgroundRenderers.Add(_backgroundRenderer);

            _iconMargin = new IconMargin(this)
            {
                DocumentRepository = CodeViewer.DocumentRepository
            };
            CodeViewer.Editor.TextArea.LeftMargins.Add(_iconMargin);
        }
Пример #6
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;
		}
Пример #7
0
		public DebuggerTabItem(DebugProgramItem programItem, OutputViewer outputViewer)
		{
			ProgramItem = programItem;
			OutputViewer = outputViewer;

			Header = programItem.Header;
			Content = CodeViewer = new SqlEditor { ColorizeBackground = false };
			CodeViewer.Initialize(outputViewer.DocumentPage.InfrastructureFactory, outputViewer.ConnectionAdapter.DatabaseModel);
			CodeViewer.Editor.TextArea.TextView.BackgroundRenderers.Add(_backgroundRenderer);

			_iconMargin = new IconMargin(this) { DocumentRepository = CodeViewer.DocumentRepository };
			CodeViewer.Editor.TextArea.LeftMargins.Add(_iconMargin);
		}