Ejemplo n.º 1
0
        public async Task execute()
        {
            Process proc = new Process();

            proc.StartInfo.FileName = WindowsOperations.GetSystemDefaultBrowser();
            if (this.newWindow)
            {
                proc.StartInfo.Arguments = "--new-window ";
            }
            proc.StartInfo.Arguments      += url;
            proc.StartInfo.UseShellExecute = true;
            try
            {
                proc.Start();
            }
            catch (Exception ex)
            {
                throw new CommandExecutionException(ex.Message);
            }

            await Task.Delay(300);
        }
Ejemplo n.º 2
0
 public override void Run()
 {
     base.Run();
     WindowsOperations.Shutdown(ShutdownOption.Reboot);
     NativeMethods.ExitKrento();
 }
Ejemplo n.º 3
0
 internal static void _setFileLinkOff()
 {
     WindowsOperations.RemoveFileTypeAssociation(".ls", "LaunchScript");
 }
Ejemplo n.º 4
0
 internal static void _setFileLinkOn()
 {
     WindowsOperations.AssociateFileTypeIfNeeded(FILE_LINK_EXT, FILE_LINK_APPNAME);
 }
Ejemplo n.º 5
0
 public async Task execute()
 {
     await WindowsOperations.SnapCurrentWindowClean(dirs);
 }
Ejemplo n.º 6
0
 public override void Run()
 {
     base.Run();
     WindowsOperations.Suspend();
 }