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();
        }
        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
            }
        }