コード例 #1
0
 public MainWindowViewModel(IBookCore bookCore, IImporter importer, BooksControl bookControl,
                            AuthorsControl authorscontol, ISupportedFormats supportedFormats)
 {
     _authorControl    = authorscontol;
     _supportedFormats = supportedFormats;
     _bookControl      = bookControl;
     _bookCore         = bookCore;
     _importer         = importer;
     View = bookControl;
 }
コード例 #2
0
 public BooksControlViewModel(IBookCore bookcore, BookDetailsWindow bookDetailsWindow)
 {
     Books = new ObservableCollection <Book>();
     _bookDetailsWindow = bookDetailsWindow;
     _bookCore          = bookcore;
     Books = new ObservableCollection <Book>();
     _bookCore.BookChanged += _bookCore_BookChanged;
     SelectedBooks          = new ObservableCollection <Book>();
     SetBookTiles(null);
     GetAllBooks(null);
 }
コード例 #3
0
 public Importer(IBookCore bookCore, ILog log, ISupportedFormats supportedFormats, ISettings settings, Ctx ctx)
 {
     _ctx                              = ctx;
     _settings                         = settings;
     _supportedFormats                 = supportedFormats;
     _bookCore                         = bookCore;
     _log                              = log;
     Worker                            = new BackgroundWorker();
     Worker.DoWork                    += Worker_DoWork;
     Worker.ProgressChanged           += Worker_ProgressChanged;
     Worker.RunWorkerCompleted        += Worker_RunWorkerCompleted;
     Worker.WorkerReportsProgress      = true;
     Worker.WorkerSupportsCancellation = true;
 }
コード例 #4
0
 public BookDetailsWindowViewModel(IBookCore bookcore, SelectAuthorWindow selectAuthorWindow)
 {
     _bookCore           = bookcore;
     _selectAuthorWindow = selectAuthorWindow;
 }
コード例 #5
0
 public SelectAuthorsWindowViewModel(IAuthorCore authorCore, IBookCore bookcore)
 {
     _authorCore = authorCore;
     _bookCore   = bookcore;
     GetAuthors();
 }