private void UpdateIcon() { IList <IProgressView> selectedTransfers = View.SelectedTransfers; if (1 == selectedTransfers.Count) { Transfer transfer = GetTransferFromView(selectedTransfers[0]); if (transfer.getRoots().size() == 1) { if (transfer.getLocal() != null) { View.FileIcon = IconProvider.GetFileIcon(transfer.getRoot().local.getAbsolute(), false, true, false); } else { View.FileIcon = IconProvider.GetPath(transfer.getRoot().remote, 32); } } else { View.FileIcon = Images.Multiple; } } else { View.FileIcon = null; } }
public CommandForm() { InitializeComponent(); pictureBox.Image = IconProvider.GetFileIcon( Environment.ExpandEnvironmentVariables(@"%windir%\system32\cmd.exe"), false, true, true); }