コード例 #1
0
        public virtual YouTubeSettings LoadSettings()
        {
            var settings = Store.Items <YouTubeSettings>().FirstOrDefault();

            if (settings != null)
            {
                return(settings);
            }

            settings = new YouTubeSettings();
            Store.Save(settings);
            return(settings);
        }
コード例 #2
0
 public virtual bool SaveSettings(YouTubeSettings settings)
 {
     try
     {
         Store.Save(settings, CurrentSettings.Id);
         _currentSettings = settings;
     }
     catch (Exception)
     {
         return(false);
     }
     return(true);
 }