public override NSView GetViewForItem (NSTableView tableView, NSTableColumn tableColumn, int row) { var view = (NSTableCellView)tableView.MakeView (tableColumn.Identifier, this); string value = string.Empty; switch (tableColumn.HeaderCell.Title) { case "Added": value = _notes [row].Added.ToShortDateString(); break; case "Author": value = _notes [row].Author; break; case "Note": value = _notes [row].Content; break; default: break; } view.TextField.StringValue = value; return view; }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { ServerInfo s = Items [row]; if (tableColumn.Identifier == "List") { if(s.UserList == ServerInfo.UserListType.WhiteList) return NSImage.ImageNamed("blacklist_0.png"); else if(s.UserList == ServerInfo.UserListType.BlackList) return NSImage.ImageNamed("blacklist_1.png"); else return NSImage.ImageNamed("blacklist_2.png"); } else if (tableColumn.Identifier == "Flag") { return NSImage.ImageNamed("flag_" + s.CountryCode.ToLowerInvariant() + ".png"); } else if (tableColumn.Identifier == "Name") { return new NSString (s.GetNameForList ()); } else if (tableColumn.Identifier == "Score") { int p = Convert.ToInt32(5 * s.ScorePerc()); return NSImage.ImageNamed ("stars_" + p.ToString() + ".png"); } else if (tableColumn.Identifier == "Location") { return new NSString (s.GetLocationForList()); } else if (tableColumn.Identifier == "Latency") { return new NSString (s.GetLatencyForList()); } else if (tableColumn.Identifier == "LoadIcon") { return NSImage.ImageNamed("status_" + s.GetLoadColorForList().ToLowerInvariant() + ".png"); } else if (tableColumn.Identifier == "Load") { return new NSString (s.GetLoadForList()); } else if (tableColumn.Identifier == "Users") { return new NSString (s.GetUsersForList()); } else throw new NotImplementedException (string.Format ("{0} is not recognized", tableColumn.Identifier)); }
public int numberOfRowsInTableView(NSTableView table_view) { if (Items == null) return 0; else return Items.Count; }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { AreaInfo a = Items[row]; if (tableColumn.Identifier == "List") { if(a.UserList == AreaInfo.UserListType.WhiteList) return NSImage.ImageNamed("blacklist_0.png"); else if(a.UserList == AreaInfo.UserListType.BlackList) return NSImage.ImageNamed("blacklist_1.png"); else return NSImage.ImageNamed("blacklist_2.png"); } else if (tableColumn.Identifier == "Flag") { return NSImage.ImageNamed("flag_" + a.Code.ToLowerInvariant() + ".png"); } else if (tableColumn.Identifier == "Name") { return new NSString (a.Name); } else if (tableColumn.Identifier == "Servers") { return new NSString (a.Servers.ToString()); } else if (tableColumn.Identifier == "LoadIcon") { return NSImage.ImageNamed("status_" + a.GetLoadColorForList().ToLowerInvariant() + ".png"); } else if (tableColumn.Identifier == "Load") { return new NSString (a.GetLoadForList()); } else if (tableColumn.Identifier == "Users") { return new NSString (a.Users.ToString()); } else throw new NotImplementedException (string.Format ("{0} is not recognized", tableColumn.Identifier)); }
public override NSView GetViewForItem (NSTableView tableView, NSTableColumn tableColumn, int row) { var product = WebService.Shared.CurrentOrder.Products [row]; ShoppingBasketTableViewCellController controller = new ShoppingBasketTableViewCellController (); controller.Product = product; return (ShoppingBasketTableViewCell)controller.View; }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { // var valueKey = (string)(NSString)tableColumn.Identifier; // var dataRow = _profiles[row]; return null; }
public override NSObject GetObjectValue (NSTableView tableView, NSTableColumn tableColumn, int row) { TableAdvancedEventsControllerItem i = Items [row]; if (tableColumn.Identifier == "Event") { return new NSString (i.Title); } else if (tableColumn.Identifier == "FileName") { return new NSString (i.Filename); } else if (tableColumn.Identifier == "Arguments") { return new NSString (i.Arguments); } else if (tableColumn.Identifier == "WaitEnd") { if ((i.Filename.Trim () != "") || (i.Arguments.Trim () != "")) { if (i.WaitEnd) return NSImage.ImageNamed ("status_green_16.png"); else return NSImage.ImageNamed ("status_red_16.png"); } else return NSImage.ImageNamed ("status_unknown.png"); } else throw new NotImplementedException (string.Format ("{0} is not recognized", tableColumn.Identifier)); }
public TableTabsDelegate(NSTableView tableView, NSTabView tabView) { m_tableView = tableView; m_tabView = tabView; SelectionChange (); }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { if (row != -1) return (NSString)Program.Instance.StreamDeskCoreInstance.SettingsInstance.ActiveDatabases[row]; return null; }
public override int GetRowCount(NSTableView tableView) { if (LeaksTableViewDelegate.SelectedRow == -1) return 0; return Leaks[LeaksTableViewDelegate.SelectedRow].CallStack.Count; }
public static NSCell CreateCell (ApplicationContext context, NSTableView table, ICellSource source, ICollection<CellView> cells, int column) { CompositeCell c = new CompositeCell (context, Orientation.Horizontal, source); foreach (var cell in cells) c.AddCell ((ICellRenderer) CreateCell (table, c, cell, column)); return c; }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { NSTableColumn[] cols = tableView.TableColumns(); int idx = cols.ToList().FindIndex(t => t.HeaderCell.StringValue == tableColumn.HeaderCell.StringValue); switch(idx) { case (int)TableLocation.AV: return new NSString(Rows[row][idx].ToString()); case (int)TableLocation.TV: return new NSString(Rows[row][idx].ToString()); case (int)TableLocation.ISO: return new NSString(Rows[row][idx].ToString()); case (int)TableLocation.Keyframe: return NSObject.FromObject(((bool)(Rows[row][idx])) ? NSCellStateValue.On : NSCellStateValue.Off); case (int)TableLocation.Filename: return new NSString(Rows[row][idx].ToString()); case (int)TableLocation.Nr: return new NSString(Rows[row][idx].ToString()); case (int)TableLocation.Brightness: return new NSString(Rows[row][idx].ToString()); default: return new NSString("N/A"); } }
public override NSObject GetObjectValue(NSTableView table, NSTableColumn col, int row) { int column; // Determine which column is being selected switch (col.HeaderCell.Title) { case "Count": column = 0; break; case "Number": column = 1; break; case "Distance": column = 2; break; case "Interval": column = 3; break; case "Stroke": column = 4; break; case "Comment": column = 5; break; default: break; } if (row + 1 > m_tableData [column].Count) return new NSString (""); else return new NSString (m_tableData [column] [row]); }
public override int GetRowCount (NSTableView tableView) { if (data == null) return 0; else return data.Length; }
public TableRoutingController (NSTableView tableView) { this.tableView = tableView; this.tableView.DataSource = this; }
/// <summary> /// Gets the object value. Hopefully this will handle the Notes into the view. /// </summary> /// <returns> /// The object value. /// </returns> /// <param name='tableView'> /// Table view. /// </param> /// <param name='tableColumn'> /// Table column. /// </param> /// <param name='row'> /// Row. /// </param> public override MonoMac.Foundation.NSObject GetObjectValue(MonoMac.AppKit.NSTableView tableView, MonoMac.AppKit.NSTableColumn tableColumn, int row) { //noteTitle NSString valueKey = null; String currNote = (String)notesList [row]; Note note = notes [currNote]; if (tableColumn.Identifier != null) { valueKey = (NSString)tableColumn.Identifier.ToString(); } switch (valueKey) { case "noteTitle": return((NSString)note.Title); case "colNoteModifiedDate": return((NSString)note.ChangeDate.ToString()); } throw new System.Exception(string.Format("Incorrect value requested '{0}'", valueKey)); }
public TableAreasController (NSTableView tableView) { this.tableView = tableView; this.tableView.DataSource = this; }
public override void SetObjectValue (NSTableView tableView, NSObject theObject, NSTableColumn tableColumn, int row) { NSString newNSValue = theObject as NSString; if (newNSValue == null) return; string newValue = newNSValue.ToString (); int columnIndex = tableView.FindColumn ((NSString)tableColumn.Identifier); BookmarkManager.Entry entry = entries[row]; switch (columnIndex) { case 0: if (!string.IsNullOrWhiteSpace (newValue)) entry.Name = newValue; break; case 1: entry.Notes = newValue; break; case 2: if (!string.IsNullOrWhiteSpace (newValue)) entry.Url = newValue; break; default: break; } manager.CommitBookmarkChange (entry); }
//private Engine m_engine; public TableLogsController(NSTableView tableView) { this.tableView = tableView; //m_engine = Eddie.Core.Engine.Instance as Engine; this.tableView.DataSource = this; }
public NSObject ObjectValueForTableColumn(NSTableView table, NSTableColumn col, int row) { Console.WriteLine("tableView:objectValueForTableColumn:row:"); if (row > _categories.Count - 1) return null; return new NSString(_categories [row].Name); }
public override bool ShouldEditTableColumn(NSTableView tableView, NSTableColumn tableColumn, int row) { switch(tableColumn.Identifier) { case "label": return !Data.Wallet.IsLocked; default: return false; } }
public override void SetObjectValue(NSTableView tableView, NSObject theObject, NSTableColumn tableColumn, int row) { var proposedValue = theObject.ToString(); if (proposedValue.Trim().Length > 0) { controller.gamerList[row].Gamertag = theObject.ToString(); controller.gamerList[row].DisplayName = theObject.ToString(); } }
public int NumberOfRowsInTableView(NSTableView tv) { if (MediaMetadata == null) { return 0; } return MediaMetadata.Metadata.Count; }
public NSObject ObjectValueForTableColumn(NSTableView table, NSTableColumn col, int row) { if (row < Rows.Count) { return new NSString(Rows[row].ToString()); } return new NSString (); }
//private Engine m_engine; public TableDnsServersController (NSTableView tableView) { this.tableView = tableView; //m_engine = AirVPN.Core.Engine.Instance as Engine; this.tableView.DataSource = this; }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { if (tableColumn.HeaderCell.StringValue == "Region") return new NSString(_regions[row].Name); if (tableColumn.HeaderCell.StringValue == "Mac Users") return new NSNumber(_regions[row].MacUsers); return new NSNumber(_regions[row].WindowsUsers); }
public TableTabsController(NSTableView tableView, NSTabView tabView) { this.tableView = tableView; this.tabView = tabView; tableView.Delegate = new TableTabsDelegate (tableView, tabView); this.tableView.DataSource = this; }
public override bool ShouldSelectRow(NSTableView tableView, int row) { var profile = controller.gamerList[row]; foreach (var gamer in Gamer.SignedInGamers) { if (profile.PlayerInternalIdentifier == gamer.InternalIdentifier) return false; } return true; }
public override NSObject GetObjectValue (NSTableView tableView, NSTableColumn col, int row) { var entry = data [row]; string value = entry.Value; if (col.DataCell.Tag == 0) return new NSString (entry.Key); else return new NSString (entry.Value); }
public override NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, int row) { string e = m_items [row]; if (tableColumn.Identifier == "IP") { return new NSString (e); } else throw new NotImplementedException (string.Format ("{0} is not recognized", tableColumn.Identifier)); }
public TableNotesDataSource (NSTableView table, NSSearchField searchField, WebView webView) { this.table = table; this.searchField = searchField; this.webView = webView; LoadNotes (); //Handle Search Field this.searchField.Changed += SearchFieldChanged; AppDelegate.NoteEngine.NoteAdded += HandleNewNoteAdded; KeyboardListener.NoteContentChanged += HandleContentUpdate; DomDocumentListener.NoteContentChanged += HandleNoteContentClosing; }
public override MonoMac.Foundation.NSObject GetObjectValue(MonoMac.AppKit.NSTableView tableView, MonoMac.AppKit.NSTableColumn tableColumn, int rowIndex) { var valueKey = (string)(NSString)tableColumn.Identifier; var dataRow = _app.villains[rowIndex]; switch ((string)valueKey) { case "name": return((NSString)dataRow.Name); case "mugshot": return(dataRow.Mugshot); case "lastSeenDate": return((NSDate)dataRow.LastSeenDate); } throw new Exception(string.Format("Incorrect value requested '{0}'", (string)valueKey)); }
public override int GetRowCount(MonoMac.AppKit.NSTableView tableView) { return(_app == null ? 0 : _app.villains.Count); }