예제 #1
0
        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();
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
 public ProjectSettingVM(ProjectVM parent, SettingItem <T> setting)
 {
     this.parent  = parent;
     this.setting = setting;
 }