public void SendAttachment( [CommandParameter("To")] IEmailAddressFacet emailAddress, [CommandParameter("Attachment")][FilterExtraData("Type", "File")] IFileSystemItemFacet attachment, [CommandParameter("Text", Optional = true)] ITextFacet message) { Process.Start("mailto:" + emailAddress.Value); }
public void OpenProgram( [CommandParameter("Program"), FilterExtraData("Type", "Program")] IFileSystemItemFacet program, [CommandParameter("File", Optional = true), FilterExtraData("Type", "File")] IFileSystemItemFacet file, [CommandParameter("Text", Optional = true)] ITextFacet commandline) { if (file != null) { Process.Start(program.Path, '"' + file.Path + '"'); } else { Process.Start(program.Path); } }
public void OpenCommandPrompt( [CommandParameter("Location", Optional = true), FilterExtraData("Type", "Folder")] IFileSystemItemFacet folder) { Process.Start("cmd.exe", string.Format(@"/k ""cd ""{0}""""", folder.Path)); }
public void OpenInExplorer( [CommandParameter("File or Folder"), FilterExtraData("Type", "File", "Folder")] IFileSystemItemFacet item) { Process.Start((string)item.Path); }