GetText() public static method

public static GetText ( ) : string
return string
Ejemplo n.º 1
0
        public void LoadSettingsFromClipboard()
        {
            string clipboardText = UniClipboard.GetText();

            LoadSettingsFromJSON(clipboardText, out sliderData);
            SetSliderToData(sliderData);
        }
 public void Paste()
 {
     if (urlInput.interactable)
     {
         urlInput.text = UniClipboard.GetText();
     }
 }
Ejemplo n.º 3
0
    private void ShowKeystoreView()
    {
        ViewManager.ReplaceView(keystoreView, gameObject.name);
        InputField keystoreInput    = keystoreView.transform.Find("KeystoreInputField").GetComponent <InputField>();
        InputField pwdInput         = keystoreView.transform.Find("PwdInputField").GetComponent <InputField>();
        InputField nameInput        = keystoreView.transform.Find("NameInputField").GetComponent <InputField>();
        Button     btnPasteKeystore = keystoreView.transform.Find("BtnPasteKeystore").GetComponent <Button>();

        Utils.AddButtonClickEvent(btnPasteKeystore, delegate(){
            keystoreInput.text = UniClipboard.GetText();
        });
        Button btnImport = keystoreView.transform.Find("BtnImport").GetComponent <Button>();

        Utils.AddButtonClickEvent(btnImport, delegate() {
            if (string.IsNullOrEmpty(keystoreInput.text) || string.IsNullOrEmpty(pwdInput.text) || string.IsNullOrEmpty(nameInput.text))
            {
                ViewManager.ShowMessageBox("请输入全部信息");
                return;
            }
            ShowWaitingView(ImportAccountTimeOut);
            NotificationCenter.DefaultCenter().AddObserver("KeystoreLoaded", KeystoreLoaded);
            AccountManager.Instance.LoadWalletFromKeystore(keystoreInput.text, nameInput.text, pwdInput.text);
        });

        Button btnClose = keystoreView.transform.Find("BtnClose").GetComponent <Button>();

        Utils.AddButtonClickEvent(btnClose, delegate() {
            ShowImportView();
        });
    }
Ejemplo n.º 4
0
    private void ShowKeystoreView()
    {
        keystoreView.SetActive(true);
        InputField keystoreInput    = keystoreView.transform.Find("KeystoreInputField").GetComponent <InputField>();
        InputField pwdInput         = keystoreView.transform.Find("PwdInputField").GetComponent <InputField>();
        InputField nameInput        = keystoreView.transform.Find("NameInputField").GetComponent <InputField>();
        Button     btnPasteKeystore = keystoreView.transform.Find("BtnPasteKeystore").GetComponent <Button>();

        AddButtonClickEvent(btnPasteKeystore, delegate(){
            keystoreInput.text = UniClipboard.GetText();
        });
        Button btnImport = keystoreView.transform.Find("BtnImport").GetComponent <Button>();

        AddButtonClickEvent(btnImport, delegate() {
            if (string.IsNullOrEmpty(keystoreInput.text) || string.IsNullOrEmpty(pwdInput.text) || string.IsNullOrEmpty(nameInput.text))
            {
                ShowMessageView("请输入全部信息");
                return;
            }
            UnityEngine.Debug.Log(keystoreInput.text + "\n" + pwdInput.text);
            // 在子线程中执行, 开协程检查执行结果
            LoadKeystoreInSubThread(keystoreInput.text, pwdInput.text, nameInput.text);
            StartCoroutine(WaitForLoadKeystore());
        });

        Button btnClose = keystoreView.transform.Find("BtnClose").GetComponent <Button>();

        AddButtonClickEvent(btnClose, delegate() {
            keystoreView.SetActive(false);
            ShowImportView();
        });
    }
Ejemplo n.º 5
0
    //private GameObject gameObject;

    void Start()
    {
        string clipBoardValue = UniClipboard.GetText();

        Splash.tourId = clipBoardValue;
        //Splash.tourId = "4";
        DownloadVideo(constants.GETVIDEOSNAME + Splash.tourId);
    }
Ejemplo n.º 6
0
 public void copy()
 {
     //int linkmode = (int)GameManager.GameMode;
     UniClipboard.SetText("http://www.noranapps.com/ofl.php?mode=");
     //UniClipboard.GetText();
     Debug.Log(UniClipboard.GetText() + "1234567");
     showToast("Link Copied", 2);
 }
Ejemplo n.º 7
0
    IEnumerator Holding()
    {
        yield return(new WaitForSeconds(HoldTime));

        if (_holding)
        {
            _holding         = false;
            _inputField.text = UniClipboard.GetText();
        }
    }
Ejemplo n.º 8
0
        public void Paste()
        {
            statusText.text = "";
            string id = UniClipboard.GetText();

            id = id.Replace(System.Environment.NewLine, "");
            calibrationCodeText.text = id;
            AryzonSettings.Instance.RetrieveSettingsForCode(id);
            statusText.text = "Loading your personal settings..";
        }
Ejemplo n.º 9
0
    // Use this for initialization
    void Start()
    {
        disableVrMtthod();
        string clipBoardValue = UniClipboard.GetText();

        if (clipBoardValue != null)
        {
            //EditorGUIUtility
            //Field.text = GUIUtility.systemCopyBuffer;
            Field.text = clipBoardValue;
        }
        else
        {
            textVar.text = "Press Vr button again from website";
        }
    }
Ejemplo n.º 10
0
    private void ShowWordsImportView()
    {
        wordsImportView.SetActive(true);
        InputField wordsInput      = wordsImportView.transform.Find("WordsInputField").GetComponent <InputField>();
        InputField pwdInput        = wordsImportView.transform.Find("PwdInputField").GetComponent <InputField>();
        InputField nameInput       = wordsImportView.transform.Find("NameInputField").GetComponent <InputField>();
        InputField pwdConfirmInput = wordsImportView.transform.Find("PwdConfirmInputField").GetComponent <InputField>();
        Button     btnPasteWords   = wordsImportView.transform.Find("BtnPasteWords").GetComponent <Button>();

        AddButtonClickEvent(btnPasteWords, delegate(){
            wordsInput.text = UniClipboard.GetText();
        });
        Button btnImport = wordsImportView.transform.Find("BtnImport").GetComponent <Button>();

        AddButtonClickEvent(btnImport, delegate() {
            if (string.IsNullOrEmpty(wordsInput.text) || string.IsNullOrEmpty(pwdInput.text) || string.IsNullOrEmpty(nameInput.text))
            {
                ShowMessageView("请输入全部信息");
                return;
            }
            if (pwdInput.text != pwdConfirmInput.text)
            {
                ShowMessageView("两次输入密码不一致");
                return;
            }
            Wallet wallet     = new Wallet(wordsInput.text);
            mPrivateKeyString = wallet.PrivateKeyString;
            mPrivateKeyBytes  = wallet.PrivateKeyBytes;
            mAddress          = wallet.PublicAddress;
            mNickName         = nameInput.text;
            mWords            = wallet.Words;
            mPassword         = pwdInput.text;
            wordsImportView.SetActive(false);

            // 子线程里生成keystore
            GenerateKeystoreInSubThread();
            CheckKeystoreInited();
        });

        Button btnClose = wordsImportView.transform.Find("BtnClose").GetComponent <Button>();

        AddButtonClickEvent(btnClose, delegate() {
            wordsImportView.SetActive(false);
            ShowImportView();
        });
    }
Ejemplo n.º 11
0
    public void PasteCode()
    {
        if (isWindow)
        {
            return;
        }
        Open();
        copyMode = false;
        string clipBoardText = UniClipboard.GetText();

        if (clipBoardText.Length != 88)
        {
            inputField.text = null;
            return;
        }

        inputField.text = clipBoardText;
    }
Ejemplo n.º 12
0
    public void OnGUI()
    {
        GUIStyle style = new GUIStyle(GUI.skin.button);

        style.fontSize = 30;
        var width      = Screen.width;
        var height     = Screen.height;
        var logoWidth  = width * 3 / 4;
        var logoHeight = height / 4;

        GUI.Box(new Rect(width / 2 - logoWidth / 2, height / 4, logoWidth, logoHeight), logo);

        var buttonWidth  = width / 7;
        var buttonHeight = height / 15;

        Debug.Log(style);
        var play = GUI.Button(new Rect(width / 2 - buttonWidth / 2, height * 5 / 8, buttonWidth, buttonHeight), "Scan QR Code", style);

        if (play)
        {
            SceneManager.LoadScene("QRCode");
            return;
        }
        var tryMe = GUI.Button(new Rect(width / 2 - buttonWidth / 2, height * 6 / 8, buttonWidth, buttonHeight), "Try Me", style);

        if (tryMe)
        {
            SceneManager.LoadScene("LoadData");
            return;
        }

        var url = GUI.Button(new Rect(width / 2 - buttonWidth / 2, height * 7 / 8, buttonWidth, buttonHeight), "Clipboard",
                             style);

        if (url)
        {
            StaticReplayScript.URL = UniClipboard.GetText();
            SceneManager.LoadScene("LoadData");
        }
    }
Ejemplo n.º 13
0
Archivo: Util.cs Proyecto: mengtest/wh
 /// <summary>
 /// 复制文本
 /// </summary>
 public static void CopyText(string str)
 {
     Debug.Log("=============CopyText " + str);
     UniClipboard.SetText(str);
     Debug.Log(UniClipboard.GetText());
 }
Ejemplo n.º 14
0
 public void TaskOnClick()
 {
     circuit_code.text = UniClipboard.GetText();
 }
Ejemplo n.º 15
0
    private void ShowTransferView()
    {
        ViewManager.ReplaceView(transferView, gameObject.name);
        InputField addressInput  = transferView.transform.Find("AddressInputField").GetComponent <InputField>();
        InputField ethInput      = transferView.transform.Find("EthInputField").GetComponent <InputField>();
        InputField gasPriceInput = transferView.transform.Find("GasPriceInputField").GetComponent <InputField>();
        InputField gasInput      = transferView.transform.Find("GasInputField").GetComponent <InputField>();
        // InputField pwdInput = transferView.transform.Find("PwdInputField").GetComponent<InputField>();

        Button btnReports = transferView.transform.Find("BtnHistory").GetComponent <Button>();

        Utils.AddButtonClickEvent(btnReports, delegate(){
            ShowTransactionHistoryView();
        });

        Button btnPasteAddress = transferView.transform.Find("BtnPasteAddress").GetComponent <Button>();

        gasInput.text      = "21000";
        gasPriceInput.text = AccountManager.Instance.GetGasPrice().ToString();

        Utils.AddButtonClickEvent(btnPasteAddress, delegate(){
            addressInput.text = UniClipboard.GetText();
        });
        Button btnClose = transferView.transform.Find("BtnClose").GetComponent <Button>();

        Utils.AddButtonClickEvent(btnClose, delegate(){
            ShowInfoView();
        });
        Button btnConfirm = transferView.transform.Find("BtnConfirm").GetComponent <Button>();

        Utils.AddButtonClickEvent(btnConfirm, delegate(){
            if (string.IsNullOrEmpty(addressInput.text) ||
                string.IsNullOrEmpty(ethInput.text) ||
                string.IsNullOrEmpty(gasPriceInput.text) ||
                string.IsNullOrEmpty(gasInput.text))
            {
                ViewManager.ShowMessageBox("请输入完整的转账信息");
                return;
            }
            // UnityEngine.Debug.Log(System.DateTime.Now);
            // string privateKey = Wallet.GetPrivateKeyByKeystoreAndPassword(mKeystore, pwdInput.text);
            // UnityEngine.Debug.Log(System.DateTime.Now);

            //gasPriceInput.text = Web3.Web3.Convert.FromWei(TransactionBase.DEFAULT_GAS_PRICE, UnitConversion.EthUnit.Gwei);

            ethAmount        = Decimal.Parse(ethInput.text);
            decimal gasPrice = Decimal.Parse(gasPriceInput.text);
            gas       = BigInteger.Parse(gasInput.text);
            toAddress = addressInput.text;
            UnityEngine.Debug.LogError("ethAmount " + ethAmount.ToString() + " gasPrice " + gasPrice.ToString() + " gas " + gas.ToString() + " toaddr " + toAddress);
            // LoadPrivateKeyInSubThread(mKeystore, pwdInput.text);
            // StartCoroutine(WaitForPrivateKey());

            ShowWaitingView();
            Action <string, bool, string> callback = new Action <string, bool, string>(transferCallBack);
            StartCoroutine(Wallet.TransferEth(AccountManager.Instance.GetPrivateKey(), AccountManager.Instance.GetAddress(), toAddress, ethAmount, gasPrice, gas, callback));
        });


        // addressdropdown
        Dropdown addressDropDown = transferView.transform.Find("AddressDropdown").GetComponent <Dropdown>();

        addressDropDown.options.Clear();
        var address_list = GetToAddresses();

        Dropdown.OptionData tempData;
        for (int i = 0; i < address_list.Length; i++)
        {
            tempData = new Dropdown.OptionData(address_list[i]);
            addressDropDown.options.Add(tempData);
        }

        addressDropDown.onValueChanged.RemoveAllListeners();
        addressDropDown.onValueChanged.AddListener(delegate(int value) {
            UnityEngine.Debug.Log("点击了value " + value);
            // 选中地址
            // addressDropDown.captionText.text = address_list[value];
            addressInput.text = address_list[value];
        });
    }
 public void PasteClipboardIntoText()
 {
     textInputField.text = UniClipboard.GetText();
 }
Ejemplo n.º 17
0
 void GetText()
 {
     _getText.text = UniClipboard.GetText();
 }