/// <summary> /// Called when the Ribbon button "Check for update" is invoked. /// </summary> /// <param name="parameter">Unused.</param> private void HandleRibbonButtonUpdateSoftwareInvoke(object parameter) { try { if (!_executer.Start()) { return; } UpdateSoftwareAsync().ContinueWith((antecedent) => _executer.End()); } catch (Exception ex) { _webMatrixHost.ShowExceptionMessage("TypeScript software update", "The following error occured. Please report at https://github.com/MacawNL/TypeScript4WebMatrix/issues.", ex); } }
//-------------------------------------------------------------------------- // // Constructors // //-------------------------------------------------------------------------- #region Constructors /// <summary> /// Initializes a new instance of the NodePowerTools class. /// </summary> public WebMatrixExtension() : base("WebMatrixExtension") { _launchDebuggerCommand = new DelegateCommand(p => { try { _mainScriptPath = this.GetMainFileName(); var nodeInspectorUrl = string.Format("{0}/{1}/debug", _host.WebSite.Uri.ToString(), _mainScriptPath); Process.Start("chrome", nodeInspectorUrl); } catch (Win32Exception ex) { _host.ShowNotification("Chrome is not installed! Node Inspector requires Chrome."); } catch (Exception ex) { _host.ShowExceptionMessage("Node Power Tools", "There was a problem launching chrome. Are you sure it's installed?", ex); } //Process.Start("chrome", _host.WebSite.Uri.ToString()); }); }