private void FToolStripMenuItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) { switch (e.ClickedItem.Tag) { case "O": ImportFile(); break; case "M": ImportImageFolder(); break; case "X": this.Close(); break; default: WordPath wordPath = this.WordSet.Setting.RecentPaths[(int)e.ClickedItem.Tag]; if (wordPath.PathMode == DisplayMode.ImageFolder) { WordSet.ImportImageFolder(wordPath.Path); } else { WordSet.ImportFile(wordPath.Path); } ShowWord(); LoadRecentPathToMenu(); break; } }
public static Image GetExtImage(WordPath item) { if (item.PathMode == DisplayMode.ImageFolder) { return(ImageResource.ImageFolder); } string fileExt = Path.GetExtension(item.Path).Replace(".", "").ToUpper(); switch (fileExt) { case "TXT": return(ImageResource.TXT); case "CSV": return(ImageResource.CSV); } return(null); }