public GenerateViewsWindow(string outputDirectory, Project project) { InitializeComponent(); this.project = project; this.outputDirectory = outputDirectory; fileTableView = new NSTableView(); tableScrollView.DocumentView = fileTableView; const int packageWidth = 200; var tablePackageColumn = new NSTableColumn(OutlineViewDelegate.Col2); tablePackageColumn.Title = "Package"; tablePackageColumn.Width = packageWidth; var tableColumn = new NSTableColumn(OutlineViewDelegate.Col1); tableColumn.Title = "Available Views"; tableColumn.Width = fileTableView.Frame.Width - packageWidth; fileTableView.AddColumn(tableColumn); fileTableView.AddColumn(tablePackageColumn); bundleButton.Activated += CreateButton_Activated; cancelButton.Activated += CancelButton_Activated; }
public override AppKit.NSView GetCell(AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, Foundation.NSObject owner) { var cell = tableView.MakeView(ArtistCellView.Key, owner) as ArtistCellView ?? new ArtistCellView(); cell.UpdateValues(BindingContext as Artist); return(cell); }
public override AppKit.NSView GetCell(AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, Foundation.NSObject owner) { var textField = tableView.MakeView("Text", owner) as NSTextField ?? new NSTextField().StyleAsMainText(); textField.StringValue = GetCellText(tableColumn); return(textField); }
public override AppKit.NSView GetCell(AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, Foundation.NSObject owner) { var cell = tableView.MakeView(AlbumDetailsCellView.Key, owner) as AlbumDetailsCellView ?? new AlbumDetailsCellView(); cell.Album = BindingContext as Album; return(cell); }
public AppKit.NSView GetCell(AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, Foundation.NSObject owner) { var textField = tableView.MakeView("Header", owner) as NSTextField ?? new NSTextField().StyleAsHeaderText(); textField.Identifier = "Header"; textField.StringValue = GetCellText(tableColumn); return(textField); }
void ReleaseDesignerOutlets() { if (arrayController != null) { arrayController.Dispose (); arrayController = null; } if (tableView != null) { tableView.Dispose (); tableView = null; } }
void ReleaseDesignerOutlets() { if (arrayController != null) { arrayController.Dispose(); arrayController = null; } if (tableView != null) { tableView.Dispose(); tableView = null; } }
public Foundation.NSObject GetObjectValue(AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, System.nint row) { ScheduledClass cl = scheduleFetcher.ScheduledClasses[(int)row]; if (tableColumn.Identifier != "Begin") { return(cl.ValueForKey(new NSString(tableColumn.Identifier))); } else { DateTime date = DateTime.Parse(cl.ValueForKey(new NSString(tableColumn.Identifier)).ToString()).ToUniversalTime(); // Manually make NSString with desired date format to pass to cell // return new NSString(date.ToLongDateString()); // Convert DateTime to NSDate to pass to cell and use Date Formatter for cell. date = DateTime.SpecifyKind(date, DateTimeKind.Local); return((NSDate)date); } }
public AppKit.NSView GetViewForItem(AppKit.NSTableView tableView, AppKit.NSTableColumn tableColumn, System.nint row) { if (viewModel.Tweets.Count < row) { return(null); } TweetView view = (TweetView)tableView.MakeView(identifer, this); if (view == null) { TweetViewController c = new TweetViewController(); view = c.View; view.Frame = new CGRect(0, 0, tableView.Frame.Width, 0); view.Identifier = identifer; } view.Tweet = viewModel.Tweets [(int)row]; return(view); }
public System.nint GetRowCount(AppKit.NSTableView tableView) { return(scheduleFetcher.ScheduledClasses.Count); }
public System.nfloat GetRowHeight(AppKit.NSTableView tableView, System.nint row) { return(50); }
public System.nint GetRowCount(AppKit.NSTableView tableView) { return(viewModel.Tweets.Count); }