PageRenderTime 17ms CodeModel.GetById 14ms app.highlight 1ms 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
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using CBR.Core.Services;
 6using CBR.Core.Models;
 7using System.Windows.Documents;
 8
 9namespace CBR.ViewModels
10{
11    public class XpsBookViewModel : BookViewModelBase
12    {
13        #region ----------------CONSTRUCTOR----------------
14
15        public XpsBookViewModel(Book bk)
16			: base(bk)
17		{
18            if (Data != null)
19                DocumentContent = Service.LoadBook(Data) as IDocumentPaginatorSource;
20		}
21
22		#endregion
23
24        #region -----------------PROPERTIES-----------------
25
26        public IDocumentPaginatorSource DocumentContent { get; set; }
27
28        new public string PageInfo
29        {
30            get
31            {
32                if (Data != null)
33                    return string.Format("{0} pages in this book", Data.PageCount);
34                else
35                    return string.Empty;
36            }
37        }
38
39        #endregion
40
41    }
42}