PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/CBR/CBR/ViewModels/Books/XpsBookViewModel.cs

#
C# | 42 lines | 34 code | 8 blank | 0 comment | 4 complexity | 2e556203eb9418be5857d8d562a66f27 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using CBR.Core.Services;
  6. using CBR.Core.Models;
  7. using System.Windows.Documents;
  8. namespace CBR.ViewModels
  9. {
  10. public class XpsBookViewModel : BookViewModelBase
  11. {
  12. #region ----------------CONSTRUCTOR----------------
  13. public XpsBookViewModel(Book bk)
  14. : base(bk)
  15. {
  16. if (Data != null)
  17. DocumentContent = Service.LoadBook(Data) as IDocumentPaginatorSource;
  18. }
  19. #endregion
  20. #region -----------------PROPERTIES-----------------
  21. public IDocumentPaginatorSource DocumentContent { get; set; }
  22. new public string PageInfo
  23. {
  24. get
  25. {
  26. if (Data != null)
  27. return string.Format("{0} pages in this book", Data.PageCount);
  28. else
  29. return string.Empty;
  30. }
  31. }
  32. #endregion
  33. }
  34. }