Beispiel #1
0
 public static void downloadStatusChanged(object source, DCCEventArgs args)
 {
     Console.WriteLine("===============DCC EVENT===============");
     Console.WriteLine("DOWNLOAD STATUS: " + args.Status);
     Console.WriteLine("DOWNLOAD FILENAME: " + args.FileName);
     Console.WriteLine("DOWNLOAD PROGRESS: " + args.Progress + "%");
     Console.WriteLine("===============END DCC EVENT===============");
     Console.WriteLine("");
 }
Beispiel #2
0
        private void OnDownloadUpdate(object sender, DCCEventArgs args)
        {
            DebugHandler.TraceMessage("OnDownloadUpdate Called.", DebugSource.TASK, DebugType.ENTRY_EXIT);

            IrcClientDownloadEventArgs eventArgs = new IrcClientDownloadEventArgs()
            {
                FileName         = args.FileName,
                FileLocation     = args.FilePath,
                DownloadSpeed    = args.KBytesPerSecond.ToString(),
                FileSize         = (args.FileSize / 1048576),
                DownloadProgress = args.Progress,
                DownloadStatus   = args.Status
            };

            DebugHandler.TraceMessage(eventArgs.ToString(), DebugSource.TASK, DebugType.PARAMETERS);

            OnIrcClientDownloadEvent?.Invoke(this, eventArgs);
        }
        public void OnDccEvent(object sender, DCCEventArgs args)
        {
            if (args != null)
            {
                string xdcc     = "/msg " + args.Bot + " xdcc send " + args.Pack;
                int    progress = args.Progress;
                string status   = args.Status;

                UpdateDownloadingBox(xdcc, progress, status);

                if (status == "COMPLETED")
                {
                    int i = DownloadQueue.IndexOf(xdcc);
                    DownloadQueue[i] = "Completed";
                    CheckdownloadQueue();
                }
            }
        }
Beispiel #4
0
        /// <summary>
        /// Event that fires when DCCClient starts downloading.
        /// </summary>
        /// <param name="sender">Values of the class that fired the event</param>
        /// <param name="args">DCCEventArgs contains all the information about the download update</param>
        public void OnDccEvent(object sender, DCCEventArgs args)
        {
            string fileName         = args.FileName;
            int    downloadProgress = args.Progress;
            string downloadSpeed    = args.KBytesPerSecond.ToString();
            string status           = args.Status;

            string fullDownloadInformation = fileName + "   |   " + status + "  |   " + downloadSpeed + " kb/s   |   " + _defaultDownloadDirectory;

            UpdateDownloadList(fullDownloadInformation, fileName);

            UpdateProgressBar(downloadProgress);

            if (status.Contains("COMPLETED"))
            {
                UpdateProgressBar(100);
            }
        }
Beispiel #5
0
        public static Dictionary <string, bool> buddyStatus = new Dictionary <string, bool>();               // key: name, value: online status

        public static void downloadStatusChanged(object source, DCCEventArgs args)
        {
            Debug.WriteLine("DOWNLOAD STATUS: " + args.Status);
            Debug.WriteLine("DOWNLOAD FILENAME: " + args.FileName);
            Debug.WriteLine("DOWNLOAD PROGRESS: " + args.Progress + "%");
        }