Start() public method

public Start ( string args = null ) : Process
args string
return System.Diagnostics.Process
Example #1
0
 public void Update(Release release, bool closeApp)
 {
     using (AppLogger.Log.InfoCall())
     {
         var file = new WebFile(new Uri(release.Asset.browser_download_url), InstallerFilePath);
         file.Downloaded += (sender, args) =>
         {
             AppLogger.Log.Info("Update downloaded: " + file);
             file.Start(InstallerParameters);
             if (closeApp)
             {
                 _context.Send(s => { Application.Exit(); }, null);
             }
         };
         file.DownloadFile();
     }
 }
Example #2
0
 public void Update(Release release, bool closeApp)
 {
     using (AppLogger.Log.InfoCall())
     {
         var file = new WebFile(new Uri(release.Asset.browser_download_url), InstallerFilePath);
         file.Downloaded += (sender, args) =>
         {
             AppLogger.Log.Info("Update downloaded: " + file);
             file.Start(InstallerParameters);
             if (closeApp)
             {
                 _context.Send(s => { Application.Exit(); }, null);
             }
         };
         file.DownloadFile();
     }
 }
Example #3
0
        public void Update(Release release, bool closeApp)
        {
            var file = new WebFile(new Uri(release.Asset.browser_download_url), InstallerFilePath);

            file.Downloaded += (sender, args) =>
            {
                Log.Information("Update downloaded: {@File}", file);
                if (!SignatureChecker.IsValid(file.FilePath))
                {
                    Log.Error("The file has the wrong signature. Update cancelled.");
                    return;
                }
                file.Start(InstallerParameters);
                if (closeApp)
                {
                    _context.Send(s => { Application.Exit(); }, null);
                }
            };
            file.DownloadFile();
        }