private void tsmiOpenUtilPath_Click(object sender, EventArgs e) { if (lvUtilSofeware.SelectedItems.Count > 0) { string exePath = lvUtilSofeware.SelectedItems[0].Tag.ToString(); DirFile.OpenAndSelectFile(exePath); } }
private void tsmiOpenExePath_Click(object sender, EventArgs e) { if (mouseDownOnListview != Point.Empty) { ListViewHitTestInfo info = lvStartMenu.HitTest(mouseDownOnListview.X, mouseDownOnListview.Y); if (info.Item != null && info.Item.Group != null) { string exePath = info.Item.Tag.ToString(); DirFile.OpenAndSelectFile(exePath); } } }
private void tsmiCreateShortCutOnUtil_Click(object sender, EventArgs e) { if (lvUtilSofeware.SelectedItems.Count > 0) { string exePath = lvUtilSofeware.SelectedItems[0].Tag.ToString(); string sFilename = exePath; string sFile = DirFile.GetFileNameNoExtension(sFilename); string sShortcutPath = ShortCutHelper.GetDeskDir() + "\\" + sFile + ".lnk"; if (!System.IO.File.Exists(sShortcutPath)) { string sWorkPath = DirFile.GetLastDirectory(sFilename); //创建快捷键 ShortCutHelper.CreateShortcut(sShortcutPath, sFilename, sWorkPath, "Make In IRunner", ""); } } }
private void tsmiCreateShortCut_Click(object sender, EventArgs e) { if (mouseDownOnListview != Point.Empty) { ListViewHitTestInfo info = lvStartMenu.HitTest(mouseDownOnListview.X, mouseDownOnListview.Y); if (info.Item != null && info.Item.Group != null) { string sFilename = info.Item.Tag.ToString(); string sFile = DirFile.GetFileNameNoExtension(sFilename); string sShortcutPath = ShortCutHelper.GetDeskDir() + "\\" + sFile + ".lnk"; if (!System.IO.File.Exists(sShortcutPath)) { string sWorkPath = DirFile.GetLastDirectory(sFilename); //创建快捷键 ShortCutHelper.CreateShortcut(sShortcutPath, sFilename, sWorkPath, "Make In IRunner", ""); } } } }