예제 #1
0
 public override void AwakeFromNib()
 {
     base.AwakeFromNib();
     propViewController = new PropertiesViewController();
     propViewController.PropTableView = new VMDirTableView();
     VmdirPropView.AddSubview(propViewController.View);
 }
예제 #2
0
        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;
        }