protected virtual UserConfigServicePlantBox CreatePlantBox(InitPlantUCPipelineArg args) { var plantBox = new UserConfigServicePlantBox(); plantBox.RelatedPlantEx = args.RelatedPlant; plantBox.SettingsBox = args.SettingBox; plantBox.SettingsSteward = args.PersonalSettingsSteward; return(plantBox); }
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))); }
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); }
public virtual void Process(InitPlantUCPipelineArg args) { UserConfigServicePlantBox userConfigServicePlantBox = this.CreatePlantBox(args); args.RelatedPlant.PutLuggage(args.LuggageName, userConfigServicePlantBox); }
public GetUCStepPipelineArgs(UserConfigServicePlantBox ucServicePlantBox) { this.UCServicePlantBox = ucServicePlantBox; this.StateConstructInfo = new WindowWithBackStateConstructInfo(); this.ConfigurationConstructInfo = new ConfigurationControlConstructInfo(); }