Esempio n. 1
0
        partial void OnSearchAction(NSObject sender)
        {
            InitPageSearch();
            if (!ValidateSearch())
            {
                return;
            }
            SetToolBarState(true);
            _resultDs.ResultList.Clear();
            SearchResultOutlineView.ReloadData();
            RefreshPropTableViewBasedOnSelection(-1);
            GetPage();

            _resultDs.ResultList.AddRange(_resultList.ToArray());
            SearchResultOutlineView.ReloadData();
            if (_resultList.Count > 0)
            {
                _currPage = 1;
            }
            else
            {
                SetHeaderText(VMDirConstants.STAT_SR_NO_MATCH);
            }
            ResultPageNoTextField.StringValue = _currPage.ToString();
        }
Esempio n. 2
0
        void ReloadResultOutlineView(NSNotification obj)
        {
            var node = obj.Object as DirectoryNonExpandableNode;

            if (node != null)
            {
                _resultList.Remove(node);
                _resultDs.ResultList.Remove(node);
                SearchResultOutlineView.ReloadData();
            }
        }
Esempio n. 3
0
 partial void OnPrevResultButton(NSObject sender)
 {
     _currPage--;
     if (_currPage >= 1)
     {
         _resultDs.ResultList.Clear();
         for (int i = (_currPage - 1) * _pageSize; i < _currPage * _pageSize && i < _resultList.Count; i++)
         {
             _resultDs.ResultList.Add(_resultList[i]);
         }
         ResultPageNoTextField.StringValue = _currPage.ToString();
         SearchResultOutlineView.ReloadData();
     }
     else
     {
         _currPage++;
     }
 }
Esempio n. 4
0
 partial void OnNextResultButton(NSObject sender)
 {
     _currPage++;
     if (_currPage > _totalPage && _morePages)
     {
         GetPage();
     }
     if (_currPage <= _totalPage && _currPage != 0)
     {
         _resultDs.ResultList.Clear();
         for (int i = (_currPage - 1) * _pageSize; i < _currPage * _pageSize && i < _resultList.Count; i++)
         {
             _resultDs.ResultList.Add(_resultList[i]);
         }
         ResultPageNoTextField.StringValue = _currPage.ToString();
         SearchResultOutlineView.ReloadData();
     }
     else
     {
         _currPage--;
     }
 }