Esempio n. 1
0
 /// <summary>
 /// 更新按钮状态
 /// </summary>
 private void upButtonStatus()
 {
     FirstPageCommand.RaiseCanExecuteChanged();
     PreviousPageCommand.RaiseCanExecuteChanged();
     NextPageCommand.RaiseCanExecuteChanged();
     LastPageCommand.RaiseCanExecuteChanged();
 }
Esempio n. 2
0
 public PaginatorControlViewModel()
 {
     NextPCommand    = new NextPageCommand(this);
     PreviusPCommand = new PreviusPageCommand(this);
     LastPCommand    = new LastPageCommand(this);
     FirstPCommand   = new FirstPageCommand(this);
 }
Esempio n. 3
0
        public PaginationViewModel()
        {
            CurrentPageIndex = 0;

            NextCommand = new NextPageCommand(this);
            PreviousCommand = new PreviousPageCommand(this);
            FirstCommand = new FirstPageCommand(this);
            LastCommand = new LastPageCommand(this);
        }
Esempio n. 4
0
        public PaginationViewModel()
        {
            CurrentPageIndex = 0;

            NextCommand     = new NextPageCommand(this);
            PreviousCommand = new PreviousPageCommand(this);
            FirstCommand    = new FirstPageCommand(this);
            LastCommand     = new LastPageCommand(this);
        }
        public bool Equals(LastPageCommand other)
        {
            if (ReferenceEquals(null, other))
                return false;

            if (ReferenceEquals(this, other))
                return true;

            return Equals(other.display, display) && Equals(other.browsable, browsable);
        }
Esempio n. 6
0
        private void InitiateCommands()
        {
            _firstPageCommand            = new FirstPageCommand();
            _firstPageCommand.FirstPage += _FirstPage;

            _previousPageCommand = new PreviousPageCommand();
            _previousPageCommand.PreviousPage += _PreviousPage;

            _nextPageCommand           = new NextPageCommand();
            _nextPageCommand.NextPage += _NextPage;

            _lastPageCommand           = new LastPageCommand();
            _lastPageCommand.LastPage += _LastPage;
        }
        public MainViewModel()
        {
            populateList();

            ViewList         = new CollectionViewSource();
            ViewList.Source  = PeopleList;
            ViewList.Filter += new FilterEventHandler(view_Filter);

            CurrentPageIndex = 0;
            itemcount        = peopleList.Count;
            CalculateTotalPages();

            NextCommand     = new NextPageCommand(this);
            PreviousCommand = new PreviousPageCommand(this);
            FirstCommand    = new FirstPageCommand(this);
            LastCommand     = new LastPageCommand(this);
        }