/// <summary> /// should be stared every hour plus 7 minutes, to ensure only "one time loading" of weather forecast from ZAMG /// normal weather download is done at full hour plus 5 minutes, if an actuall download is available, only /// the page creation is activated, if the +5 Download is not successfull, weather download is performed /// /// if the periodic startup is done at each full hour, this version does the download job, and the /// old version doing the download a second time /// /// creating of new weather pages (= source of newRing) is done in case of new data available, /// the parameter for the RunActualize routine define the number of non purged Weather MMUnits. /// default is 24 old MMUnits /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void App_OnStartup(object sender, StartupEventArgs e) { Data.DbServer3_Connect_Direct(); RefreshWeather refreshDll = new RefreshWeather(Data.DbServer3.MultiMedia); if (refreshDll.RunActualize() == null) { // nothing done, no ring changes required } else { // new Pages created, ring refreshment should be done } Shutdown(); }
private void CreateWeatherMMUInits_OnClick(object sender, RoutedEventArgs e) { Data.DbServer3.MultiMedia.LoadAll_IfHasNotBeenLoaded(); RefreshWeather weatherCreation = new RefreshWeather(Data.DbServer3.MultiMedia); MMUnit createdMMUnit = weatherCreation.RunActualize(); Window DetailWindow = new Window(); DetailWindow.Content = new MMUnitElementeDetails(); (DetailWindow.Content as MMUnitElementeDetails).MMUnitToProcesssInstance = createdMMUnit; (DetailWindow.Content as MMUnitElementeDetails).ProgrammSchemaModellInstance = ProgrammSchemaModellInstance; DetailWindow.ShowDialog(); }
public void CreateWeatherDBEntries() { RefreshWeather weatherFunctions = new RefreshWeather(Data.DbServer3.MultiMedia); weatherFunctions.CreateResources(); }