Ejemplo n.º 1
0
        public MainPageViewModel()
        {
            this.guestbookService = new GuestbookService();
            this.Messages         = new AsyncPagedCollectionView <Message> {
                FetchData = this.FetchMessages
            };

            this.PageCountVariants = new List <int> {
                10, 15, 20, 25, 50, 100
            };
            this.OrderByVariants = new List <KeyValuePair <string, string> >
            {
                new KeyValuePair <string, string>("UserName", "User Name"),
                new KeyValuePair <string, string>("Email", "E-mail Address"),
                new KeyValuePair <string, string>("CreatedAt", "Submit Date"),
            };

            this.OrderBy = OrderByVariants[2].Key;

            this.AddCommentCommand = new RelayCommand(AddComment);
            this.CancelCommand     = new RelayCommand(Cancel);
            this.PostCommand       = new RelayCommand(Post);
            this.SetDefaultValues();
        }
Ejemplo n.º 2
0
 public GuestbookController(GuestbookService guestbookService)
 {
     _guestbookService = guestbookService;
 }
Ejemplo n.º 3
0
 public IndexController(GuestbookService service)
 {
     this.Service = service;
 }