Exemple #1
0
        public FormStrategy(CompChartStrategyBinder binder, IStrategyInfo strategyInfo, IStrategy strategy, IDataPackage_Code dataPackage)
        {
            InitializeComponent();
            this.binder      = binder;
            this.dataPackage = dataPackage;

            InitStrategy(strategyInfo, strategy);
        }
Exemple #2
0
 private void BindDefaultStrategy()
 {
     try
     {
         IStrategyAssembly strategyAssembly = null;// StrategyMgrFactory.DefaultPluginMgr.GetStrategyAssembly("com.wer.sc.strategy.common");
         if (strategyAssembly == null)
         {
             return;
         }
         strategyInfo = strategyAssembly.GetStrategy("STRATEGY.DEFAULT");
         //strategyInfo = strategyAssembly.GetStrategy("STRATEGY.ZIGZAG");
         if (strategyInfo == null)
         {
             return;
         }
         strategy = strategyInfo.CreateStrategy().Strategy;
         binder   = new CompChartStrategyBinder(this.compChart1);
         binder.BindStrategy(strategy);
     }
     catch (Exception e)
     {
     }
 }