Paste() публичный Метод

public Paste ( ) : bool
Результат bool
Пример #1
0
    public static string GetTextFromClipboard()
    {
        var te = new UnityEngine.TextEditor();

        te.Paste();
        return(te.text);
    }
Пример #2
0
        public static string GetText()
        {
            var ed = new TextEditor();
            ed.Paste();

            return ed.content.text;
        }
Пример #3
0
        public void CopyText()
        {
            var copyString = "TestStrrrring";
            var expectedString = copyString;
            Utilities.CopyStringToBuffer(copyString);

            var editor = new TextEditor();
            editor.Paste();
            Assert.AreEqual(expectedString, editor.text);
        }
Пример #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="textField"></param>
 public static void OnPaste(InputTextField textField)
 {
     TextEditor te = new TextEditor();
     te.Paste();
     #if UNITY_5_3_OR_NEWER
     string value = te.text;
     #else
     string value = te.content.text;
     #endif
     if (!string.IsNullOrEmpty(value))
         textField.ReplaceSelection(value);
 }
Пример #5
0
 static void OnPaste(EventContext context)
 {
     TextField target = (TextField)context.data;
     TextEditor te = new TextEditor();
     te.Paste();
     #if (UNITY_5_3 || UNITY_5_4)
     string value = te.text;
     #else
     string value = te.content.text;
     #endif
     if (!string.IsNullOrEmpty(value))
         target.ReplaceSelection(value);
 }
Пример #6
0
 private string GetClipboard()
 {
     TextEditor te = new TextEditor();
     te.Paste();
     return te.content.text;
 }
Пример #7
0
		/// <summary>Pastes the text from the clipboard.</summary>
		public static string Paste(){
			TextEditor editor=new TextEditor();
			editor.content.text="";
			editor.Paste();
			return editor.content.text;
		}
 public string PasteFromClipboard()
 {
   TextEditor textEditor = new TextEditor();
   textEditor.Paste();
   return textEditor.text;
 }
Пример #9
0
 public string PasteFromClipboard()
 {
     TextEditor editor = new TextEditor();
     editor.Paste();
     return editor.content.text;
 }