Exemplo n.º 1
0
        /// <summary>
        /// Initialize Game Window
        /// </summary>
        /// <param name="game"></param>
        /// <param name="user"></param>
        public GameWindow(clsGame game, clsUser user, Window objGameWindow)
        {
            ///Exception handling for the normal method
            try
            {
                InitializeComponent();
                this.game             = game;
                this.player           = user;
                QuestionLabel.Content = this.game.questionToString(0);

                /// Set up the timer
                MyTimer          = new DispatcherTimer();
                MyTimer.Interval = TimeSpan.FromSeconds(1);

                MyTimer.Tick += MyTimer_Tick1;
            }
            catch (Exception ex)
            {
                throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." +
                                    MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message);
            }
        }