Пример #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();
        }
Пример #2
0
        partial void OnRefresh(NSObject sender)
        {
            nint row = SearchResultOutlineView.SelectedRow;

            if (isObjectSelected(row))
            {
                DirectoryNonExpandableNode node = SearchResultOutlineView.ItemAtRow(row) as DirectoryNonExpandableNode;
                node.PerformRefreshNode();
            }
        }
Пример #3
0
        void ReloadResultOutlineView(NSNotification obj)
        {
            var node = obj.Object as DirectoryNonExpandableNode;

            if (node != null)
            {
                _resultList.Remove(node);
                _resultDs.ResultList.Remove(node);
                SearchResultOutlineView.ReloadData();
            }
        }
Пример #4
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++;
     }
 }
Пример #5
0
 public void RefreshPropTableViewBasedOnSelection(nint row)
 {
     if (row >= (nint)0)
     {
         NSObject item = SearchResultOutlineView.ItemAtRow(row);
         if (item is DirectoryNode)
         {
             DirectoryNode node = item as DirectoryNode;
             _propViewController.PropTableView.DataSource = new PropertiesTableViewDataSource(node.Dn, node.ObjectClass.Last(), node.ServerDTO, node.NodeProperties);
             _propViewController.ds = (PropertiesTableViewDataSource)_propViewController.PropTableView.DataSource;
             _propViewController.PropTableView.Delegate = new PropertiesTableDelegate(this, (PropertiesTableViewDataSource)_propViewController.PropTableView.DataSource, _propViewController);
         }
     }
     else
     {
         _propViewController.PropTableView.DataSource = null;
     }
     _propViewController.PropTableView.ReloadData();
 }
Пример #6
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--;
     }
 }
Пример #7
0
        void ReleaseDesignerOutlets()
        {
            if (AttrToReturnComboBox != null)
            {
                AttrToReturnComboBox.Dispose();
                AttrToReturnComboBox = null;
            }

            if (AttrToReturnTableView != null)
            {
                AttrToReturnTableView.Dispose();
                AttrToReturnTableView = null;
            }

            if (BfAttributeComboBox != null)
            {
                BfAttributeComboBox.Dispose();
                BfAttributeComboBox = null;
            }

            if (BfConditionComboBox != null)
            {
                BfConditionComboBox.Dispose();
                BfConditionComboBox = null;
            }

            if (BfConditionsTableView != null)
            {
                BfConditionsTableView.Dispose();
                BfConditionsTableView = null;
            }

            if (BfOperatorComboBox != null)
            {
                BfOperatorComboBox.Dispose();
                BfOperatorComboBox = null;
            }

            if (BfValueTextField != null)
            {
                BfValueTextField.Dispose();
                BfValueTextField = null;
            }

            if (DeleteToolBarItem != null)
            {
                DeleteToolBarItem.Dispose();
                DeleteToolBarItem = null;
            }

            if (ExportToolBarItem != null)
            {
                ExportToolBarItem.Dispose();
                ExportToolBarItem = null;
            }

            if (LoadQueryToolBarItem != null)
            {
                LoadQueryToolBarItem.Dispose();
                LoadQueryToolBarItem = null;
            }

            if (OperationalAttrToolBarItem != null)
            {
                OperationalAttrToolBarItem.Dispose();
                OperationalAttrToolBarItem = null;
            }

            if (OptionalToolBarItem != null)
            {
                OptionalToolBarItem.Dispose();
                OptionalToolBarItem = null;
            }

            if (PageSizeToolBarItem != null)
            {
                PageSizeToolBarItem.Dispose();
                PageSizeToolBarItem = null;
            }

            if (RefreshToolBarItem != null)
            {
                RefreshToolBarItem.Dispose();
                RefreshToolBarItem = null;
            }

            if (ResultPageNoTextField != null)
            {
                ResultPageNoTextField.Dispose();
                ResultPageNoTextField = null;
            }

            if (ResultPropView != null)
            {
                ResultPropView.Dispose();
                ResultPropView = null;
            }

            if (SearchBaseTextField != null)
            {
                SearchBaseTextField.Dispose();
                SearchBaseTextField = null;
            }

            if (SearchBoxVisibilityToolBarItem != null)
            {
                SearchBoxVisibilityToolBarItem.Dispose();
                SearchBoxVisibilityToolBarItem = null;
            }

            if (SearchHorizontalSplitView != null)
            {
                SearchHorizontalSplitView.Dispose();
                SearchHorizontalSplitView = null;
            }

            if (SearchQueryContainerView != null)
            {
                SearchQueryContainerView.Dispose();
                SearchQueryContainerView = null;
            }

            if (SearchQueryTabView != null)
            {
                SearchQueryTabView.Dispose();
                SearchQueryTabView = null;
            }

            if (SearchResultContainerView != null)
            {
                SearchResultContainerView.Dispose();
                SearchResultContainerView = null;
            }

            if (SearchResultOutlineView != null)
            {
                SearchResultOutlineView.Dispose();
                SearchResultOutlineView = null;
            }

            if (SearchScopeComboBox != null)
            {
                SearchScopeComboBox.Dispose();
                SearchScopeComboBox = null;
            }

            if (StoreQueryToolBarItem != null)
            {
                StoreQueryToolBarItem.Dispose();
                StoreQueryToolBarItem = null;
            }

            if (TfSearchFilterTextView != null)
            {
                TfSearchFilterTextView.Dispose();
                TfSearchFilterTextView = null;
            }
        }