示例#1
0
        public static Result <Shove> GetByTinyUrl(String TinyUrl)
        {
            Result <Shove> result = new Result <Shove>();

            try
            {
                using (ShovinDataContext db = new ShovinDataContext())
                {
                    Shove shove = (from q in db.Shoves where String.Compare(q.TinyUrl, TinyUrl, false) == 0 select q).FirstOrDefault();

                    if (shove != null)
                    {
                        result = new Result <Shove>(shove);
                    }
                    else
                    {
                        result = new Result <Shove>(1, "Tiny Url Not Found");
                    }
                }
            }
            catch (Exception ex)
            {
                result = new Result <Shove>(2, ex.Message);
            }

            return(result);
        }
示例#2
0
文件: Login.cs 项目: ichari/ichari
    public void SetCheckCode(Sites site, Shove.Web.UI.ShoveCheckCode sccCheckCode)
    {
        switch (site.SiteOptions["Opt_CheckCodeCharset"].ToShort(0))
        {
            case 0:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.All;
                break;

            case 1:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyLetter;
                break;

            case 2:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyLetterLower;
                break;

            case 3:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyLetterUpper;
                break;

            case 4:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.OnlyNumeric;
                break;

            default:
                sccCheckCode.Charset = Shove.Web.UI.ShoveCheckCode.CharSet.All;
                break;
        }
    }
示例#3
0
    public int LoginSubmit(Page page, Sites site, string ID, string Password, string InputCheckCode, Shove.Web.UI.ShoveCheckCode sccCheckCode, ref string ReturnDescription)
    {
        ReturnDescription = "";

        bool Opt_isUseCheckCode = site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true);

        ID = ID.Trim();
        Password = Password.Trim();

        if ((ID == "") || (Password == ""))
        {
            ReturnDescription = "用户名和密码都不能为空";

            return -1;
        }

        if ((Opt_isUseCheckCode) && (!sccCheckCode.Valid(InputCheckCode)))
        {
            ReturnDescription = "验证码输入错误";

            return -2;
        }

        System.Threading.Thread.Sleep(500);

        ElectronTicketAgents electronTicketAgents = new ElectronTicketAgents();
        electronTicketAgents.ID = Shove._Convert.StrToInt(ID, 0);
        electronTicketAgents.Password = Password;

        return electronTicketAgents.Login(ref ReturnDescription);
    }
示例#4
0
 public void ShovePlayer(Shove OtherPlayer, Vector3 Direction)
 {
     //Debug.Log("Shove with player");
     if (PC.LocalPlayer == PC.ParentPlayer)
     {
         Debug.Log("PC.LocalPlayer == PC.ParentPlayer = " + (PC.LocalPlayer == PC.ParentPlayer));
         ShovePlayer(OtherPlayer.gameObject, Direction);
     }
 }
 public ElementDecl(string name, bool sto, bool eto, Shove.HTML.SgmlReader.ContentModel cm, string[] inclusions, string[] exclusions)
 {
     this.Name = name;
     this.StartTagOptional = sto;
     this.EndTagOptional = eto;
     this.ContentModel = cm;
     this.Inclusions = inclusions;
     this.Exclusions = exclusions;
 }
示例#6
0
    private void RPC_ShovePlayer(int player, Vector3 Direction)
    {
        // Debug.Log("RpcShovePlayer Called");
        Shove shove = PhotonView.Find(player).GetComponent <Shove>();

        shove.LaunchPlayer(MaxShoveForce, Direction);
        BallHandling bh = PhotonView.Find(player).GetComponent <BallHandling>();

        bh.DropBall();
    }
示例#7
0
 public void CollideWithPlayer(Shove OtherPlayer, Vector3 Direction)
 {
     if (PC.LocalPlayer == PC.ParentPlayer)
     {
         //CmdCollidePlayer(OtherPlayer.gameObject, Direction);
         if (PhotonNetwork.InRoom)
         {
             PV.RPC("RPC_CollidePlayer", RpcTarget.All, OtherPlayer.gameObject.GetPhotonView().ViewID, Direction);
         }
     }
 }
示例#8
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     string gPagerId = ((Shove.Web.UI.ShoveGridPager)(Sender)).ID;
     switch (gPagerId)
     {
         case "gPagerReward":
             hdCurDiv.Value = "divReward";
             BindRewardData();
             break;
     }
     BindRewardData();
 }
示例#9
0
    private void RPC_CollidePlayer(GameObject player, Vector3 Direction)
    {
        Shove shove = player.GetComponent <Shove>();

        if (shove.ShieldStrength / (ShieldStrength + 0.1f) < 0.8f && ShieldStrength > 0.4f)
        {
            BallHandling bh = player.GetComponent <BallHandling>();
            bh.DropBall();
            shove.LaunchPlayer(MaxShoveForce, Direction);
        }
        else
        {
            shove.LaunchPlayer(MaxShoveForce * 0.5f, Direction);
            LaunchPlayer(MaxShoveForce * 0.5f, Direction);
        }
    }
示例#10
0
        public static Result <Shove> Create(String FullUrl, String Keyword, String CreatedBy)
        {
            if (!Keyword.IsNullOrEmpty())
            {
                if (GetByTinyUrl(Keyword).Data != null)
                {
                    return(new Result <Shove>(1, "Tiny Url Already Exists"));
                }
            }

            if (FullUrl.IsNullOrEmpty())
            {
                return(new Result <Shove>(3, "Full Url Must Not Be Empty!"));
            }

            Result <Shove> result = new Result <Shove>();

            try
            {
                using (ShovinDataContext db = new ShovinDataContext())
                {
                    Shove shove = new Shove();

                    shove.AdDiplayMilliseconds = 0;
                    shove.Created   = DateTime.UtcNow;
                    shove.CreatedBy = CreatedBy;
                    shove.FullUrl   = FullUrl;
                    shove.Keyword   = Keyword;
                    shove.TinyUrl   = "";

                    db.Shoves.InsertOnSubmit(shove);
                    db.SubmitChanges();

                    shove.TinyUrl = Shovin.Url.TinyUrl(shove.ShoveID);

                    db.SubmitChanges();

                    result = new Result <Shove>(shove);
                }
            }
            catch (Exception ex)
            {
                result = new Result <Shove>(2, ex.Message);
            }

            return(result);
        }
示例#11
0
 public void AddAttDefs(Shove.HTML.SgmlReader.AttList list)
 {
     if (this.AttList == null)
     {
         this.AttList = list;
     }
     else
     {
         foreach (AttDef def in list)
         {
             if (this.AttList[def.Name] == null)
             {
                 this.AttList.Add(def);
             }
         }
     }
 }
示例#12
0
    protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
    {
        Shove.Web.UI.ShoveGridPager gPager = (Shove.Web.UI.ShoveGridPager)Sender;

        if (gPager.ID == "gPagerHistory")
        {
            hdCurDiv.Value = "divHistory";
            BindHistoryData();
            Script = "ShowOrHiddenDiv(\"divHistory\");clickTabMenu(document.getElementById(\"tdHistory\"),'url(images/admin_qh_100_1.jpg)', 'myIcaileTab');";
        }
        else if (gPager.ID == "gPager_Reward")
        {
            hdCurDiv.Value = "divReward";
            BindDataReward();
        }
    }
示例#13
0
文件: Login.cs 项目: ichari/ichari
    /// <summary>
    /// 登录,用于页面普通 PostBack 情况
    /// </summary>
    /// <param name="page"></param>
    /// <param name="site"></param>
    /// <param name="Name"></param>
    /// <param name="Password"></param>
    /// <param name="InputCheckCode">用户输入的验证码</param>
    /// <param name="sccCheckCode">页面上的验证码控件</param>
    /// <param name="ReturnDescription"></param>
    /// <returns></returns>
    public int LoginSubmit(Page page, Sites site, string Name, string Password, string InputCheckCode, Shove.Web.UI.ShoveCheckCode sccCheckCode, ref string ReturnDescription)
    {
        ReturnDescription = "";

        bool Opt_isUseCheckCode = site.SiteOptions["Opt_isUseCheckCode"].ToBoolean(true);

        Name = Name.Trim();
        Password = Password.Trim();

        if ((Name == "") || (Password == ""))
        {
            ReturnDescription = "用户名和密码都不能为空";

            return -1;
        }

        if (Opt_isUseCheckCode)
        {
            if (sccCheckCode == null)
            {
                ReturnDescription = "验证码内部错误";

                return -2;
            }
            else
            {
                if (!sccCheckCode.Valid(InputCheckCode))
                {
                    ReturnDescription = "验证码输入错误";

                    return -3;
                }
            }
        }

        System.Threading.Thread.Sleep(500);

        Users user = new Users(site.ID);
        user.Name = Name;
        user.Password = Password;

        return user.Login(ref ReturnDescription);
    }
示例#14
0
    protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
    {
        Shove.Web.UI.ShoveGridPager gPager = (Shove.Web.UI.ShoveGridPager)Sender;

        if (gPager.ID == "gPager")
        {
            hdCurDiv.Value = "divMyFollowSchemes";
            BindData();
        }
        else if (gPager.ID == "gPagerSetFollowScheme")
        {
            hdCurDiv.Value = "divSetMyFollowSchemes";
            BindDataForFriendFollowScheme();
        }
    }
示例#15
0
文件: Pin.cs 项目: McPalm/FEPonies
 void Start()
 {
     shove = GetComponent <Shove>();
     shove.SpeedPenalty -= 2;
 }
示例#16
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindDataInvestHistory();
 }
示例#17
0
 protected void gRewardPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindDataInvestHistory();
     //lbMessage.Text = "<script>ExchangeDivMenu2('RoomWelcome',3,4);document.getElementById(\"RoomWelcome3\").className='RoomWelcome';</script>";
 }
示例#18
0
    protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
    {
        long UserID = -1;

        try
        {
            UserID = Shove._Convert.StrToLong(Shove._Web.Utility.GetRequest("id"), -1);
        }
        catch { }

        if (UserID < 1)
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误", this.GetType().FullName);

            return;
        }
        if (!new SLS.Lottery().ValidID(LotteryID))
        {
            PF.GoError(ErrorNumber.Unknow, "参数错误!(彩种)", this.GetType().FullName);

            return;
        }

        BindData(UserID, LotteryID);
    }
示例#19
0
    public static void DataGridBindData(DataGrid g, DataTable dt, Shove.Web.UI.ShoveGridPager gPager)
    {
        g.DataSource = dt;

        try
        {
            g.DataBind();
        }
        catch
        {
            g.CurrentPageIndex = 0;
            gPager.PageIndex = 0;

            g.DataBind();
        }

        gPager.Visible = (dt.Rows.Count > 0);
    }
示例#20
0
 protected void gPager2_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindChaseComboData();
 }
示例#21
0
 protected void gPager1_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindTransactionList();
 }
示例#22
0
 protected void gPager1_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindDataForSystemMessage();
 }
示例#23
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindDataForType();
 }
示例#24
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     string gPagerId = ((Shove.Web.UI.ShoveGridPager)(Sender)).ID;
     switch (gPagerId)
     {
       
         case "gPagergDistills":
             hdCurDiv.Value = "divUserDistills";
             BindDistills();
             break;
    
     }
 }
 public void Add(Shove.HTML.HtmlParse.Attribute a)
 {
     this.m_list.Add(a);
 }
示例#26
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindUserAccount();
 }
示例#27
0
    public static void DataGridBindData(DataGrid g, DataView dv, Shove.Web.UI.ShoveGridPager gPager)
    {
        g.DataSource = dv;

        try
        {
            g.DataBind();
        }
        catch (Exception e)
        {
            if (e.Message.Contains("无效的 CurrentPageIndex 值。它必须大于等于 0 且小于 PageCount。"))
            {
                g.CurrentPageIndex = 0;
                gPager.PageIndex = 0;

                //g.DataBind();
            }
            else
            {
                throw new Exception(e.Message);
            }
        }

        gPager.Visible = (dv.Count > 0);
    }
示例#28
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindLinkList();
 }
示例#29
0
 protected void gPager_PageWillChange(object Sender, Shove.Web.UI.PageChangeEventArgs e)
 {
     BindBuyDetailData();
 }