C# Класс NasaPicOfDay.BackgroundChanger

Retrieves the xml file data to grab the current image of the day
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetImage ( ) : BackgroundImage

Retrieves a BackgroundImage object containing the information downloaded from NASA regarding the current photo of the day

GetImage ( int selectedOffset, int selectedPage ) : BackgroundImage

Overloaded GetImage that allows the retrieval of previous images based on their position in the XML document provided from the nasa.gov website.

SetDesktopBackground ( string fileName ) : void

Set the desktop to the current picture of the day Full file path to the image to set as the desktop background.

Приватные методы

Метод Описание
GetCurrentScreenResolution ( ) : void

Retrieves the user's current screen resolution to try and pick the image that will fit.

StripHtml ( string textToClean ) : string

Removes HTML markup tags from the passed in string

SystemParametersInfo ( UInt32 uiAction, UInt32 uiParam, String pvParam, UInt32 fWinIni ) : Int32

Описание методов

GetImage() публичный Метод

Retrieves a BackgroundImage object containing the information downloaded from NASA regarding the current photo of the day
public GetImage ( ) : BackgroundImage
Результат BackgroundImage

GetImage() публичный Метод

Overloaded GetImage that allows the retrieval of previous images based on their position in the XML document provided from the nasa.gov website.
public GetImage ( int selectedOffset, int selectedPage ) : BackgroundImage
selectedOffset int Position of the image within the node list of images, 1 being the very first (newest)
selectedPage int Page number to retrieve the page that contains the selected image.
Результат BackgroundImage

SetDesktopBackground() публичный Метод

Set the desktop to the current picture of the day Full file path to the image to set as the desktop background.
public SetDesktopBackground ( string fileName ) : void
fileName string
Результат void