Class StdBSWeather
Weather service for platform.
Implements
Inherited Members
Namespace: StdPlatBS100
Assembly: StdPlatBS100.dll
Syntax
public class StdBSWeather : StdBSBaseService, IDisposableConstructors
StdBSWeather()
Declaration
public StdBSWeather()Properties
City
Saved last city.
Declaration
public StdBEWeatherCity City { get; set; }Property Value
| Type | Description | 
|---|---|
| StdBEWeatherCity | 
Client
Gets the service client.
Declaration
protected HubClient Client { get; }Property Value
| Type | Description | 
|---|---|
| Primavera.Lithium.HubServices.HubClient | 
Methods
CreateWeatherPanel(StdBEWeatherInfo)
Creates the weather panel.
Declaration
public void CreateWeatherPanel(StdBEWeatherInfo weather)Parameters
| Type | Name | Description | 
|---|---|---|
| StdBEWeatherInfo | weather | The weather info. | 
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | disposing | 
 | 
Finalize()
Finalizes an instance of the StdBSWeather class.
Declaration
protected void Finalize()GetServiceClient()
Gets the service client.
Declaration
protected HubClient GetServiceClient()Returns
| Type | Description | 
|---|---|
| Primavera.Lithium.HubServices.HubClient | 
GetWeatherCities(String)
Fills the weather cities.
Declaration
public List<StdBEWeatherCity> GetWeatherCities(string jsonReceivedData)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | jsonReceivedData | The json received data. | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.List<StdBEWeatherCity> | 
GetWeatherForCity(String)
Gets the weather for city.
Declaration
public Task<StdBEWeatherInfo> GetWeatherForCity(string city)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | city | The city. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<StdBEWeatherInfo> | 
GetWeatherForCoordinatesAsync(Double, Double)
Gets the weather for coordinates.
Declaration
public Task<StdBEWeatherInfo> GetWeatherForCoordinatesAsync(double latitude, double longitude)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Double | latitude | The latitude. | 
| System.Double | longitude | The longitude. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<StdBEWeatherInfo> | 
GetWeatherForLocationAsync(String)
Gets the weather for location.
Declaration
public Task<StdBEWeatherInfo> GetWeatherForLocationAsync(string city)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | city | The city. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<StdBEWeatherInfo> | 
ImagesNoWeather()
Image no weather.
Declaration
public Image ImagesNoWeather()Returns
| Type | Description | 
|---|---|
| System.Drawing.Image | 
ImagesWeatherIcon(String, Boolean)
Imageses the weather icon.
Declaration
public Image ImagesWeatherIcon(string value, bool small = false)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | value | The iamge value. | 
| System.Boolean | small | Small image. | 
Returns
| Type | Description | 
|---|---|
| System.Drawing.Image | 
LoadWeatherForSavedCity()
Gets the weather for saved city.
Declaration
public void LoadWeatherForSavedCity()OpenWeatherPanel(StdBEWeatherInfo)
Open weather panel.
Declaration
public void OpenWeatherPanel(StdBEWeatherInfo weather)Parameters
| Type | Name | Description | 
|---|---|---|
| StdBEWeatherInfo | weather | The weather info. | 
SearchLocationAsync(String)
Searches the location.
Declaration
public Task<List<StdBEWeatherCity>> SearchLocationAsync(string term)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | term | The term. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<StdBEWeatherCity>> | 
Events
CityWasChanged
Occurs when [city was changed].
Declaration
public event StdBSWeather.CityChangedHandler CityWasChangedEvent Type
| Type | Description | 
|---|---|
| StdBSWeather.CityChangedHandler | 
CityWeatherForecastChanged
Occurs when [city weather forecast changed].
Declaration
public event StdBSWeather.CityWeatherChangedHandler CityWeatherForecastChangedEvent Type
| Type | Description | 
|---|---|
| StdBSWeather.CityWeatherChangedHandler |