// Constructor
        #region Constructor
        public GameDriver(Texture2D buttonTexture, SpriteFont font, Texture2D patientSprite, Texture2D userAvatarSprite, Dictionary <string, ShopItem> imagesDictionary, Texture2D sprite, PlayerManager playerManager)
        {
            ButtonTexture     = buttonTexture;
            Font              = font;
            PatientTexture    = patientSprite;
            UserAvatarTexture = userAvatarSprite;

            // Initialize all pages using assets provided
            mainMenuPage  = new MainMenu(ButtonTexture, Font);
            shopPage      = new ShopPage(ButtonTexture, Font, imagesDictionary, playerManager);
            customizePage = new CustomizePage(ButtonTexture, Font, imagesDictionary, sprite);
            statsPage     = new StatsPage(ButtonTexture, Font, playerManager);
            playPage      = new PlayPage(PatientTexture, ButtonTexture, Font);
        }
예제 #2
0
    public static void ClearAll()
    {
        SearchResumeBank.SearchManifest = null;
        SearchResumeBank.SearchBuilder  = null;

        SearchJobPostings.SearchManifest = null;
        SearchJobPostings.SearchBuilder  = null;

        PlaceAnOrder.ShoppingCart  = null;
        RenewMembership.Membership = null;

        CustomizePage.Clear();


        RenewMembership.Clear();
        CreateAccount.Clear();
        RegisterForEvent.Clear();
        GroupRegistration.Clear();
        EnterCompetition.Clear();
        PostAJob.Clear();
        PlaceAnOrder.Clear();
        ViewChapterMembers.Clear();
        ViewSectionMembers.Clear();
        ViewOrganizationalLayerMembers.Clear();
        SearchDirectory.Clear();
        SearchJobPostings.Clear();
        SearchEventRegistrations.Clear();
        SearchResumeBank.Clear();
        AddContact.Clear();
        CustomizePage.Clear();
        // just wipe all keys
        // throw new NotSupportedException();

        /*
         * List<string> keys = new List<string>();
         * foreach (string key in HttpContext.Current.Session.Keys)
         *  if (key.StartsWith("MemberSuite:"))
         *      keys.Add(key);
         *
         * foreach( var key in keys )
         *      HttpContext.Current.Session[key] = null;
         * */
    }