public AfterUploadForm(TaskInfo info) { InitializeComponent(); Info = info; if (Info.TaskSettings.AdvancedSettings.AutoCloseAfterUploadForm) { tmrClose.Start(); } bool isFileExist = !string.IsNullOrEmpty(info.FilePath) && File.Exists(info.FilePath); if (info.DataType == EDataType.Image) { if (isFileExist) { pbPreview.LoadImageFromFileAsync(info.FilePath); } else { pbPreview.LoadImageFromURLAsync(info.Result.URL); } } Text = "ShareXYZ - " + (isFileExist ? info.FilePath : info.FileName); lvClipboardFormats.Groups.Add(lvgForums); lvClipboardFormats.Groups.Add(lvgHtml); lvClipboardFormats.Groups.Add(lvgWiki); lvClipboardFormats.Groups.Add(lvgLocal); lvClipboardFormats.Groups.Add(lvgCustom); foreach (LinkFormatEnum type in Helpers.GetEnums <LinkFormatEnum>()) { if (!Helpers.IsImageFile(Info.Result.URL) && (type == LinkFormatEnum.HTMLImage || type == LinkFormatEnum.HTMLLinkedImage || type == LinkFormatEnum.ForumImage || type == LinkFormatEnum.ForumLinkedImage || type == LinkFormatEnum.WikiImage || type == LinkFormatEnum.WikiLinkedImage)) { continue; } AddFormat(type.GetLocalizedDescription(), GetUrlByType(type)); } if (Helpers.IsImageFile(Info.Result.URL)) { foreach (ClipboardFormat cf in Program.Settings.ClipboardContentFormats) { AddFormat(cf.Description, parser.Parse(Info, cf.Format), lvgCustom); } } }