Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
 public void OpenCommandPrompt(
     [CommandParameter("Location", Optional = true), FilterExtraData("Type", "Folder")] IFileSystemItemFacet folder)
 {
     Process.Start("cmd.exe", string.Format(@"/k ""cd ""{0}""""", folder.Path));
 }
Esempio n. 4
0
 public void OpenInExplorer(
     [CommandParameter("File or Folder"), FilterExtraData("Type", "File", "Folder")] IFileSystemItemFacet item)
 {
     Process.Start((string)item.Path);
 }