/CBR/CBR/ViewModels/Books/XpsBookViewModel.cs
C# | 42 lines | 34 code | 8 blank | 0 comment | 4 complexity | 2e556203eb9418be5857d8d562a66f27 MD5 | raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using CBR.Core.Services;
- using CBR.Core.Models;
- using System.Windows.Documents;
-
- namespace CBR.ViewModels
- {
- public class XpsBookViewModel : BookViewModelBase
- {
- #region ----------------CONSTRUCTOR----------------
-
- public XpsBookViewModel(Book bk)
- : base(bk)
- {
- if (Data != null)
- DocumentContent = Service.LoadBook(Data) as IDocumentPaginatorSource;
- }
-
- #endregion
-
- #region -----------------PROPERTIES-----------------
-
- public IDocumentPaginatorSource DocumentContent { get; set; }
-
- new public string PageInfo
- {
- get
- {
- if (Data != null)
- return string.Format("{0} pages in this book", Data.PageCount);
- else
- return string.Empty;
- }
- }
-
- #endregion
-
- }
- }