Beispiel #1
0
 protected virtual ModelCompBase AddComp(ModelCompBase Comp, params object[] _Agr)
 {
     MyComps.Add(Comp);
     if (State > ModelBaseState.Close)
     {
         Comp.Load(this, _Agr);
     }
     if (State == ModelBaseState.Start)
     {
         Comp.Start(this, _Agr);
     }
     return(Comp);
 }
Beispiel #2
0
        public virtual ModelCompBase AddComp(string nameSpace, string CPName, params object[] _Agr)
        {
            ModelCompBase Comp = Assembly.GetExecutingAssembly().CreateInstance(nameSpace + "." + CPName, true, System.Reflection.BindingFlags.Default, null, null, null, null) as ModelCompBase;

            MyComps.Add(Comp);
            if (State > ModelBaseState.Close)
            {
                Comp.Load(this, _Agr);
            }
            if (State == ModelBaseState.Start)
            {
                Comp.Start(this, _Agr);
            }
            return(Comp);
        }