C# Class NasaPicOfDay.BackgroundChanger

Retrieves the xml file data to grab the current image of the day
Afficher le fichier Open project: BillCacy/NPOD Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

GetImage() public méthode

Retrieves a BackgroundImage object containing the information downloaded from NASA regarding the current photo of the day
public GetImage ( ) : BackgroundImage
Résultat BackgroundImage

GetImage() public méthode

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.
Résultat BackgroundImage

SetDesktopBackground() public méthode

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
Résultat void