You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Console.WriteLine("Astronomy Picture Of The Day | Program Created by Weston McNamara\n");
33
33
34
-
//Ouput the title, date, and an image explanation
35
-
Console.WriteLine(apod.title);
36
-
Console.WriteLine(apod.date+"\n\n");
37
-
Console.WriteLine(apod.explanation+"\n\n");
38
-
39
34
//After displaying that, download the background, and set the desktop background with the new image.
40
35
using(varclient=newWebClient())
41
36
{
42
37
Console.WriteLine("Downloading Background...");
43
38
client.DownloadFile(apod.hdurl,"bg.jpg");
44
39
SetDesktopBackground(Path.GetFullPath("bg.jpg"));
45
-
Console.WriteLine("Background Updated!");
40
+
Console.WriteLine("Background Updated!\n");
46
41
}
42
+
43
+
//Ouput the title, date, and an image explanation
44
+
Console.WriteLine(apod.title);
45
+
Console.WriteLine(apod.date+"\n\n");
46
+
Console.WriteLine(apod.explanation+"\n");
47
47
}
48
48
catch(Exceptione)
49
49
{
50
+
50
51
//Console.WriteLine("\nException Caught!");
51
52
//Console.WriteLine("Message :{0} ", e.Message);
52
53
Console.WriteLine("\nThe APOD today is not a format that can be set to a desktop background, such as a video. Please visit the official APOD website to view todays APOD. \n\nhttps://apod.nasa.gov/apod/astropix.html");
0 commit comments