Base class for all resources.
Inheritance: IResource, IAuditedResource
Esempio n. 1
0
 public FieldModel(FormField field, Resource resource, VariableSettings variableSettings, FormResources formResources)
 {
     Settings = variableSettings;
     FormResources = formResources;
     Resource = resource;
     VariableSetId = field.VariableSetId;
     VariableName = field.VariableName;
     LabelContent = field.DisplayName;
     Variables = new ObservableCollection<FieldVariable>();
 }
Esempio n. 2
0
        private ScopeResources(Resource resource, ObservableDictionary<string, object> environmentResource, ObservableDictionary<string, object> machineResources, ObservableDictionary<string, object> roleItems, ObservableDictionary<string, object> environmentSelectedItems, ObservableDictionary<string, object> machineSelectedItems, ObservableDictionary<string, object> roleSelectedItems, ObservableDictionary<string, object> actionItems, ObservableDictionary<string, object> actionSelectedItems)
        {
            EnvironmentItems = environmentResource;
            MachineItems = machineResources;
            RoleItems = roleItems;
            ActionItems = actionItems;

            EnvironmentSelectedItems = environmentSelectedItems;
            MachineSelectedItems = machineSelectedItems;
            RoleSelectedItems = roleSelectedItems;
            ActionSelectedItems = actionSelectedItems;

            SetResourceText(resource);

            SetupEvents();
        }
Esempio n. 3
0
 private void SetResourceText(Resource resource)
 {
     if (resource.GetType() == typeof(ProjectResource))
     {
         _defaultText = "Project";
         _resourceBaseScore = 1;
     }
     else if (resource.GetType() == typeof(LibraryVariableSetResource))
     {
         _defaultText = "Library";
         _resourceBaseScore = 0;
     }
 }
Esempio n. 4
0
        public ScopeResources CopyAndReset(Resource resource)
        {
            ScopeResources scope = new ScopeResources(resource, new ObservableDictionary<string, object>(EnvironmentItems),
                new ObservableDictionary<string, object>(MachineItems),
                new ObservableDictionary<string, object>(RoleItems),
                new ObservableDictionary<string, object>(EnvironmentItems),
                new ObservableDictionary<string, object>(),
                new ObservableDictionary<string, object>(),
                new ObservableDictionary<string, object>(ActionItems),
                new ObservableDictionary<string, object>());

            return scope;
        }