コード例 #1
0
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            TruffleMenu.Initialize(this);
            base.Initialize();

            this.TrufflePane = new OutputPane(this, "Truffle");
            this.TestRPCPane = new OutputPane(this, "TestRPC");

            // Documentation says this is Microsoft Interal Use Only.
            // How else do we determine the solution that's opened?
            this._dte                          = (DTE)this.GetService(typeof(DTE));
            this._solutionEvents               = ((Events)this._dte.Events).SolutionEvents;
            this._solutionEvents.Opened       += SolutionOpened;
            this._solutionEvents.AfterClosing += SolutionClosed;

            TestRPCPane.runner.OnStart += () =>
            {
                this.RecheckEnvironment();
            };

            // Set all variables as not in a solution initially.
            SolutionClosed();
        }
コード例 #2
0
ファイル: TruffleMenu.cs プロジェクト: moxiesuite/moxievsix
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(Package package)
 {
     Instance = new TruffleMenu(package);
 }