コード例 #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);
        }
コード例 #2
0
 public override void Run()
 {
     base.Run();
     WindowsOperations.Shutdown(ShutdownOption.Reboot);
     NativeMethods.ExitKrento();
 }
コード例 #3
0
ファイル: Settings.cs プロジェクト: JBatzill/LaunchScript
 internal static void _setFileLinkOff()
 {
     WindowsOperations.RemoveFileTypeAssociation(".ls", "LaunchScript");
 }
コード例 #4
0
ファイル: Settings.cs プロジェクト: JBatzill/LaunchScript
 internal static void _setFileLinkOn()
 {
     WindowsOperations.AssociateFileTypeIfNeeded(FILE_LINK_EXT, FILE_LINK_APPNAME);
 }
コード例 #5
0
ファイル: Snap.cs プロジェクト: JBatzill/LaunchScript
 public async Task execute()
 {
     await WindowsOperations.SnapCurrentWindowClean(dirs);
 }
コード例 #6
0
 public override void Run()
 {
     base.Run();
     WindowsOperations.Suspend();
 }