Esempio n. 1
0
            public static void Download(string fileUrl)
            {
                WebClient webClient = new WebClient();

                try
                {
                    OutputWriter.WriteMessageNewLine("Started downloading: ");

                    string nameOfFile   = ExtractNameOfFile(fileUrl);
                    string downloadPath = SessionData.currentPath + "/" + nameOfFile;

                    webClient.DownloadFile(fileUrl, downloadPath);
                    OutputWriter.WriteMessageNewLine("Download complete");
                }
                catch (WebException ex)
                {
                    OutputWriter.DisplayExpetion(ex.Message);
                }
            }
Esempio n. 2
0
 public void DisplayInvalidCommandMessage(string input)
 {
     OutputWriter.DisplayExpetion($"The command '{input}' is invalid ");
 }