예제 #1
0
        public void UpdateLocation(int x, int y, int height, CaretSetting mode)
        {
            if (IsFinal)
            {
                throw new InvalidOperationException("CaretPosition is already finalised");
            }

            CaretLocation loc = new CaretLocation(x, y, height);

            switch (mode)
            {
            case CaretSetting.Absolute:
                primary   = loc;
                secondary = null;
                break;

            case CaretSetting.Accurate:
                primary = loc;
                break;

            case CaretSetting.Fallback:
                secondary = loc;
                break;
            }
        }
예제 #2
0
 protected DocumentViewModel(IEditorDoc doc)
 {
     Title = doc.Name;
     ContentId = doc.File.ToString();
     IconSource = ISC.ConvertFromInvariantString("pack://application:,,,/Images/File.png") as ImageSource;
     _model = doc;
     _model.TextDocument.ModifiedChanged += OnTextDocumentModifiedChanged;
     _caretLocation = new CaretLocation(_model.TextDocument);
     CaretOffset = 0;
     _wantInitialFocus = true;
     _initialLine = 0;
 }
        public ICondition GetCurrentScreenCondition()
        {
            var caretRow = _screendata.Count - 1;
            var caretCol = _screendata[caretRow].Length - 1;

            var caret = new CaretLocation(caretRow,caretCol );
            return new ConsoleConnectionRedirectionScreenCondition()
            {
                CaretLocation = caret,
                Column = 0,
                Row = caretRow,
                Text = _screendata[_screendata.Count - 1]
            };
        }