Ejemplo n.º 1
0
        public SetupGameViewModel(IMvxSqliteConnectionFactory factory)
        {
            creatingPlayer = false;
            gameSettings = false;
            commandBarEnabled = true;
            error = new Error();
            popup = new Popup() { isVisible = false };
            playerUnderAction = new SixNimmtPlayer();

            length = Settings.gameLengthSetting;
            gameType = Settings.gameTypeSetting;

            try
            {
                _database = new DatabaseContext(factory);
            }
            catch (SQLiteException)
            {
                error.text = "Oops. Something went wrong. Please try again";
                error.isVisible = true;
            }

            GetAllPlayers();
        }
Ejemplo n.º 2
0
        public StatsViewModel(IMvxSqliteConnectionFactory factory)
        {
            popup = new Popup() { isVisible = false };

            try
            {
                database = new DatabaseContext(factory);
            }
            catch (SQLiteException)
            {
                //to-do
                //Error message here
            }

            Setup();
        }
Ejemplo n.º 3
0
        public ScoreboardViewModel(IMvxSqliteConnectionFactory factory)
        {
            game = new SixNimmtGame();
            displayOverview = false;
            popup = new Popup() { isVisible = false };

            try
            {
                _database = new DatabaseContext(factory);
            }
            catch (SQLiteException)
            {
                //to-do
                //Error message here
            }
        }