예제 #1
0
        protected override void Initialize()
        {
            MapController = new MapController <AppRuleMap, AbstractMapViewModel <AppRuleMap> >(Model.AppRuleMaps, Workspace);

            _actions = new ObservableCollection <ActionContainerViewModel>(Model.Actions.Select(x => new ActionContainerViewModel(x, this, _automationService)));

            if (!string.IsNullOrEmpty(Model.EventConstraints))
            {
                Constraints.AddRange(_automationService.CreateRuleConstraints(Model.EventConstraints));

                var settingData = Model.EventConstraints.Split('#').Where(x => x.StartsWith("SN$")).FirstOrDefault();

                if (!string.IsNullOrEmpty(settingData))
                {
                    var settingParts = settingData.Split(';');
                    if (settingParts.Length == 3)
                    {
                        SettingConstraintName      = settingParts[0].Replace("SN$", "");
                        SettingConstraintOperation = settingParts[1];
                        SettingConstraintValue     = settingParts[2];
                    }
                }
            }

            base.Initialize();
        }
예제 #2
0
 public ISqlBuilder CreateTable(List <DbType> types, List <string> constraints)
 {
     Type        = StatementType.Create;
     ColumnTypes = types;
     Constraints.AddRange(constraints);
     return(this);
 }
예제 #3
0
 private void CreateConstraints()
 {
     Constraints.AddRange(new PlanConstraint[]
     {
         new PlanConstraint(ConstraintBuilder.Build("PTV", "Max[%] <= 110")),
         new PlanConstraint(ConstraintBuilder.Build("Rectum", "V75Gy[%] <= 15")),
         new PlanConstraint(ConstraintBuilder.Build("Rectum", "V65Gy[%] <= 35")),
         new PlanConstraint(ConstraintBuilder.Build("Bladder", "V80Gy[%] <= 15")),
         new PlanConstraint(new CTDateConstraint())
     });
 }
예제 #4
0
        protected override void Initialize()
        {
            MapController = new MapController <AppRuleMap, AbstractMapViewModel <AppRuleMap> >(Model.AppRuleMaps, Workspace);

            _actions = new ObservableCollection <ActionContainerViewModel>(Model.Actions.OrderBy(x => x.SortOrder).Select(x => new ActionContainerViewModel(x, this, _automationService, _automationDao)));

            if (!string.IsNullOrEmpty(Model.EventConstraints))
            {
                Constraints.AddRange(_automationService.CreateRuleConstraints(Model.EventConstraints));
            }
            base.Initialize();
        }
예제 #5
0
        public DataTableMarking()
        {
            _nameFieldColumn = new DataColumn("MNameField");
            _beginColumn     = new DataColumn("MBeginField", typeof(int));
            _endColumn       = new DataColumn("MEndField", typeof(int));

            Columns.AddRange(new[] { _nameFieldColumn, _beginColumn, _endColumn });
            Constraints.AddRange(new Constraint[] {
                new UniqueConstraint("UniqueNameConstraint", new[] { _nameFieldColumn }, false)
            });
            TableName = "Разметка";
        }
 private void CreateConstraints()
 {
     Constraints.AddRange(new PlanConstraint[]
     {
         new PlanConstraint(ConstraintBuilder.Build("PTV", "Max[%] <= 110")), //string constraints can not be set in ESAPI - that is why we use ESAPIX here.. it has more libraries that we are going to use
         new PlanConstraint(ConstraintBuilder.Build("Breast", "Max[%] <= 107")),
         new PlanConstraint(ConstraintBuilder.Build("Rectum", "V75Gy[%] <= 15")),
         new PlanConstraint(ConstraintBuilder.Build("Rectum", "V65Gy[%] <= 35")),
         new PlanConstraint(ConstraintBuilder.Build("Bladder", "V80Gy[%] <= 15")),
         new PlanConstraint(new CTDateConstraint())
     });
 }
예제 #7
0
 public TypedRoute WithConstraints(params IActionConstraintMetadata[] constraints)
 {
     Constraints.AddRange(constraints);
     return(this);
 }
 public void SetConstraints(IEnumerable <LinearConstraint> constraints)
 {
     Constraints.Clear();
     Constraints.AddRange(constraints);
 }