Esempio n. 1
0
        public SplashScreen()
        {
            InitializeComponent();

            int maxID = _dbUtilities.GetMaxIDRecipe();

            if (maxID > 0)
            {
                _showSplashScreenFlag = true;

                int randomIndex = _rng.Next(maxID) + 1;

                Recipe recipe = _dbUtilities.GetRecipeById(randomIndex);
                recipe = _appUtilities.getRecipeForBindingInHomePage(recipe);

                recipe.NAME = _appUtilities.getStandardName(recipe.NAME, true);

                DataContext = recipe;
            }
            else
            {
                _showSplashScreenFlag = false;
            }
        }