Exemple #1
0
        public void LoadGame(int mgid, int difficulty)
        {
            var mg = MGMixAndMatch.FetchObjectByParent(mgid);

            MMID.Text       = mg.MMID.ToString();
            Difficulty.Text = difficulty.ToString();

            LoadPage();
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SetPageRibbon(StandardModuleRibbons.SetupRibbon());
                if (Request["MGID"] != null)
                {
                    lblMGID.Text = Request["MGID"];

                    var o = Minigame.FetchObject(int.Parse(lblMGID.Text));
                    AdminName.Text = o.AdminName;

                    var o2 = MGMixAndMatch.FetchObjectByParent(int.Parse(lblMGID.Text));
                    lblMMID.Text = o2.MMID.ToString();
                }
                else
                {
                    Response.Redirect("MiniGameList.aspx");
                }
            }

            //MasterPage.RequiredPermission = PERMISSIONID;
            MasterPage.IsSecure  = true;
            MasterPage.PageTitle = string.Format("{0}", "Mix-And-Match Items");

            _mStrSortExp = String.Empty;
            if (!IsPostBack)
            {
                _mStrSortExp = String.Empty;
            }
            else
            {
                if (null != ViewState["_SortExp_"])
                {
                    _mStrSortExp = ViewState["_SortExp_"] as String;
                }

                if (null != ViewState["_Direction_"])
                {
                    _mSortDirection = (SortDirection)ViewState["_Direction_"];
                }
            }
        }
        public void LoadGame(int mgid, int difficulty)
        {
            var mg = MGMixAndMatch.FetchObjectByParent(mgid);

            MMID.Text = mg.MMID.ToString();

            LoadPage();

            Difficulty.Text = difficulty.ToString();
            if (difficulty == 2)
            {
                lblMedium.Visible = pnlAudioMedium.Visible = true;
                lblEasy.Visible   = lblHard.Visible = pnlAudioEasy.Visible = pnlAudioHard.Visible = false;
            }
            if (difficulty == 3)
            {
                pnlAudioHard.Visible = lblHard.Visible = true;
                lblEasy.Visible      = lblMedium.Visible = pnlAudioEasy.Visible = pnlAudioMedium.Visible = false;
            }
        }