Example #1
0
 public MainViewModel(IManuscriptService manuscriptService, IEventAggregator eventAggregator, IWindowsDialogService windowsDialogService, IRegionManager regionManager)
 {
     CreateNewProjectCommand    = new CreateNewProjectCommand(manuscriptService, eventAggregator, windowsDialogService);
     OpenExistingProjectCommand = new OpenExistingProjectCommand(manuscriptService, eventAggregator, windowsDialogService);
     SaveProjectCommand         = new SaveProjectCommand(manuscriptService, windowsDialogService);
     ApplicationShutdownCommand = new ApplicationShutdownCommand();
     _manuscriptService         = manuscriptService;
     _eventAggregator           = eventAggregator;
     _windowsDialogService      = windowsDialogService;
     _regionManager             = regionManager;
 }
Example #2
0
        public ManuscriptProjectViewModel(IManuscriptProject manuscriptProject, IRegionManager regionManager, IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
        {
            _regionManager        = regionManager;
            _manuscriptService    = manuscriptService;
            _windowsDialogService = windowsDialogService;

            Name       = manuscriptProject.Name;
            Categories = ToObservableCollection(manuscriptProject.Categories);
            Id         = manuscriptProject.Id;

            foreach (var ctg in manuscriptProject.Categories)
            {
                ctg.CollectionChanged += OnProjectCategoryItemsChanged;

                foreach (var item in ctg.Items)
                {
                    item.CollectionChanged += OnProjectItemReferencesChanged;
                }
            }
        }
Example #3
0
 public OpenExistingProjectCommand(IManuscriptService manuscriptService, IEventAggregator eventAggregator, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _eventAggregator      = eventAggregator;
     _windowsDialogService = windowsDialogService;
 }
Example #4
0
 public ProjectStructureViewModel(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     GetCategoryItemsCommand          = new DelegateCommand <ProjectCategoryViewModel>(GetCategoryItems);
     AddNewManuscriptItemCommand      = new AddNewManuscriptItemCommand(manuscriptService);
     AddExistingManuscriptItemCommand = new AddExistingManuscriptItemCommand(manuscriptService, windowsDialogService);
 }
Example #5
0
 public SaveProjectCommand(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _windowsDialogService = windowsDialogService;
 }
Example #6
0
 public AddItemReferenceCommand(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _windowsDialogService = windowsDialogService;
 }
 public CreateNewProjectCommand(IManuscriptService manuscriptService, IEventAggregator eventAggregator, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _eventAggregator      = eventAggregator;
     _windowsDialogService = windowsDialogService;
 }
 public AddExistingManuscriptItemCommand(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _windowsDialogService = windowsDialogService;
 }
        public ProjectItemViewModel(string name, int ctgId, int id, string source, ObservableCollection <ProjectItemReferenceViewModel> references, IRegionManager regionManager, IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
        {
            _name       = name;
            _references = references;

            CtgId  = ctgId;
            Id     = id;
            Source = source;

            AddItemReferenceCommand     = new AddItemReferenceCommand(manuscriptService, windowsDialogService);
            RemoveManuscriptItemCommand = new RemoveManuscriptItemCommand(manuscriptService);
            LoadContentCommand          = new LoadContentCommand(regionManager);
        }