private void onSolutionOpened() { try { _applicationObject.ExecuteCommand("AutoTest.VSAddin.Connect.AutoTestNet_FeedbackWindow", ""); _WatchToken = _applicationObject.Solution.FullName; _engine = new Engine(_control, _applicationObject); _engine.Bootstrap(_WatchToken); if (_engine.IsRunning) _control.SetText("Engine is running and waiting for changes"); else _control.SetText("Engine is paused and will not detect changes"); } catch (Exception ex) { Debug.WriteException(ex); } }
/// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary> /// <param term='application'>Root object of the host application.</param> /// <param term='connectMode'>Describes how the Add-in is being loaded.</param> /// <param term='addInInst'>Object representing this Add-in.</param> /// <seealso class='IDTExtensibility2' /> public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { try { _applicationObject = (DTE2)application; bindWorkspaceEvents(); _addInInstance = (AddIn)addInInst; _engine = new ATEngine.Engine(null, _applicationObject); initializeCommands(); if (connectMode == ext_ConnectMode.ext_cm_UISetup || theShitIsNotThere()) initializeMenues(); _firstInitCompleted = true; } catch (Exception ex) { Debug.WriteException(ex); } }
/// <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary> /// <param term='application'>Root object of the host application.</param> /// <param term='connectMode'>Describes how the Add-in is being loaded.</param> /// <param term='addInInst'>Object representing this Add-in.</param> /// <seealso class='IDTExtensibility2' /> public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { try { _applicationObject = (DTE2)application; bindWorkspaceEvents(); _addInInstance = (AddIn)addInInst; _engine = new ATEngine.Engine(null, _applicationObject); initializeCommands(); if (connectMode == ext_ConnectMode.ext_cm_UISetup || theShitIsNotThere()) { initializeMenues(); } _firstInitCompleted = true; } catch (Exception ex) { Debug.WriteException(ex); } }