Ejemplo n.º 1
0
        /// <summary>
        /// Create view model
        /// </summary>
        public DirectoryFieldViewModel()
        {
            directoryTypeClassificationService = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryTypeClassificationService>();
            directoryTypeFieldService          = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryClassificationFieldService>();
            directoryClassificationService     = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryClassificationService>();
            directoryFieldService = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryFieldService>();
            fileStructureService  = CommonServiceLocator.ServiceLocator.Current.GetInstance <IFileStructureService>();
            fieldTypeService      = CommonServiceLocator.ServiceLocator.Current.GetInstance <IFieldTypeService>();
            expanderMode          = Visibility.Collapsed;

            saveMetadataCommand = new RelayCommand((e) =>
            {
                Save();
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize viewmodel
        /// </summary>
        public DirectoryTypeEditorViewModel()
        {
            directoryClassificationService     = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryClassificationService>();
            directoryTypeClassificationService = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryTypeClassificationService>();

            var defaultFunction = new DirectoryFunction {
                DirectoryFunctionType = DirectoryFunctionType.Default, DisplayName = "Standard"
            };

            functions = new ObservableCollection <DirectoryFunction>
            {
                defaultFunction,
                new DirectoryFunction {
                    DirectoryFunctionType = DirectoryFunctionType.Workflow, DisplayName = "Workflow"
                }
            };

            selectedFunction = defaultFunction;
        }
        /// <summary>
        /// Initialize editor
        /// </summary>
        /// <param name="service">Service instance</param>
        public DirectoryTypeEditor(IDirectoryTypeService service) : base(service)
        {
            directoryTypeClassificationService = CommonServiceLocator.ServiceLocator.Current.GetInstance <IDirectoryTypeClassificationService>();

            InitializeComponent();
        }