Example #1
0
        private void BindView()
        {
            this.SearchBaseTextField.StringValue = _dn;
            foreach (var item in VMDirConstants.ScopeList)
            {
                this.SearchScopeComboBox.Add(new NSString(item));
            }

            foreach (var item in VMDirConstants.ConditionList)
            {
                this.BfConditionComboBox.Add(new NSString(item));
            }

            var attrTypes = _serverDTO.Connection.SchemaManager.GetAttributeTypeManager();

            _attrList = attrTypes.Data.Select(x => x.Key).ToList();
            _attrList.Sort((x, y) => string.Compare(x, y, StringComparison.InvariantCultureIgnoreCase));
            foreach (var item in _attrList)
            {
                this.BfAttributeComboBox.Add(new NSString(item));
                this.AttrToReturnComboBox.Add(new NSString(item));
            }

            foreach (var item in VMDirConstants.OperatorList)
            {
                this.BfOperatorComboBox.Add(new NSString(item));
            }

            BfConditionComboBox.SelectItem(0);
            SearchScopeComboBox.SelectItem(2);
            BfAttributeComboBox.SelectItem(0);
            BfOperatorComboBox.SelectItem(0);
            AttrToReturnComboBox.SelectItem(0);
        }
Example #2
0
        private void BindData()
        {
            if (_qdto.GetType() == typeof(BuildQueryDTO))
            {
                var dto = _qdto as BuildQueryDTO;
                SearchQueryTabView.SelectAt(0);
                SearchBaseTextField.StringValue = dto.SearchBase;
                SearchScopeComboBox.SelectItem((int)dto.SearchScope);
                BfOperatorComboBox.SelectItem((int)dto.Operator);
                BfAttributeComboBox.SelectItem(0);
                BfConditionComboBox.SelectItem(0);

                _searchCondDs.condList.Clear();
                foreach (var item in dto.CondList)
                {
                    _searchCondDs.condList.Add(new FilterDTO(item.Attribute, item.Condition, item.Value));
                }
                BfConditionsTableView.ReloadData();
                _attrToReturnDs.attrList.Clear();
                foreach (var item in dto.AttrToReturn)
                {
                    _attrToReturnDs.attrList.Add(item);
                }
                AttrToReturnTableView.ReloadData();
            }
            else if (_qdto.GetType() == typeof(TextQueryDTO))
            {
                var dto = _qdto as TextQueryDTO;
                SearchQueryTabView.SelectAt(1);
                SearchBaseTextField.StringValue = dto.SearchBase;
                SearchScopeComboBox.SelectItem((int)dto.SearchScope);
                TfSearchFilterTextView.Value = dto.GetFilterString();
                _attrToReturnDs.attrList.Clear();
                foreach (var item in dto.AttrToReturn)
                {
                    _attrToReturnDs.attrList.Add(item);
                }
                AttrToReturnTableView.ReloadData();
            }
        }
Example #3
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;
            }
        }