//-------------------------------------------------------------------------------- public ProgressForm(ProgressFileInfo progressFileInfo) { InitializeComponent(); this.Activate(); this.progressFileInfo = progressFileInfo; timerUpdateData.Enabled = true; }
//обработан файл void sinchronize_OnProcessFileInfo(Sinchronize sender, ProgressFileInfo progressFileInfo) { if (this.InvokeRequired) { this.BeginInvoke(new ProcessFileInfo(sinchronize_OnProcessFileInfo), new object[] { sender, progressFileInfo }); return; } string action= "Загрузка"; switch (progressFileInfo.Action) { case FileStatus.Upload: action = "Отправка на сервер"; break; case FileStatus.Delete: action = "Удаление"; break; case FileStatus.Download: action = "Получение с сервера"; break; } logger.Debug(action + " " + progressFileInfo.File.Name); }