private void EnableCPVsGui(bool enable) { if (enable && ChartPntToggleCmd.Instance == null) { ChartPntToggleCmd.Initialize(package); } if (enable && CPTableViewTWCmd.Instance == null) { CPTableViewTWCmd.Initialize(package); } if (CPTableViewTWCmd.Instance != null) { CPTableViewTWCmd.Instance.Enable(enable); } if (enable && CPChartViewTWCmd.Instance == null) { CPChartViewTWCmd.Initialize(package); } if (CPChartViewTWCmd.Instance != null) { CPChartViewTWCmd.Instance.Enable(enable); } if (enable && CPListTWCommand.Instance == null) { CPListTWCommand.Initialize(package); } if (CPListTWCommand.Instance != null) { CPListTWCommand.Instance.Enable(enable); } if (!enable) { if (CPTableViewTWCmd.Instance != null) { CPTableViewTWCmd.Instance.Close(); } if (CPChartViewTWCmd.Instance != null) { CPChartViewTWCmd.Instance.Close(); } if (CPListTWCommand.Instance != null) { CPListTWCommand.Instance.Close(); } } }
public int OnAfterOpenSolution(object pUnkReserved, int fNewSolution) { Globals.orchestrator.InitSolutionConfigurations(); string activeConfig = (string)Globals.dte.Solution.Properties.Item("ActiveConfig").Value; if (activeConfig.Contains(" [ChartPoints]")) { if (CPChartViewTWCmd.Instance == null) { CPChartViewTWCmd.Initialize(package); } CPChartViewTWCmd.Instance.Enable(true); } LoadCPProps(); return(VSConstants.S_OK); }