void HandleDBrowserWillDisplayCellAtRowColumn(NSBrowser sender, Id cell, int row, int column) { NSBrowserCell bcell = cell.CastAs <NSBrowserCell>(); bcell.StringValue = _warnings[row].Message; bcell.IsLeaf = true; }
public override void WillDisplayCell(NSBrowser sender, NSObject cell, nint row, nint column) { NSBrowserCell c = cell as NSBrowserCell; c.Title = $"aaa{row} - {column}"; //Leaf // true ... terminated // false ... right below c.Leaf = false; }
public CocoaWarningViewHelper(NSBrowser warningsBrowser, NSDrawer drawer) { m_drawer = drawer; m_warningsBrowser = warningsBrowser; m_warningsBrowser.SetDelegate(d => { d.BrowserNumberOfRowsInColumn += HandleDBrowserNumberOfRowsInColumn; d.BrowserWillDisplayCellAtRowColumn += HandleDBrowserWillDisplayCellAtRowColumn; }); m_warningsBrowser.AddColumn(); m_warningsBrowser.SetTitleOfColumn("Warnings", 0); m_warningsBrowser.ActionEvent += HandleM_warningsBrowserActionEvent; }
public CocoaWarningViewHelper(NSBrowser warningsBrowser, NSDrawer drawer) { m_drawer = drawer; m_warningsBrowser = warningsBrowser; m_warningsBrowser.SetDelegate(d => { d.BrowserNumberOfRowsInColumn += HandleDBrowserNumberOfRowsInColumn; d.BrowserWillDisplayCellAtRowColumn += HandleDBrowserWillDisplayCellAtRowColumn; }); m_warningsBrowser.AddColumn(); m_warningsBrowser.SetTitleOfColumn("Warnings", 0); m_warningsBrowser.ActionEvent += HandleM_warningsBrowserActionEvent; }
public override nint RowsInColumn(NSBrowser sender, nint column) { if (column == 0) { return(_items.Count); } else { var row = (int)_browser.SelectedRow(column - 1); var cell = (FolderViewCell)ItemAtRow(row, (int)column - 1); cell.Dir.LoadChildren(); return(cell.Dir.SubItems.Count); } }
public override void WillDisplayCell(NSBrowser sender, NSObject cell, nint row, nint column) { FolderViewCell customCell = (FolderViewCell)cell; if (column == 0) { customCell.Dir = _items[(int)row].Dir; customCell.Title = _items[(int)row].Dir.ShortPath; customCell.Leaf = !_items[(int)row].Dir.SubItems.Any(); } else { var selectedRow = (int)_browser.SelectedRow(column - 1); var selectedCell = (FolderViewCell)ItemAtRow(selectedRow, (int)column - 1); Expand(selectedCell.Dir, (int)row, customCell); } }
void HandleDBrowserWillDisplayCellAtRowColumn(NSBrowser sender, Id cell, int row, int column) { NSBrowserCell bcell = cell.CastAs<NSBrowserCell>(); bcell.StringValue = _warnings[row].Message; bcell.IsLeaf = true; }
int HandleDBrowserNumberOfRowsInColumn(NSBrowser sender, int column) { return _warnings.Count; }
int HandleDBrowserNumberOfRowsInColumn(NSBrowser sender, int column) { return(_warnings.Count); }
public override nint RowsInColumn(NSBrowser sender, nint column) { return(10); }
public FolderBrowserDelegate(NSBrowser browser, List <NSFolderViewModel> items) { _browser = browser; _items = items; browser.SetCellClass(new Class(typeof(FolderViewCell))); }