/// <summary> /// Event for download updates, containging information about the following /// DccString : unparsed dccstring received from server, handy for debugging purposes /// FileName : file that is currently being downloaded /// FileSize : size of file that is currently being downloaded /// Ip : server address where file originates from /// Port : port of server where file originates from /// Pack : original pack that the user requested /// Bot : original bot where the user requested a pack (file) from /// BytesPerSecond : current download speed in bytes p/s /// KBytesPerSecond : current download speed in kbytes p/s /// MBytesPerSecond : current download speed in mbytes p/s /// Status : current download status, for example: (WAITING, DOWNLOADING, FAILED, ABORTED, etc) /// Progress : percentage downloaded (0-100%) (is int!) /// </summary> /// <param name="currentClient"></param> public DCCEventArgs(DCCClient currentClient) { DccString = currentClient.NewDccString; FileName = currentClient.NewFileName; FileSize = currentClient.NewFileSize; Ip = currentClient.NewIP; Port = currentClient.NewPortNum; Pack = currentClient.PackNum; Bot = currentClient.BotName; BytesPerSecond = currentClient.BytesPerSecond; KBytesPerSecond = currentClient.KBytesPerSecond; MBytesPerSecond = currentClient.MBytesPerSecond; Status = currentClient.Status; Progress = currentClient.Progress; FilePath = currentClient.CurrentFilePath; Buffer = currentClient.Buffer; }
public DownloadFilesActivity(AnimeFileDatabase db, ProgramSettings ps) { this.db = db; this.ps = ps; ddat = new DccDownloadActivityTask(db, ps); gfpat = new GetFilteredPacksActivityTask(db, ps); dccClient = new DCCClient(); dccClient.OnDccDebugMessage += dccDebug; ircClient = new IrcClient(); ircClient.SetConnectionInformation( rizon, "maievBot", hsChannel, dccClient, ps.settings.FolderInput); //ircClient.OnMessageReceived += IrcClient_OnMessageReceived; //ircClient.OnRawMessageReceived += IrcClient_OnRawMessageReceived; var res = ircClient.Connect(); }