private static void Update() { _updateIsRunning = true; _settings = SETTINGS_MANAGER.Load<CinemaSettings>(); _locations = SETTINGS_MANAGER.Load<Locations>(); GoogleMovies.GoogleMovies.Data = new CinemaDataList { List = new List<CinemaData>() }; if (_locations.LocationSetupList != null) { var cl = _locations.LocationSetupList; int percent = 100 / (cl.Count); foreach (var c in cl) { Info = c.Name; GoogleMovies.GoogleMovies.Data.List.Add(GoogleMovies.GoogleMovies.GetCinemaData(c)); UpdateProgress += percent; } UpdateProgress = 0; GrappOtherInfos(); } _settings.LastUpdate = DateTime.Today; ServiceRegistration.Get<ISettingsManager>().Save(_settings); _locations.Changed = false; ServiceRegistration.Get<ISettingsManager>().Save(_locations); var datalist = new Datalist { CinemaDataList = GoogleMovies.GoogleMovies.Data }; ServiceRegistration.Get<ISettingsManager>().Save(datalist); _updateIsRunning = false; }
private void Init() { items.Clear(); AddItem("[Cinema.Content.uk]", "uk"); AddItem("[Cinema.Content.fr]", "fr"); AddItem("[Cinema.Content.de]", "de"); AddItem("[Cinema.Content.es]", "es"); AddItem("[Cinema.Content.it]", "it"); AddItem("[Cinema.Content.ch]", "ch"); AddItem("[Cinema.Content.ch_fr]", "ch-fr"); AddItem("[Cinema.Content.nl]", "nl"); AddItem("[Cinema.Content.dk]", "dk"); AddItem("[Cinema.Content.se]", "se"); AddItem("[Cinema.Content.fi]", "fi"); var settingsManager = ServiceRegistration.Get<ISettingsManager>(); Settings = settingsManager.Load<CinemaSettings>(); }