C# Class NasaPicOfDay.BackgroundChanger

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

Public Methods

Method 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

Method 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 method

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

GetImage() public method

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.
return BackgroundImage

SetDesktopBackground() public method

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
return void