本文整理汇总了C#中nint类的典型用法代码示例。如果您正苦于以下问题:C# nint类的具体用法?C# nint怎么用?C# nint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
nint类属于命名空间,在下文中一共展示了nint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTitle
public override string GetTitle(UIPickerView picker, nint row, nint component)
{
if (component == 0)
return tk.pickerData[row];
else
return row.ToString();
}
示例2: RowsInSection
public override nint RowsInSection (UITableView tableview, nint section)
{
if (beacons == null)
return 0;
else
return beacons.Length;
}
示例3: ColorFromHex
public static UIColor ColorFromHex(this UIColor color, nint hexValue) {
return UIColor.FromRGB(
(((float)((hexValue & 0xFF0000) >> 16))/255.0f),
(((float)((hexValue & 0xFF00) >> 8))/255.0f),
(((float)(hexValue & 0xFF))/255.0f)
);
}
示例4: GetDataPoint
public override SChartData GetDataPoint(ShinobiChart chart, nint dataIndex, nint dataSeriesIndex)
{
return new SChartRadialDataPoint {
Name = countrySizes[(int)dataIndex].Item1,
Value = countrySizes[(int)dataIndex].Item2
};
}
示例5: GetViewForItem
public override NSView GetViewForItem (NSTableView tableView, NSTableColumn tableColumn, nint row)
{
int r = (int)row;
// This pattern allows you reuse existing views when they are no-longer in use.
// If the returned view is null, you instance up a new view
// If a non-null view is returned, you modify it enough to reflect the new data
NSTextField view = (NSTextField)tableView.MakeView (CellIdentifier, this);
if (view == null) {
view = new NSTextField ();
view.Identifier = CellIdentifier;
view.BackgroundColor = NSColor.Clear;
view.Bordered = false;
view.Selectable = false;
view.Editable = false;
}
// Setup view based on the column selected
switch (tableColumn.Identifier) {
case CellIdentifierFirst:
view.StringValue = DataSource.Items[r];
break;
}
return view;
}
示例6: RowsInSection
public override nint RowsInSection(UITableView tableview, nint section)
{
if (todoService == null || todoService.Items == null)
return 0;
return todoService.Items.Count;
}
示例7: TitleForHeader
public override string TitleForHeader (UITableView tableView, nint section)
{
if (section == (int) RecipeSection.Instructions)
return "Instructions";
return null;
}
示例8: GetContextForSegue
public override NSObject GetContextForSegue(string segueIdentifier, WKInterfaceTable table, nint rowIndex)
{
CrmTask task = _rows[(int)rowIndex];
List<NSObject> keys = new List<NSObject> { new NSString("command"), new NSString("taskid") };
List<NSObject> values = new List<NSObject> { new NSString("closetask"), new NSString(task.TaskId) };
var cmdDict = NSDictionary.FromObjectsAndKeys(values.ToArray(), keys.ToArray());
OpenParentApplication(cmdDict, (replyInfo, error) =>
{
if (error != null)
{
//Console.WriteLine(error);
//TODO: Handle error
return;
}
_rows = new List<CrmTask>();
GetTasks();
});
return new NSString(task.Subject);
}
示例9: GetPreviewItem
public override IQLPreviewItem GetPreviewItem(QLPreviewController controller, nint index)
{
string documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.InternetCache);
NSUrl url = NSUrl.FromFilename (Path.Combine (documentsPath, fileName));
return new PDFViewItem (fileName, url);
}
示例10: TitleForHeader
public override string TitleForHeader (UITableView tableView, nint section)
{
if (section == 1)
return "Recent";
else
return "Older Ideas";
}
示例11: RowsInSection
public override nint RowsInSection(UITableView tableview, nint section)
{
if (_events != null)
return _events.Count;
return 0;
}
示例12: GetSeries
public override SChartSeries GetSeries(ShinobiChart chart, nint dataSeriesIndex)
{
// In our example all series are line series
SChartLineSeries lineSeries = new SChartLineSeries ();
lineSeries.Style.LineWidth = 2;
return lineSeries;
}
示例13: ConfigureTextField
private void ConfigureTextField (NSTableCellView view, nint row)
{
// Add to view
view.TextField.AutoresizingMask = NSViewResizingMask.WidthSizable;
view.AddSubview (view.TextField);
// Configure
view.TextField.BackgroundColor = NSColor.Clear;
view.TextField.Bordered = false;
view.TextField.Selectable = false;
view.TextField.Editable = true;
// Wireup events
view.TextField.EditingEnded += (sender, e) => {
// Take action based on type
switch (view.Identifier) {
case "Product":
DataSource.Products [(int)view.TextField.Tag].Title = view.TextField.StringValue;
break;
case "Details":
DataSource.Products [(int)view.TextField.Tag].Description = view.TextField.StringValue;
break;
}
};
// Tag view
view.TextField.Tag = row;
}
示例14: GetRowsInComponent
public override nint GetRowsInComponent(UIPickerView pickerView, nint component)
{
if (component == 0)
return tk.chartTypes.Length;
else
return tk.chartAnimation.Length;
}
示例15: GetTitle
public override string GetTitle(UIPickerView picker, nint row, nint component)
{
if (row < 0 && row >= _values.Count)
{
return "Not found";
}
string title = String.Empty;
switch (_pickerOption)
{
case PickerOptions.Courses:
title = ((Course)_values[(int)row]).CourseTitle;
break;
//case PickerOptions.Banner:
// title = ((Banner)_values[(int)row]).BannerName;
// break;
//case PickerOptions.Region:
// title = ((Region)_values[(int)row]).RegionName;
// break;
//case PickerOptions.MonthOfYear:
// title = ((MonthOfYear)_values[(int)row]).MonthOfYearName;
// break;
default:
break;
}
return title;
}