Ejemplo n.º 1
0
 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();
         }
     }
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 /// <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 CPChartViewTWCmd(package);
 }