Ejemplo n.º 1
0
        /// <summary>
        /// First loading sequence.. only called once from ApplicationBase:Load()
        /// </summary>
        /// <returns>returns true if load is succesful</returns>
        public override bool OnFirstLoad()
        {
            Logger.Log("\n*** -- BEGIN LOADING -- ***\n");

            // SETS THE DEFAULT STARTING SEARCH DIRECTORY
            // BASED ON THE GAME BEING PLAYED....
            //            FileSearch.SetStartingSearchDirectory(FileSearch.GetApplicationDirectory() + "\\Media\\");

            almMachineStatus.Enable();
            try
            {
                MultiMediaLoader ml = new MultiMediaLoader("Bingo");
                ml.LoadFile("Bingo.txt");

                guiManager.Add(ml);
                ////////////////////////////////////////  un-Comment out for testing
                //                lblFps = (GuiLabel)guiManager.Get("lbl_fps");
                //                lblMessage = (GuiLabel)guiManager.Get("lbl_message");
                // add the 'StateLoading' state top the Bingo.stateMachine
                stateMachine.Add(new StateLoading(stateMachine));
                // change to (display) the 'Loading' state
                stateMachine.ChangeActiveState("Loading");
            }
            catch (Exception e)
            {
                Logger.Log("Exception Loading Loading State \n" + e.ToString());
                MessageBox.Show("Error Loading");
                return(false);
            }
            //            Logger.Log("Finished 'OnFirstLoad()' \n");
            return(true);
        }