Esempio n. 1
0
        // Methods
        protected void Button1_Click(object sender, EventArgs e)
        {
            AstroMod mod = new AstroMod
            {
                type       = PublicValue.AstroType.benming,
                birth      = new DateTime(int.Parse(this.hfYear.Value), int.Parse(this.hfMonth.Value), int.Parse(this.hfDay.Value), int.Parse(this.hfHour.Value), 0, 0),
                position   = new LatLng(SYS_DistrictBll.GetInstance().GetModel(0x856)),
                IsDayLight = AppEnum.BOOL.False,
                zone       = -8
            };

            for (int i = 1; i < 0x15; i++)
            {
                mod.startsShow.Add(i, "");
            }
            mod.aspectsShow.Clear();
            for (int j = 1; j < 6; j++)
            {
                mod.aspectsShow.Add(j, 5M);
            }
            AstroBiz.GetInstance().GetParamters(ref mod);
            VenusLoveMod model = new VenusLoveMod
            {
                BirthTime = mod.birth,
                Source    = 1,
                TS        = DateTime.Now,
                UserSysNo = QQWeiBoUserBll.GetInstance().GetRecordByName(this.wb_name).SysNo
            };

            VenusLoveBll.GetInstance().Add(model);
            int constellation = 0;

            foreach (Star star in mod.Stars)
            {
                if (star.StarName == PublicValue.AstroStar.Ven)
                {
                    constellation = (int)star.Constellation;
                    break;
                }
            }
            if (constellation != 0)
            {
                this.ltrTitle.Text   = this.titles[constellation - 1];
                this.ltrContext.Text = this.contexts[constellation - 1];
            }
            this.MultiView1.ActiveViewIndex = 1;
            this.ViewState["ele"]           = constellation;
        }
Esempio n. 2
0
 // Methods
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         AstroDiceMod model = new AstroDiceMod
         {
             House         = ((((-(int.Parse(this.gong.Value) / 30) + 4) + 12) - 1) % 12) + 1,
             Constellation = ((((360 - ((int.Parse(this.gong.Value) - 90) - Convert.ToInt16(Math.Floor(decimal.Parse(this.xingzuo.Value))))) / 30) + 12) % 12) + 1,
             Question      = this.flashtitle.Value
         };
         if (this.dice.Value == "10")
         {
             this.dice.Value = "15";
         }
         else if (this.dice.Value == "11")
         {
             this.dice.Value = "32";
         }
         model.Star            = int.Parse(this.dice.Value) + 1;
         model.TS              = DateTime.Now;
         model.UserSysNo       = QQWeiBoUserBll.GetInstance().GetRecordByName(this.wb_name).SysNo;
         model.Source          = 1;
         model.Pic             = "";
         this.ViewState["Pic"] = model.Pic;
         AstroDiceBll.GetInstance().Add(model);
         this.LinkButton8.Text              = PublicValue.GetAstroStar(model.Star) + "  ";
         this.LinkButton9.Text              = model.House + "宫  ";
         this.LinkButton10.Text             = PublicValue.GetConstellation(model.Constellation);
         this.LinkButton8.Style["display"]  = "";
         this.LinkButton9.Style["display"]  = "";
         this.LinkButton10.Style["display"] = "";
         this.dice.Value    = model.Star.ToString();
         this.gong.Value    = model.House.ToString();
         this.xingzuo.Value = model.Constellation.ToString();
         this.LinkButton8_Click(this.LinkButton8, e);
         this.TextBox1.Text = string.Concat(new object[] { "#占星骰子# #", PublicValue.GetAstroStar(model.Star), " ", model.House, "宫 ", PublicValue.GetConstellation(model.Constellation), "# “", model.Question, "”,求占卜师解答!亲们也来试试吧! http://app.t.qq.com/app/play/801272340" });
     }
     catch
     {
     }
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if ((base.Request.QueryString["openid"] != null) && (base.Request.QueryString["openid"] != ""))
     {
         this.openid = base.Request.QueryString["openid"];
     }
     if ((base.Request.QueryString["openkey"] != null) && (base.Request.QueryString["openkey"] != ""))
     {
         this.openkey = base.Request.QueryString["openkey"];
     }
     if ((base.Request.QueryString["name"] != null) && (base.Request.QueryString["name"] != ""))
     {
         this.wb_name = base.Request.QueryString["name"];
     }
     if ((base.Request.QueryString["oauth2atoken"] != null) && (base.Request.QueryString["oauth2atoken"] != ""))
     {
         try
         {
             string[] strArray = base.Request.QueryString["oauth2atoken"].Split(new char[] { '&' });
             this.oauth2token = strArray[0].Split(new char[] { '=' })[0];
             this.expire      = DateTime.Now.AddSeconds((double)int.Parse(strArray[1].Split(new char[] { '=' })[1]));
         }
         catch
         {
         }
     }
     if ((base.Request.QueryString["nick"] != null) && (base.Request.QueryString["nick"] != ""))
     {
         this.wb_nick = base.Request.QueryString["nick"];
     }
     if (!base.IsPostBack)
     {
         Dictionary <string, string> dictionary = new Dictionary <string, string>();
         for (int i = 0; i <= 0x17; i++)
         {
             dictionary.Add(i.ToString(), i.ToString());
         }
         this.ddlHour.DataSource     = dictionary;
         this.ddlHour.DataTextField  = "Key";
         this.ddlHour.DataValueField = "Value";
         this.ddlHour.DataBind();
         this.ddlHour.SelectedIndex = 12;
         QQWeiBo bo = new QQWeiBo();
         if (this.openid != "")
         {
             QQWeiBoUserMod recordByName = QQWeiBoUserBll.GetInstance().GetRecordByName(this.wb_name);
             if (recordByName.SysNo <= 0)
             {
                 string[] strArray2 = bo.GetUserSimpleInfo(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.venus).Split(new char[] { '|' });
                 recordByName.Oauth2Token = this.oauth2token;
                 recordByName.OpenId      = this.openid;
                 recordByName.TS          = DateTime.Now;
                 recordByName.WB_Name     = this.wb_name;
                 recordByName.WB_Nick     = this.wb_nick;
                 recordByName.Location    = strArray2[2];
                 recordByName.FansNum     = int.Parse(strArray2[3]);
                 recordByName.IsVIP       = int.Parse(strArray2[4]);
                 QQWeiBoUserBll.GetInstance().Add(recordByName);
             }
             else if ((recordByName.WB_Name == "") || (recordByName.FansNum == -999999))
             {
                 string[] strArray3 = bo.GetUserSimpleInfo(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.venus).Split(new char[] { '|' });
                 recordByName.WB_Name  = this.wb_name;
                 recordByName.WB_Nick  = this.wb_nick;
                 recordByName.Location = strArray3[2];
                 recordByName.FansNum  = int.Parse(strArray3[3]);
                 recordByName.IsVIP    = int.Parse(strArray3[4]);
                 QQWeiBoUserBll.GetInstance().Update(recordByName);
             }
         }
         if (bo.CheckFriend(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.venus))
         {
             this.nofriend1.Style["display"] = "none";
             this.nofriend2.Style["display"] = "none";
         }
         else
         {
             this.isfriend1.Style["display"] = "none";
             this.isfriend2.Style["display"] = "none";
         }
     }
 }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if ((base.Request.QueryString["openid"] != null) && (base.Request.QueryString["openid"] != ""))
     {
         this.openid = base.Request.QueryString["openid"];
     }
     if ((base.Request.QueryString["openkey"] != null) && (base.Request.QueryString["openkey"] != ""))
     {
         this.openkey = base.Request.QueryString["openkey"];
     }
     if ((base.Request.QueryString["name"] != null) && (base.Request.QueryString["name"] != ""))
     {
         this.wb_name = base.Request.QueryString["name"];
     }
     if ((base.Request.QueryString["oauth2atoken"] != null) && (base.Request.QueryString["oauth2atoken"] != ""))
     {
         try
         {
             string[] strArray = base.Request.QueryString["oauth2atoken"].Split(new char[] { '&' });
             this.oauth2token = strArray[0].Split(new char[] { '=' })[0];
             this.expire      = DateTime.Now.AddSeconds((double)int.Parse(strArray[1].Split(new char[] { '=' })[1]));
         }
         catch
         {
         }
     }
     if ((base.Request.QueryString["nick"] != null) && (base.Request.QueryString["nick"] != ""))
     {
         this.wb_nick = base.Request.QueryString["nick"];
     }
     if (!base.IsPostBack)
     {
         this.MultiView1.ActiveViewIndex = 0;
         QQWeiBo        bo           = new QQWeiBo();
         QQWeiBoUserMod recordByName = QQWeiBoUserBll.GetInstance().GetRecordByName(this.wb_name);
         if (this.openid != "")
         {
             if (recordByName.SysNo <= 0)
             {
                 string[] strArray2 = (this.oauth2token == "") ? bo.GetUserSimpleInfo(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.astrodice).Split(new char[] { '|' }) : bo.GetUserSimpleInfo(this.openid, this.oauth2token, base.Request.UserHostAddress, AppEnum.Apps.astrodice, true).Split(new char[] { '|' });
                 recordByName.Oauth2Token1 = this.oauth2token;
                 recordByName.OpenId1      = this.openid;
                 recordByName.Expire1      = this.expire;
                 recordByName.WB_Name      = this.wb_name;
                 recordByName.WB_Nick      = this.wb_nick;
                 recordByName.TS           = DateTime.Now;
                 recordByName.Location     = strArray2[2];
                 recordByName.FansNum      = int.Parse(strArray2[3]);
                 recordByName.IsVIP        = int.Parse(strArray2[4]);
                 QQWeiBoUserBll.GetInstance().Add(recordByName);
                 this.ViewState["userpara"] = strArray2;
             }
             else if ((recordByName.WB_Name == "") || (recordByName.FansNum == -999999))
             {
                 string[] strArray3 = (this.oauth2token == "") ? bo.GetUserSimpleInfo(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.astrodice).Split(new char[] { '|' }) : bo.GetUserSimpleInfo(this.openid, this.oauth2token, base.Request.UserHostAddress, AppEnum.Apps.astrodice, true).Split(new char[] { '|' });
                 recordByName.Oauth2Token1 = this.oauth2token;
                 recordByName.OpenId1      = this.openid;
                 recordByName.Expire1      = this.expire;
                 recordByName.WB_Name      = this.wb_name;
                 recordByName.WB_Nick      = this.wb_nick;
                 recordByName.Location     = strArray3[2];
                 recordByName.FansNum      = int.Parse(strArray3[3]);
                 recordByName.IsVIP        = int.Parse(strArray3[4]);
                 QQWeiBoUserBll.GetInstance().Update(recordByName);
                 this.ViewState["userpara"] = strArray3;
             }
             else
             {
                 string[] strArray4 = (this.oauth2token == "") ? bo.GetUserSimpleInfo(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.astrodice).Split(new char[] { '|' }) : bo.GetUserSimpleInfo(this.openid, this.oauth2token, base.Request.UserHostAddress, AppEnum.Apps.astrodice, true).Split(new char[] { '|' });
                 this.ViewState["userpara"] = strArray4;
             }
         }
         this.ViewState["weibouser"] = recordByName;
         if ((this.oauth2token == "") ? bo.CheckFriend(this.openid, this.openkey, base.Request.UserHostAddress, AppEnum.Apps.astrodice) : bo.CheckFriend(this.openid, this.oauth2token, base.Request.UserHostAddress, AppEnum.Apps.astrodice, true))
         {
             this.nofriend1.Style["display"] = "none";
         }
         else
         {
             this.isfriend1.Style["display"] = "none";
         }
         this.LinkButton8.Style["display"]  = "none";
         this.LinkButton9.Style["display"]  = "none";
         this.LinkButton10.Style["display"] = "none";
         this.Label1.Text = "<p><b>提问说明:</b><br />★一定要是你很诚心很想知道的事。问题可以是具体的小事,如今天晚上吃什么;也可以是别人的是,某某明星是不是真的有外遇。<br />\r\n                                  ★不要在短时间内重复问一个问题,除非事态已经有了新的变化。<br />\r\n                                  ★问Whether不如问How,骰子不会简单回答Yes或No。如果问“我该跳槽么?”不如问“如果换工作的话前景如何?”</p>\r\n                                 <p><b>特别提示:</b><br />★占星骰子需消耗灵力,建议一天内不要超过3次,否则会降低准确度。<br />\r\n                                  ★骰子给出的结果需要你对行星,星座和宫位的关键字含义进行意会。<br />\r\n                                  ★如无法理解骰子的结果,可以把问题发出,等待专业占星师解答。</p><p style='color:#fffd64;'>若需购买占星骰子实物,请在淘宝搜索“超级占星骰子”</p>";
         try
         {
             GetTopic("");
             this.Repeater1.DataSource = this.GetReplys("");
             this.Repeater1.DataBind();
         }
         catch
         {
         }
     }
 }