Exemplo n.º 1
0
    // Use this for initialization
    public void Clicked()
    {
        var name = GameObject.Find("ShareInputText").GetComponent <Text>().text;

        if (name != null && name != "")
        {
            var score = PlayerPrefs.GetFloat("flipthecat.highscore", 0);
            if (score > 0 && PlayerPrefs.HasKey("flipthecat.date"))
            {
                var date       = PlayerPrefs.GetString("flipthecat.date");
                var serialText = name.Replace("&", "") + "&" + score.ToString("F2") + "&" + date;
                var encText    = Decryption.Encrypt(serialText, Decryption.iv, Decryption.key);
                var url        = "https://ydeagames.github.io/FlipTheCat/#/" + encText;
                //Application.OpenURL(url);
                Application.OpenURL("https://twitter.com/intent/tweet?text=" + name + " が FlipTheCat で " + score.ToString("F2") + "m のジャンプをしました!\n結果を見る↓\n&url=" + WWW.EscapeURL(url) + "&hashtags=FlipTheCat");
                GameObject.Find("ShareInputField").GetComponent <InputField>().interactable = false;
            }
        }
    }
Exemplo n.º 2
0
 protected void TestSendEmail()
 {
     try
     {
         System.Text.StringBuilder strBody = new System.Text.StringBuilder();//邮件内容
         strBody.Append("点击下面链接激活账号,8848小时生效,否则重新注册账号,链接只能使用一次,请尽快激活!");
         strBody.Append("点击这里");
         strBody.Append("如未能激活请点击下面链接:http://localhost:38216/Validate.aspx?Account=&ValidateCode=" + Decryption.Encrypt("2") + "");
         string attachPath = @"H:/新建文件夹/demo.txt";
         //qfahmjmzxheobaih
         Email email = new Email("smtp.qq.com", "*****@*****.**", "*****@*****.**", "邮箱验证", strBody.ToString(), "467457110", "qxtrjmpotwrzcajb", "587", true, true);
         email.AddAttachments(attachPath);
         email.Send();
     }
     catch (Exception ex)
     {
         throw;
     }
 }