Пример #1
0
 protected StageOperation(StageOperationParameters parameters)
 {
     mParameters          = parameters;
     mParameters.Changed += delegate {
         OnParametersChanged();
     };
 }
Пример #2
0
 protected StageOperation(StageOperationParameters parameters)
 {
     mParameters = parameters;
     mParameters.Changed += delegate {
         OnParametersChanged();
     };
 }
Пример #3
0
        public virtual object Clone()
        {
            StageOperationParameters target = new StageOperationParameters();

            CopyDataTo(target);
            return(target);
        }
 public StageOperationParametersWidget(StageOperationParameters parameters)
 {
     mParameters = parameters;
     mParameters.Changed += delegate {
         if (!mParametersAreChangingByMe)
             HandleParametersChangedNotByUI();
         Sensitive = mParameters.Active;
     };
     Sensitive = mParameters.Active;
 }
Пример #5
0
 public StageOperationParametersWidget(StageOperationParameters parameters)
 {
     mParameters          = parameters;
     mParameters.Changed += delegate {
         if (!mParametersAreChangingByMe)
         {
             HandleParametersChangedNotByUI();
         }
         Sensitive = mParameters.Active;
     };
     Sensitive = mParameters.Active;
 }
Пример #6
0
        public static StageOperationParameters StageOperationParametersFactory(string id)
        {
            Type sopt = StageOperationIDAttribute.FindTypeByID(mStageOperationParametersTypes, id);

            if (sopt == null)
            {
                throw new IncorrectNodeValueException("Can't find StageOperationParameters type for the ID (" + id + ")");
            }

            // Creating stage operation parameters
            StageOperationParameters sop = (StageOperationParameters)sopt.GetConstructor(
                new Type[] {}
                ).Invoke(new object[] {});

            return(sop);
        }
Пример #7
0
        public static StageOperation StageOperationFactory(StageOperationParameters parameters)
        {
            string id  = StageOperationIDAttribute.GetTypeID(parameters.GetType());
            Type   sot = StageOperationIDAttribute.FindTypeByID(mStageOperationTypes, id);

            if (sot == null)
            {
                throw new IncorrectNodeValueException("Can't find StageOperation type for the ID (" + id + ")");
            }

            // Creating stage operation
            StageOperation so = (StageOperation)sot.GetConstructor(
                new Type[] { typeof(StageOperationParameters) }
                ).Invoke(new object[] { parameters });

            return(so);
        }
Пример #8
0
        public static IStageOperationParametersEditor StageOperationParametersEditorFactory(StageOperationParameters sop)
        {
            Type paramType       = sop.GetType();
            Type paramWidgetType = StageOperationIDAttribute.FindTypeByID(
                mStageOperationParametersWidgetTypes,
                StageOperationIDAttribute.GetTypeID(sop.GetType())
                );
            StageOperationParametersWidget pwid = (StageOperationParametersWidget)(
                paramWidgetType.GetConstructor(new Type[] { paramType }).Invoke(new object[] { sop })
                );

            return(pwid);
        }
Пример #9
0
 public virtual void CopyDataTo(StageOperationParameters target)
 {
     target.mActive = mActive;
 }
 public virtual object Clone()
 {
     StageOperationParameters target = new StageOperationParameters();
     CopyDataTo(target);
     return target;
 }
 public virtual void CopyDataTo(StageOperationParameters target)
 {
     target.mActive = mActive;
 }
Пример #12
0
 public static IStageOperationParametersEditor StageOperationParametersEditorFactory(StageOperationParameters sop)
 {
     Type paramType = sop.GetType();
     Type paramWidgetType = StageOperationIDAttribute.FindTypeByID(
             mStageOperationParametersWidgetTypes,
             StageOperationIDAttribute.GetTypeID(sop.GetType())
         );
     StageOperationParametersWidget pwid = (StageOperationParametersWidget)(
         paramWidgetType.GetConstructor(new Type[] { paramType }).Invoke(new object[] { sop })
     );
     return pwid;
 }
Пример #13
0
        public static StageOperation StageOperationFactory(StageOperationParameters parameters)
        {
            string id = StageOperationIDAttribute.GetTypeID(parameters.GetType());
            Type sot = StageOperationIDAttribute.FindTypeByID(mStageOperationTypes, id);

            if (sot == null)
                throw new IncorrectNodeValueException("Can't find StageOperation type for the ID (" + id + ")");

            // Creating stage operation
            StageOperation so = (StageOperation)sot.GetConstructor(
                    new Type[] {typeof(StageOperationParameters)}
                ).Invoke(new object[] {parameters});
            return so;
        }