コード例 #1
0
        private void Caret_PositionChanged(object sender, EventArgs e)
        {
            if (Document.TextLength == 0)
            {
                return;
            }

            Document.MarkerStrategy.RemoveAll(marker => marker is ReferenceMarker);
            if (_updateRefsTimer.Enabled)
            {
                _updateRefsTimer.Stop();
            }

            _updateRefsTimer.Start();

            _statusBarService.SetCaretPosition(ActiveTextAreaControl.Caret.Line, ActiveTextAreaControl.Caret.Column);
            UpdateCodeCountInfo();

            CalcLocation label = _symbolService.ListTable.GetCalcLocation(new FilePath(FileName), ActiveTextAreaControl.Caret.Line + 1);

            if (label == null)
            {
                return;
            }

            string assembledInfo = string.Format("Page: {0} Address: {1}", label.Page, label.Address.ToString("X4"));

            _statusBarService.SetText(assembledInfo);
        }
コード例 #2
0
        void CaretChanged(object sender, EventArgs e)
        {
            Point             pos              = textEditorControl.Document.OffsetToPosition(textEditorControl.ActiveTextAreaControl.Caret.Offset);
            LineSegment       line             = textEditorControl.Document.GetLineSegment(pos.Y);
            IStatusBarService statusBarService = (IStatusBarService)NetFocus.DataStructure.Services.ServiceManager.Services.GetService(typeof(IStatusBarService));

            statusBarService.SetCaretPosition(pos.X + 1, pos.Y + 1, textEditorControl.ActiveTextAreaControl.Caret.Offset - line.Offset + 1);
        }
コード例 #3
0
        public void SetCaretPositionTest()
        {
            IStatusBarService target = CreateIStatusBarService(); // TODO: Initialize to an appropriate value
            int x          = 0;                                   // TODO: Initialize to an appropriate value
            int y          = 0;                                   // TODO: Initialize to an appropriate value
            int charOffset = 0;                                   // TODO: Initialize to an appropriate value

            target.SetCaretPosition(x, y, charOffset);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: BuckeyeDude/Wabbitcode
        private void DockingServiceActiveDocumentChanged(object sender, EventArgs eventArgs)
        {
            if (Disposing || IsDisposed)
            {
                return;
            }

            if (_dockingService.ActiveDocument == null)
            {
                _statusBarService.SetCaretPosition(-1, -1);
                _statusBarService.SetCodeCountInfo(null);
            }

            UpdateTitle(_debuggerService.CurrentDebugger != null);
        }