Пример #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();
        }
Пример #2
0
        public StatsViewModel(IMvxSqliteConnectionFactory factory)
        {
            popup = new Popup() { isVisible = false };

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

            Setup();
        }
Пример #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
            }
        }