Beispiel #1
0
        public void Paste()
        {
            if (!CanPaste)
            {
                return;
            }

            string content = PlatformExtensions.GetClipboardText();

            // Important: filter valid characters
            if (content != null)
            {
                content = new string (content.Where(IsInputChar).ToArray());
            }

            if (!String.IsNullOrEmpty(content))
            {
                SetUndoInsert(content);
                if (SelLength > 0)
                {
                    DeleteSelection();
                }
                SelLength = 0;
                RowManager.InsertRange(PlatformExtensions.GetClipboardText());
                EnsureCurrentRowVisible();
                ResetSelection();
                Modified = true;
                Invalidate();
            }
        }
Beispiel #2
0
 public void InsertRange(string text)
 {
     RowManager.InsertRange(text);
 }