/// <summary> /// Alter the display of the cell text. /// </summary> /// <param name="tableView">Table view.</param> /// <param name="cell">Cell.</param> /// <param name="tableColumn">Table column.</param> /// <param name="row">Row.</param> public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { UIErrorHelper.CheckedExec(delegate() { if (cell is NSBrowserCell) { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == Constants.TableColumnIconId) { browserCell.Image = NSImage.ImageNamed(Constants.ServiceImage); } } } else if (cell is NSTextFieldCell) { NSTextFieldCell textCell = cell as NSTextFieldCell; // Apply the text color code to the status column text if (textCell != null && tableColumn.Identifier == Constants.ServiceTableColumnStatusId) { var item = _controller.GetService((int)row); { // Color Code -> Heartbeat IN-ACTIVE: Red | Heartbeat ACTIVE: GREEN | No Heartbeat: Black textCell.TextColor = !item.Alive ? NSColor.Red : NSColor.FromSrgb((nfloat)3.0 / 255, (nfloat)161 / 255, (nfloat)27 / 255, 1); } } } }); }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (item is VMDirSchemaAttributeBaseNode || item is VMDirSchemaClassBaseNode) { browserCell.Image = ob.BaseIcon; } else if (item is VMDirSchemaClassEntryNode) { browserCell.Image = ob.ObjectEntryIcon; } else if (item is VMDirSchemaRootScopeNode) { browserCell.Image = ob.HomeIcon; } } } catch (Exception e) { } }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { try { if (tableColumn.Identifier == VMDNSConstants.RECORD_NAME) { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; browserCell.Image = ob.RecordIcon; } } else if (tableColumn.Identifier == VMDNSConstants.ZONE_NAME || tableColumn.Identifier == VMIdentityConstants.NAME_FIELD) { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; browserCell.Image = ob.ZoneIcon; } } } catch (Exception e) { } }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; var node = item as DirectoryNode; if (node.IsBaseNode) { browserCell.Image = worldIcon; } else if (string.Equals(node.ObjectClass, VMDirConstants.USER_OC)) { browserCell.Image = userIcon; } else if (string.Equals(node.ObjectClass, VMDirConstants.GROUP_OC)) { browserCell.Image = groupIcon; } else { browserCell.Image = directoryIcon; } } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (item is VMDNSForwardZonesNode) { browserCell.Image = ob.ForwardZoneIcon; } else if (item is VMDNSReverseZonesNode) { browserCell.Image = ob.ReverseZoneIcon; } else if (item is VMDNSZonesBaseNode) { browserCell.Image = ob.ZonesIcon; } else if (item is VMDNSZoneEntryNode) { browserCell.Image = ob.ZoneIcon; } else { browserCell.Image = ob.HomeIcon; } } } catch (Exception e) { } }
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(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (item is VecsPrivateKeysNode) { browserCell.Image = ob.privateEntityIcon; } else if (item is VecsSecretKeysNode) { browserCell.Image = ob.secretKeysIcon; } else if (item is VecsTrustedCertsNode) { browserCell.Image = ob.trustedCertsIcon; } else if (item is VecsStoreNode) { browserCell.Image = ob.storeIcon; } else { browserCell.Image = ob.storesIcon; } } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (item is FederationNode) { if ((item as FederationNode).isNodeUp) { browserCell.Image = ob.NodeUpIcon; } else { browserCell.Image = ob.NodeDownIcon; } } else { browserCell.Image = ob.BaseIcon; } } } catch (Exception e) { } }
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 override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { ActionHelper.Execute(delegate() { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; } }); }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; browserCell.Image = directoryIcon; } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { if (item is VMCAServerNode) { browserCell.Image = ob.caIcon; } else if (item is VMCAPersonalCertificatesNode) { browserCell.Image = ob.CertIcon; } else if (item is VMCACSRNode) { browserCell.Image = ob.CertIcon; } else if (item is VMCACertsNode) { if ((int)((item as VMCACertsNode).Tag) == (int)CertificateState.Active) { browserCell.Image = ob.ActiveCertIcon; } else if ((int)(item as VMCACertsNode).Tag == (int)CertificateState.Expired) { browserCell.Image = ob.expiredCertIcon; } else if ((int)(item as VMCACertsNode).Tag == (int)CertificateState.Revoked) { browserCell.Image = ob.revokedCertIcon; } } else if (item is VMCAKeyPairNode) { browserCell.Image = ob.KeyPairIcon; } else { browserCell.Image = ob.CertIcon; } browserCell.Leaf = true; } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { ActionHelper.Execute(delegate() { var ds = tableView.DataSource as GroupMembershipDataSource; NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == "Name") { browserCell.Image = ds.GetRowImage((int)row); } } }); }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { try { if (tableColumn.Identifier == "Name" || tableColumn.Identifier == "IssuedTo" || tableColumn.Identifier == "CreatedDate") { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; browserCell.Image = ob.genericIcon; } } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { try { if (tableColumn.Identifier == VMDirSchemaConstants.VMDIRSCHEMA_NAME) { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; browserCell.Image = ob.DetailsIcon; } } } catch (Exception e) { } }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { ActionHelper.Execute(delegate() { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == "Name") { var image = NSImage.ImageNamed("certificate.png"); browserCell.Image = image; browserCell.Image.Size = new CoreGraphics.CGSize { Width = (float)16.0, Height = (float)16.0 }; } } }); }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { ActionHelper.Execute(delegate() { var datasource = tableView.DataSource as GroupMembershipDataSource; NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == "Name") { browserCell.Image = datasource.GetRowImage((int)row); browserCell.Image.Size = new CoreGraphics.CGSize { Width = (float)16.0, Height = (float)16.0 }; } } }); }
public override void WillDisplayCell(NSOutlineView outlineView, NSObject cell, NSTableColumn tableColumn, NSObject item) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (item is GlobalTopologyNode) { browserCell.Image = ob.CachedImages [(int)ImageIndex.Global]; } else if (item is SiteNode) { browserCell.Image = ob.CachedImages [(int)ImageIndex.Site]; } else if (item is InfrastucturesGroupNode) { browserCell.Image = ob.CachedImages [(int)ImageIndex.InfraGroup]; } else if (item is ManagementsGroupNode) { browserCell.Image = ob.CachedImages [(int)ImageIndex.ManagementGroup]; } else if (item is InfrastructureNode) { browserCell.Image = ob.CachedImages [(int)ImageIndex.Infrastructure]; } else if (item is ManagementNode) { browserCell.Image = ob.CachedImages [(int)ImageIndex.Management]; } else { browserCell.Image = ob.CachedImages [(int)ImageIndex.Management]; } } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
/// <summary> /// Alter the display of the cell text. /// </summary> /// <param name="tableView">Table view.</param> /// <param name="cell">Cell.</param> /// <param name="tableColumn">Table column.</param> /// <param name="row">Row.</param> public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { UIErrorHelper.CheckedExec(delegate() { if (cell is NSBrowserCell) { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == Constants.TableColumnIconId) { browserCell.Image = NSImage.ImageNamed(Constants.InfrastructureNodeImage); } } } else if (cell is NSTextFieldCell) { NSTextFieldCell textCell = cell as NSTextFieldCell; // Apply the text color code to the status column text if (textCell != null && tableColumn.Identifier == Constants.PscTableColumnStatusId) { var collection = _controller.PscDataSource.Entries; if (collection != null) { var item = collection [(int)row]; // Color Code -> Heartbeat: REMOTE: LightGray | IN-ACTIVE: Red | Heartbeat ACTIVE: GREEN | No Heartbeat: Black textCell.TextColor = item.IsRemote ? NSColor.LightGray : (!item.Active ? NSColor.Red : NSColor.FromSrgb((nfloat)3.0 / 255, (nfloat)161 / 255, (nfloat)27 / 255, 1) ); } } } }); }
public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { try { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == "Name") { var image = NSImage.ImageNamed("NSUserGroup"); browserCell.Image = image; browserCell.Image.Size = new CoreGraphics.CGSize { Width = (float)16.0, Height = (float)16.0 }; } } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Exception in casting : " + e.Message); } }
/// <summary> /// Alter the display of the cell text. /// </summary> /// <param name="tableView">Table view.</param> /// <param name="cell">Cell.</param> /// <param name="tableColumn">Table column.</param> /// <param name="row">Row.</param> public override void WillDisplayCell(NSTableView tableView, NSObject cell, NSTableColumn tableColumn, nint row) { UIErrorHelper.CheckedExec(delegate() { if (cell is NSTextFieldCell) { NSTextFieldCell textCell = cell as NSTextFieldCell; // Apply the text color code to the status column text if (textCell != null && tableColumn.Identifier == Constants.PscTableColumnStatusId) { if ((_controller.MainTableView.DataSource) is NodeDataSource) { var datasource = (_controller.MainTableView.DataSource) as NodeDataSource; var collection = datasource.Entries; if (collection != null && (((int)row) < collection.Count)) { var item = collection [(int)row]; // Color Code -> Heartbeat IN-ACTIVE: Red | Heartbeat ACTIVE: GREEN | No Heartbeat: Black textCell.TextColor = GetStatusTextColor(item); } } else if ((_controller.MainTableView.DataSource) is PscDataSource) { var datasource = (_controller.MainTableView.DataSource) as PscDataSource; var collection = datasource.Entries; if (collection != null && (((int)row) < collection.Count)) { var item = collection [(int)row]; // Color Code -> Heartbeat IN-ACTIVE: Red | Heartbeat ACTIVE: GREEN | No Heartbeat: Black textCell.TextColor = GetStatusTextColor(item); } } else if ((_controller.MainTableView.DataSource) is ServiceDataSource) { var datasource = (_controller.MainTableView.DataSource) as ServiceDataSource; var collection = datasource.Entries; if (collection != null && (((int)row) < collection.Count)) { var item = collection [(int)row]; // Color Code -> Heartbeat IN-ACTIVE: Red | Heartbeat ACTIVE: GREEN | No Heartbeat: Black textCell.TextColor = GetStatusTextColor(item); } } } } else if (cell is NSBrowserCell) { NSBrowserCell browserCell = cell as NSBrowserCell; if (browserCell != null) { browserCell.Leaf = true; if (tableColumn.Identifier == Constants.TableColumnIconId) { var source = _controller.MainTableView.DataSource; var icon = GetIconForRow(row, source); if (icon != null) { browserCell.Image = icon; } } } } }); }