/// <summary> /// Handles when a weather source successfully reloads data. /// </summary> void HandleWeatherUpdated() { DockServices.System.RunOnMainThread(delegate { AbstractWeatherSource weather = WeatherController.Weather; string feelsLike = ""; if (weather.ShowFeelsLike) { feelsLike = " (" + weather.FeelsLike + AbstractWeatherSource.TempUnit + ")"; } HoverText = weather.Condition + " " + weather.Temp + AbstractWeatherSource.TempUnit + feelsLike + " " + weather.City; Icon = WeatherController.Weather.Image; Status = WeatherDockletStatus.Normal; State &= ~ItemState.Wait; QueueRedraw(); if (painter != null) { painter.WeatherChanged(); } }); }
/// <summary> /// Returns the singleton instance for this class. /// </summary> /// <returns> /// A <see cref="AbstractWeatherSource"/> that is the only instance of this class. /// </returns> public static AbstractWeatherSource GetInstance() { if (Instance == null) { Instance = new WeatherChannelWeatherSource(); } return(Instance); }
/// <summary> /// Returns the singleton instance for this class. /// </summary> /// <returns> /// A <see cref="AbstractWeatherSource"/> that is the only instance of this class. /// </returns> public static AbstractWeatherSource GetInstance() { if (Instance == null) { Instance = new GoogleWeatherSource(); } return(Instance); }
/// <summary> /// Returns the singleton instance for this class. /// </summary> /// <returns> /// A <see cref="AbstractWeatherSource"/> that is the only instance of this class. /// </returns> public static AbstractWeatherSource GetInstance () { if (Instance == null) Instance = new WunderWeatherSource (); return Instance; }