Exemple #1
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;
            }
        }
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();
            BindView();
            ReloadResultOutlineViewNotificationObject = NSNotificationCenter.DefaultCenter.AddObserver((NSString)"ReloadResultOutlineView", ReloadResultOutlineView);
            ReloadResultTableViewNotificationObject   = NSNotificationCenter.DefaultCenter.AddObserver((NSString)"ReloadResultTableView", ReloadResultTableView);
            CloseSearchNotificationObject             = NSNotificationCenter.DefaultCenter.AddObserver((NSString)"CloseSearchApplication", OnCloseSearchApplication);

            _propViewController = new PropertiesViewController();
            _propViewController.PropTableView = new VMDirTableView();
            _propViewController.View.SetFrameSize(ResultPropView.Frame.Size);
            ResultPropView.AddSubview(_propViewController.View);
            LoadQueryToolBarItem.Active = true;
            //SearchResultContainerView.RemoveFromSuperview();
            RemoveTableColumns();

            //Populate appropriate columns
            NSTableColumn col = new NSTableColumn("Attribute");

            col.HeaderCell.Title     = "Attribute";
            col.HeaderCell.Alignment = NSTextAlignment.Center;
            col.DataCell             = new NSBrowserCell();
            col.MinWidth             = 250;
            col.ResizingMask         = NSTableColumnResizing.UserResizingMask;
            _propViewController.PropTableView.AddColumn(col);

            NSTableColumn col1 = new NSTableColumn("Value");

            col1.HeaderCell.Title     = "Value";
            col1.ResizingMask         = NSTableColumnResizing.UserResizingMask;
            col1.HeaderCell.Alignment = NSTextAlignment.Center;
            col1.MinWidth             = 250;
            _propViewController.PropTableView.AddColumn(col1);

            NSTableColumn col2 = new NSTableColumn("Syntax");

            col2.HeaderCell.Title     = "Syntax";
            col2.ResizingMask         = NSTableColumnResizing.UserResizingMask;
            col2.HeaderCell.Alignment = NSTextAlignment.Center;
            col2.MinWidth             = 200;
            _propViewController.PropTableView.AddColumn(col2);

            _searchCondDs = new SearchConditionsTableViewDataSource();
            BfConditionsTableView.DataSource = _searchCondDs;
            _attrToReturnDs = new AttributeTableViewDataSource();
            AttrToReturnTableView.DataSource = _attrToReturnDs;
            _resultDs = new ResultOutlineDataSource();
            SearchResultOutlineView.DataSource = _resultDs;
            SetHeaderText("");

            var col4 = SearchResultOutlineView.OutlineTableColumn;

            if (col4 != null)
            {
                col4.DataCell = new NSBrowserCell();
            }
            SearchResultOutlineView.Delegate = new ResultOutlineDelegate(this);

            ResultPageNoTextField.StringValue = _currPage.ToString();
            PageSizeToolBarItem.Active        = true;
        }