/// <summary>
        /// Returns which page should be loaded first
        /// </summary>
        public static Type GetStartingPage()
        {
            Type startingPage = typeof(Views.WelcomePage);

            try
            {
                var    apiKeyManager = ApiKeyManager.GetInstance();
                string storedApiKey  = apiKeyManager.GetSavedApiKey();
                if (!String.IsNullOrWhiteSpace(storedApiKey))
                {
                    startingPage = typeof(Views.MainPage);
                }
            }
            catch (Exception e)
            {
                Serilog.Log.Error(e, "Error determining start page");
            }

            return(startingPage);
        }
 /// <summary>
 /// Handles storage and retrieval of the user's preferred video quality. Also parses videos to provide correct URIs.
 /// </summary>
 private VideoUriManager()
 {
     _settingsManager = new SettingsManager();
     _apiKeyManager   = Services.ApiKeyManager.GetInstance();
 }
Beispiel #3
0
 public static ApiKeyManager GetInstance()
 {
     return(_instance ?? (_instance = new ApiKeyManager()));
 }