private void cmDeleteFile_Click(object sender, EventArgs e) { if (dgvData.SelectedRows.Count < 1) { SimpleMessage.ShowInfo("Please select file."); return; } try { if (SimpleMessage.Confirm("Are you sure to delete selected file(s)?") == DialogResult.Yes) { string path = SimplePath.GetFullPath(treeView1.SelectedNode.FullPath); for (int i = 0; i < dgvData.SelectedRows.Count; i++) { string file = PathUtils.GetFileName(dgvData.SelectedRows[i], path); File.Delete(file); } TreeViewHandler.RefreshNode(treeView1.SelectedNode); } } catch (Exception ex) { SimpleMessage.ShowException(ex); } }
public override PluginReturns Run(PluginArgument arg) { try { if (!SelectRootDirectory(arg.Host, false)) { if (SimpleMessage.Confirm("Failed to locate de4dot! Do you want to download now?") == System.Windows.Forms.DialogResult.Yes) { SimpleProcess.Start("https://bitbucket.org/0xd4d/de4dot/downloads"); } return(PluginReturns.None); } var frm = new frmDe4dot(arg.Host, arg.Rows, arg.SourceDir); frm.ShowDialog(); return(PluginReturns.Refresh); } catch { throw; } finally { } }
public override PluginReturns Run(PluginArgument arg) { if (arg.Rows == null || arg.Rows.Length < 1) { SimpleMessage.ShowInfo("Please select file to open with Reflector."); return(PluginReturns.None); } try { if (!this.SelectReflector(arg.Host, false)) { if (SimpleMessage.Confirm("Failed to locate .Net Reflector! Do you want to download now?") == System.Windows.Forms.DialogResult.Yes) { SimpleProcess.Start("http://www.reflector.net/"); } return(PluginReturns.None); } string path = GetReflector(arg.Host); try { if (!RemoteController.Available) { Process p = new Process(); p.StartInfo.FileName = path; p.StartInfo.WorkingDirectory = Path.GetDirectoryName(path); p.Start(); } int count = 0; while (!RemoteController.Available && count < 60) { Thread.Sleep(500); count++; } if (RemoteController.Available) { for (int i = 0; i < arg.Rows.Length; i++) { RemoteController.LoadAssembly(Path.Combine(arg.SourceDir, arg.Rows[i])); } } } catch (Exception ex) { SimpleMessage.ShowException(ex); } } catch { throw; } return(PluginReturns.None); }
private void cmFolderDelete_Click(object sender, EventArgs e) { try { string path = SimplePath.GetFullPath(treeView1.SelectedNode.FullPath); if (SimpleMessage.Confirm(String.Format("Are you sure to delete selected folder:\n{0}?", path)) == DialogResult.Yes) { Directory.Delete(path, true); treeView1.SelectedNode.Remove(); } } catch (Exception ex) { SimpleMessage.ShowException(ex); } }