예제 #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();
         }
     }
 }
예제 #2
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 ChartPntToggleCmd(package);
 }