Пример #1
0
        private void ProgressChanged(Internet.DownloadTask task)
        {
            string file = Path.GetFileName(task.FileName);
            string text = string.Format("Downloading file : \"{0}\"... {1}% [{2} out of {3}] completed.",
                                        file, task.ProgressPercentage, Functions.FormatMemory(task.Received), Functions.FormatMemory(task.Total));

            Interactivity.SetStatus(text);
            Interactivity.SetProgress(task.Received, task.Total);
        }
Пример #2
0
        private void username_completed(Internet.DownloadTask task)
        {
            usernameButton.UseWaitCursor = false;

            if (task.Status == Internet.ProgressStatus.Completed)
            {
                LoadUsernames();
                usernameBox.Text    = "";
                usernameStatus.Text = "Added " + task.Token.ToString();
            }
            else
            {
                usernameStatus.Text = task.Error.Message;
            }
        }