Esempio n. 1
0
        public ListPagesViewModel(ISectionFacade section, IPageFacade page, IIoC ioc) : base(ioc)
        {
            if (section == null) throw new ArgumentNullException(nameof(section));
            if (page == null) throw new ArgumentNullException(nameof(page));
            _section = section;
            _page = page;

            Pages = new ItemChangeAwareObservableCollection<PageDto>();

            MessageBus.Subscribe<SectionSelected>(async msg => await OnSectionSelected(msg));
            MessageBus.Subscribe<PageCreated>(async msg => await OnPageCreated(msg));
        }
Esempio n. 2
0
        public ListNotebooksViewModel(INotebookFacade notebook, IIoC ioc) : base(ioc)
        {
            if (notebook == null)
            {
                throw new ArgumentNullException(nameof(notebook));
            }
            _notebook = notebook;

            Notebooks = new ItemChangeAwareObservableCollection <NotebookDto>();

            MessageBus.Subscribe <RootDirectoryChanged>(async msg => await OnNewRootDirectory(msg));
            MessageBus.Subscribe <NotebookCreated>(async msg => await OnNotebookCreated(msg));
            MessageBus.Subscribe <SectionCreated>(async msg => await OnSectionCreated(msg));
        }
Esempio n. 3
0
        public ListSectionsViewModel(INotebookFacade notebook, IIoC ioc) : base(ioc)
        {
            if (notebook == null)
            {
                throw new ArgumentNullException(nameof(notebook));
            }
            _notebook = notebook;

            Sections = new ItemChangeAwareObservableCollection <SectionDto>();

            MessageBus.Subscribe <NotebookSelected>(async msg => await OnNotebookSelected(msg));
            MessageBus.Subscribe <SectionCreated>(async msg => await OnSectionCreated(msg));
            MessageBus.Subscribe <PageCreated>(async msg => await OnPageCreated(msg));
        }
Esempio n. 4
0
        public ListPagesViewModel(ISectionFacade section, IPageFacade page, IIoC ioc) : base(ioc)
        {
            if (section == null)
            {
                throw new ArgumentNullException(nameof(section));
            }
            if (page == null)
            {
                throw new ArgumentNullException(nameof(page));
            }
            _section = section;
            _page    = page;

            Pages = new ItemChangeAwareObservableCollection <PageDto>();

            MessageBus.Subscribe <SectionSelected>(async msg => await OnSectionSelected(msg));
            MessageBus.Subscribe <PageCreated>(async msg => await OnPageCreated(msg));
        }