示例#1
0
        public void Initialize(BookLibrary library)
        {
            ArgCheck.NotNull(library, "library");
            _library = library;

            _renderManager = DW.Wrap(new ScreenRenderManager(_library, pbContent.Size));
            _renderManager.o.PaperColorChanged += new EventHandler(o_PaperColorChanged);
        }
示例#2
0
        public void Initialize(BookLibrary library)
        {
            ArgCheck.NotNull(library, "library");
            _library = library;

            _library.BooksChanged += _library_BooksChanged;
            _library.BookPositionChanged += _library_BookPositionChanged;
            UpdateListViewItems();
        }
示例#3
0
        public MainForm()
        {
            InitializeComponent();

            pLibrary.Dock = DockStyle.Fill;
            pReading.Dock = DockStyle.Fill;
            pReading.Visible = false;

            _library = BookLibrary.Load(BookLibrary.DefaultFilename);

            if (!DesignMode)
            {
                pLibrary.Initialize(_library);
                pReading.Initialize(_library);
            }

        }
 public LibraryViewModel(BookLibrary library)
 {
     ArgCheck.NotNull(library);
     Library = library;
 }