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

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

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

            return Equals(other.display, display) && Equals(other.browsable, browsable);
        }
Ejemplo n.º 5
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);
        }