コード例 #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;
 }
コード例 #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;
                }
            }
        }
コード例 #3
0
 public OpenExistingProjectCommand(IManuscriptService manuscriptService, IEventAggregator eventAggregator, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _eventAggregator      = eventAggregator;
     _windowsDialogService = windowsDialogService;
 }
コード例 #4
0
 public ProjectStructureViewModel(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     GetCategoryItemsCommand          = new DelegateCommand <ProjectCategoryViewModel>(GetCategoryItems);
     AddNewManuscriptItemCommand      = new AddNewManuscriptItemCommand(manuscriptService);
     AddExistingManuscriptItemCommand = new AddExistingManuscriptItemCommand(manuscriptService, windowsDialogService);
 }
コード例 #5
0
 public SaveProjectCommand(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _windowsDialogService = windowsDialogService;
 }
コード例 #6
0
 public AddItemReferenceCommand(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _windowsDialogService = windowsDialogService;
 }
コード例 #7
0
 public CreateNewProjectCommand(IManuscriptService manuscriptService, IEventAggregator eventAggregator, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _eventAggregator      = eventAggregator;
     _windowsDialogService = windowsDialogService;
 }
 public AddExistingManuscriptItemCommand(IManuscriptService manuscriptService, IWindowsDialogService windowsDialogService)
 {
     _manuscriptService    = manuscriptService;
     _windowsDialogService = windowsDialogService;
 }
コード例 #9
0
        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);
        }