/// <summary> /// UploadFiles Button Click /// </summary> private void UploadFiles_OnClick() { CommonOpenFileDialog dlg = new CommonOpenFileDialog(); dlg.Title = "Select the HEIC Files"; dlg.InitialDirectory = "C:\\"; dlg.Filters.Add(new CommonFileDialogFilter("HEIC Files", "*.heic")); // 다중 파일 선택 기능.m dlg.Multiselect = true; if (dlg.ShowDialog() == CommonFileDialogResult.Ok) { foreach (string file in dlg.FileNames) { if (!ConvertFileList.Contains(file)) { ConvertFileList.Add(file); } else { MessageBox.Show("이미 리스트에 포함되어있습니다."); } } } }
private void OnListViewDrop(DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); foreach (string file in files) { if (file.ToLower().Contains("heic")) { if (!ConvertFileList.Contains(file)) { ConvertFileList.Add(file); } else { MessageBox.Show("이미 리스트에 포함되어있습니다."); } } } ListViewBorderColor = (Brush)(new BrushConverter().ConvertFromString("LightGray")); } }