Exemple #1
0
 public AddNotebookViewModel(INotebookFacade notebook, IRootDirectoryFacade rootDirectory, IIoC ioc) : base(ioc)
 {
     if (notebook == null)
     {
         throw new ArgumentNullException(nameof(notebook));
     }
     _notebook      = notebook;
     _rootDirectory = rootDirectory;
 }
        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));
        }
        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));
        }
 public AddNotebookViewModel(INotebookFacade notebook, IRootDirectoryFacade rootDirectory, IIoC ioc) : base(ioc)
 {
     if (notebook == null) throw new ArgumentNullException(nameof(notebook));
     _notebook = notebook;
     _rootDirectory = rootDirectory;
 }