Ejemplo n.º 1
0
        protected virtual UserConfigServicePlantBox CreatePlantBox(InitPlantUCPipelineArg args)
        {
            var plantBox = new UserConfigServicePlantBox();

            plantBox.RelatedPlantEx  = args.RelatedPlant;
            plantBox.SettingsBox     = args.SettingBox;
            plantBox.SettingsSteward = args.PersonalSettingsSteward;
            return(plantBox);
        }
Ejemplo n.º 2
0
        protected override ServiceForPlantVMBase GetServiceVM(UserConfigService serviceInstance, IPlantEx plantEx)
        {
            UserConfigServicePlantBox userConfigServicePlantBox = serviceInstance.GetPlantLuggage(plantEx);

            if (userConfigServicePlantBox == null)
            {
                return(null);
            }
            if (userConfigServicePlantBox.SettingsSteward.DefinedSettings.Count == 0)
            {
                return(null);
            }
            return(new ServiceForPlantActionPerformVM(this.ServiceName, this.ServiceDescription, this.GetCommand(userConfigServicePlantBox)));
        }
Ejemplo n.º 3
0
        protected virtual IEnumerable <ConfigurationEntryBaseVM> GetSettingVMs(UserConfigServicePlantBox ucServicePlantBox)
        {
            Dictionary <string, IUserSettingBase> userSettings = ucServicePlantBox.SettingsSteward.DefinedSettings;
            var result = new List <ConfigurationEntryBaseVM>();

            foreach (KeyValuePair <string, IUserSettingBase> userSettingPair in userSettings)
            {
                ConfigurationEntryBaseVM resolvedBaseVm = this.GetConfigurationEntryVMForISetting(userSettingPair.Value);
                if (resolvedBaseVm != null)
                {
                    result.Add(resolvedBaseVm);
                }
                else
                {
                    Log.Warn("Was unable to resolve UserSettingVM for {0} type".FormatWith(userSettingPair.Value.GetType().Name), this);
                }
            }
            return(result);
        }
Ejemplo n.º 4
0
        public virtual void Process(InitPlantUCPipelineArg args)
        {
            UserConfigServicePlantBox userConfigServicePlantBox = this.CreatePlantBox(args);

            args.RelatedPlant.PutLuggage(args.LuggageName, userConfigServicePlantBox);
        }
Ejemplo n.º 5
0
 public GetUCStepPipelineArgs(UserConfigServicePlantBox ucServicePlantBox)
 {
     this.UCServicePlantBox          = ucServicePlantBox;
     this.StateConstructInfo         = new WindowWithBackStateConstructInfo();
     this.ConfigurationConstructInfo = new ConfigurationControlConstructInfo();
 }