private void CloseConnection () { Servernode.Logout (); outlineViewDataSource.RootNode.Children.Clear (); outlineViewDataSource = null; splitViewController.MainOutlineView.DataSource = null; splitViewController.MainTableView.DataSource = null; this.TxtLogon.StringValue = ""; splitViewController.MainOutlineView.OutlineTableColumn.HeaderCell.Title = ""; RemoveTableColumns (); NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadOutlineView", this); NSNotificationCenter.DefaultCenter.PostNotificationName ("ReloadTableView", this); ResetToolBarItems (); SetDefaultView (); // while (CrumbTableView.ColumnCount > 0) { // CrumbTableView.RemoveColumn (CrumbTableView.TableColumns () [0]); // } }
public void InitialiseViews () { ActionHelper.Execute (delegate() { CurrentSelectedNode = Servernode; outlineViewDataSource = new OutlineViewDataSource (Servernode); splitViewController.MainOutlineView.DataSource = outlineViewDataSource; splitViewController.MainOutlineView.Activated += OnOutlineViewActivated; splitViewController.MainOutlineView.SelectionDidChange += OnOutlineViewActivated; splitViewController.MainOutlineView.OutlineTableColumn.DataCell = new NSBrowserCell (); var auth = SnapInContext.Instance.AuthTokenManager.GetAuthToken (Servernode.DisplayName); this.TxtLogon.StringValue = "Logged in as " + auth.Login.User + "@" + auth.Login.DomainName; //splitViewController.MainOutlineView.OutlineTableColumn.HeaderCell.Title = "Connected to " + Servernode.DisplayName; InitialiseToolBar (); splitViewController.MainOutlineView.Delegate = new OutlineDelegate (this); splitViewController.MainTableView.Delegate = new TableDelegate (this); CrumbTableView.Hidden = true; //CrumbTableView.Delegate = new CrumbViewDelegate(this); }); }