/// <summary> /// Called when a transfer has finished /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void Transferfinished(object sender, OutTransferEventArgs args) { if (args.IsSuccessful) { for (int i = 0; i < CurrentSelectedFiles.Count; i++) { if (CurrentSelectedFiles[i].FileStructLocal.FilePath == args.FilePath) { CurrentSelectedFiles[i].panel_Parent.BackColor = Color.Transparent; CurrentSelectedFiles[i].CurrentState = FileStatus.Finished; CurrentSelectedFiles[i].pBox_Checkmark.Image = Resources.TransferResult_CheckMark; } } } else { for (int i = 0; i < CurrentSelectedFiles.Count; i++) { if (CurrentSelectedFiles[i].FileStructLocal.FilePath == args.FilePath) { CurrentSelectedFiles[i].panel_Parent.BackColor = Color.Transparent; CurrentSelectedFiles[i].CurrentState = FileStatus.Finished; CurrentSelectedFiles[i].pBox_Checkmark.Image = Resources.TransferResult_Cross; } } } }
private void TransferStarted(object sender, OutTransferEventArgs args) { for (int i = 0; i < CurrentSelectedFiles.Count; i++) { if (CurrentSelectedFiles[i].FileStructLocal.FilePath == args.FilePath) { //CurrentSelectedFiles[i].panel_Parent.BackColor = Color.Yellow; } } }
public void TransferFinished(OutTransferEventArgs e) { progress_Download.Visible = false; panel_Check.Visible = true; if (e.IsSuccessful) { panel_Check.BackgroundImage = Properties.Resources.TransferResult_CheckMark; FileStructure.FileStatus = FileStatus.Finished; } else { panel_Check.BackgroundImage = Properties.Resources.TransferResult_Cross; FileStructure.FileStatus = FileStatus.Inactive; } }
private void Transferfinished(object sender, OutTransferEventArgs e) { DarkFileDisplay dfd = FileDisplayList.Find(x => x.FileStructure.FileID == e.FileID); if (dfd == null) { return; } if (mainForm.InvokeRequired) { mainForm.Invoke((MethodInvoker) delegate { dfd.TransferFinished(e); }); } if (FileDisplayList.Where(x => x.FileStructure.FileStatus == FileStatus.QueuedForDownload).Count() <= 0) { if (mainForm.InvokeRequired) { mainForm.Invoke((MethodInvoker) delegate { ChangeGuiState(GUIState.FilesSelected); }); } } }
private void TransferStarted(object sender, OutTransferEventArgs e) { }