예제 #1
0
    public void Process(MenuStack stack)
    {
        menuTicketing.Update();
        bool enabled = User.IsSignedInPSN && !Ticketing.IsBusy();

        if (menuTicketing.AddItem("Request Ticket", enabled))
        {
            ErrorHandler(Ticketing.RequestTicket());
        }
        if (menuTicketing.AddItem("Request Cached Ticket", enabled))
        {
            ErrorHandler(Ticketing.RequestCachedTicket());
        }
        if (menuTicketing.AddItem("Get Ticket Entitlements", gotTicket))
        {
            Ticketing.TicketEntitlement[] ticketEntitlements = Ticketing.GetTicketEntitlements(ticket);
            OnScreenLog.Add("Ticket contains " + ticketEntitlements.Length + " entitlements");
            for (int i = 0; i < ticketEntitlements.Length; i++)
            {
                OnScreenLog.Add("Entitlement " + i);
                OnScreenLog.Add(" " + ticketEntitlements[i].id + " rc: " + ticketEntitlements[i].remainingCount + " cc: " + ticketEntitlements[i].consumedCount + " type: " + ticketEntitlements[i].type);
            }
        }
        if (menuTicketing.AddBackIndex("Back"))
        {
            stack.PopMenu();
        }
    }
    public void Process(MenuStack stack)
    {
        this.menuTicketing.Update();
        bool enabled = User.get_IsSignedInPSN() && !Ticketing.IsBusy();

        if (this.menuTicketing.AddItem("Request Ticket", enabled))
        {
            this.ErrorHandler(Ticketing.RequestTicket());
        }
        if (this.menuTicketing.AddItem("Request Cached Ticket", enabled))
        {
            this.ErrorHandler(Ticketing.RequestCachedTicket());
        }
        if (this.menuTicketing.AddItem("Get Ticket Entitlements", this.gotTicket))
        {
            Ticketing.TicketEntitlement[] ticketEntitlements = Ticketing.GetTicketEntitlements(this.ticket);
            OnScreenLog.Add("Ticket contains " + ticketEntitlements.Length + " entitlements");
            for (int i = 0; i < ticketEntitlements.Length; i++)
            {
                OnScreenLog.Add("Entitlement " + i);
                OnScreenLog.Add(string.Concat(new object[]
                {
                    " ",
                    ticketEntitlements[i].get_id(),
                    " rc: ",
                    ticketEntitlements[i].remainingCount,
                    " cc: ",
                    ticketEntitlements[i].consumedCount,
                    " type: ",
                    ticketEntitlements[i].type
                }));
            }
        }
        if (this.menuTicketing.AddBackIndex("Back", true))
        {
            stack.PopMenu();
        }
    }