コード例 #1
0
        public bool DownloadFileAndReturnStatus(string url, string downloadLocation)
        {
            var doesSucceed = NetworkHelper.DownloadFile(url, downloadLocation);

            if (doesSucceed)
            {
                NotificationsHelper.DisplayMessage(Messages.SuccessfulDownload(PathsHelper.GetFileNameFromPath(url)));
            }
            else
            {
                NotificationsHelper.DisplayMessage(Messages.FailedDownload(PathsHelper.GetFileNameFromPath(url)));
                NotificationsHelper.DisplayMessage(Messages.StartAgain);
                return(true);
            }

            return(false);
        }