public ProjectRuleVM(ProjectVM parent, Rule rule) { this.Project = parent; this.rule = rule; ObservableCollection <ProjectSettingVM <Protection> > protections = Utils.Wrap(rule, setting => new ProjectSettingVM <Protection>(parent, setting)); protections.CollectionChanged += (sender, e) => parent.IsModified = true; this.Protections = protections; this.ParseExpression(); }
public ProjectModuleVM(ProjectVM parent, ProjectModule module) { this.parent = parent; this.module = module; ObservableCollection <ProjectRuleVM> rules = Utils.Wrap(module.Rules, rule => new ProjectRuleVM(parent, rule)); rules.CollectionChanged += (sender, e) => parent.IsModified = true; Rules = rules; if (module.Path != null) { SimpleName = System.IO.Path.GetFileName(module.Path); LoadAssemblyName(); } }
public ProjectSettingVM(ProjectVM parent, SettingItem <T> setting) { this.parent = parent; this.setting = setting; }