本文整理汇总了C#中nint类的典型用法代码示例。如果您正苦于以下问题:C# nint类的具体用法?C# nint怎么用?C# nint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
nint类属于命名空间,在下文中一共展示了nint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetTitle
public override string GetTitle(UIPickerView picker, nint row, nint component)
{
if (component == 0)
return tk.pickerData[row];
else
return row.ToString();
}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:7,代码来源:ThemingController.cs
示例2: RowsInSection
public override nint RowsInSection (UITableView tableview, nint section)
{
if (beacons == null)
return 0;
else
return beacons.Length;
}
开发者ID:tdyocum,项目名称:estimotes-xplat,代码行数:7,代码来源:CloudBeaconsViewController.cs
示例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)
);
}
开发者ID:fpt-software,项目名称:Wordpress-Client,代码行数:7,代码来源:ColorExtention.cs
示例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
};
}
开发者ID:bocoop,项目名称:MichelinMD,代码行数:7,代码来源:PieChartDataSource.cs
示例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;
}
开发者ID:SubtitleEdit,项目名称:subtitleedit-mac,代码行数:26,代码来源:StringListTableDelegate.cs
示例6: RowsInSection
public override nint RowsInSection(UITableView tableview, nint section)
{
if (todoService == null || todoService.Items == null)
return 0;
return todoService.Items.Count;
}
开发者ID:ARMoir,项目名称:mobile-samples,代码行数:7,代码来源:TodoListViewController.cs
示例7: TitleForHeader
public override string TitleForHeader (UITableView tableView, nint section)
{
if (section == (int) RecipeSection.Instructions)
return "Instructions";
return null;
}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:7,代码来源:RecipeDetailViewController.cs
示例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);
}
开发者ID:jlattimer,项目名称:CrmWatchKit,代码行数:25,代码来源:InterfaceController.cs
示例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);
}
开发者ID:JamieMellway,项目名称:iTextSharpLGPL-Monotouch,代码行数:7,代码来源:PDFViewDataSource.cs
示例10: TitleForHeader
public override string TitleForHeader (UITableView tableView, nint section)
{
if (section == 1)
return "Recent";
else
return "Older Ideas";
}
开发者ID:erickr007,项目名称:IdeaBag.Client.Core,代码行数:7,代码来源:IdeasViewController.cs
示例11: RowsInSection
public override nint RowsInSection(UITableView tableview, nint section)
{
if (_events != null)
return _events.Count;
return 0;
}
开发者ID:pavlob0910,项目名称:my-start-stable,代码行数:7,代码来源:CalendarViewController.cs
示例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;
}
开发者ID:bocoop,项目名称:MichelinMD,代码行数:7,代码来源:AppendDataDataSource.cs
示例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;
}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:29,代码来源:ProductTableDelegate.cs
示例14: GetRowsInComponent
public override nint GetRowsInComponent(UIPickerView pickerView, nint component)
{
if (component == 0)
return tk.chartTypes.Length;
else
return tk.chartAnimation.Length;
}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:7,代码来源:LoadAnimationController.cs
示例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;
}
开发者ID:SergeiZag,项目名称:ContosoMobileAppMSA,代码行数:26,代码来源:PickerModel.cs
示例16: GetTitle
public override string GetTitle(UIPickerView picker, nint row, nint component)
{
if (component == 0)
return tk.chartTypes[row];
else
return tk.chartAnimation[row];
}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:7,代码来源:LoadAnimationController.cs
示例17: TitleForHeader
public override string TitleForHeader(UITableView tableView, nint section)
{
if (!this.checkPointData.DisabledCheckPoints.Any ())
return string.Empty;
return SectionNames [section];
}
开发者ID:tophrchris,项目名称:Routinely,代码行数:7,代码来源:CheckPointListDataSource.cs
示例18: GetViewController
public DataViewController GetViewController (nint index, UIStoryboard storyboard)
{
var dataViewController = (DataViewController)storyboard.InstantiateViewController ("DataViewController");
dataViewController.PageNumber = index + 1;
dataViewController.Pdf = pdf;
return dataViewController;
}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:7,代码来源:ModelController.cs
示例19: PointSelected
public override void PointSelected (TKChart chart, TKChartData point, TKChartSeries series, nint index)
{
if (this.labelRender != null) {
this.labelRender.SelectedSeries = (int)series.Index;
this.labelRender.SelectedDataPoint = index;
}
}
开发者ID:tremors,项目名称:ios-sdk,代码行数:7,代码来源:CustomPointLabelRender.cs
示例20: GetObjectValue
public NSObject GetObjectValue(NSTableView tableView, NSTableColumn tableColumn, nint row)
{
if (IsViewReady) {
Employee emp = DataStore.Employees[(int)row];
switch (tableColumn.Identifier)
{
case "FirstName":
return new NSString(emp.FirstName);
case "LastName":
return new NSString(emp.LastName);
case "DepartmentName":
NSPopUpButtonCell button = tableColumn.DataCellForRow(row) as NSPopUpButtonCell;
button.RemoveAllItems();
foreach(Department dep in DataStore.Departments) {
button.Menu.AddItem(dep.Name, new ObjCRuntime.Selector("departmentSelected:"), "");
}
return button;
default:
return new NSString("");
}
}
else return new NSString("");
}
开发者ID:yingfangdu,项目名称:BNR,代码行数:26,代码来源:EmployeeViewController.cs
注:本文中的nint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论