本文整理汇总了C#中nint.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# nint.ToString方法的具体用法?C# nint.ToString怎么用?C# nint.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nint
的用法示例。
在下文中一共展示了nint.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: AssetEnumerator
/// <summary>
/// A simple asset enumerator that adds the asset to our asset list
/// </summary>
protected void AssetEnumerator (ALAsset asset, nint index, ref bool stop)
{
// when the enumeration is completed, this method is invoked with group set to null
if(asset != null) {
Console.WriteLine ("Found asset: " + index.ToString ());
// add the asset to the group list
assetGroups[currentGroup].Add (asset);
// keep going
stop = false;
//Console.WriteLine(asset.AssetType.ToString());
}
else
Console.WriteLine("Asset enumeration completed.");
}
示例3: GetViewForItem
// Returns the NSView for a given column/row. NSTableView is strange as unlike NSOutlineView
// it does not pass in the data for the given item (obtained from the DataSource) for the NSView APIs
public override NSView GetViewForItem (NSTableView tableView, NSTableColumn tableColumn, nint 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 (identifer, this);
if (view == null) {
view = new NSTextField ();
view.Identifier = identifer;
view.Bordered = false;
view.Selectable = false;
view.Editable = false;
}
if (tableColumn.Identifier == "Values")
view.StringValue = (NSString)row.ToString ();
else
view.StringValue = (NSString)NumberWords [row];
return view;
}
示例4: Dismissed
/// <summary>
/// Runs after Clicked
/// </summary>
public override void Dismissed (UIAlertView alertView, nint buttonIndex)
{
Console.WriteLine ("Alert Dismissed, button " + buttonIndex.ToString ());
}
示例5: WillDismiss
/// <summary>
/// Runs right after clicked, and before Dismissed
/// </summary>
public override void WillDismiss (UIAlertView alertView, nint buttonIndex)
{
Console.WriteLine ("Alert will dismiss, button " + buttonIndex.ToString ());
}
示例6: IntToByteArray
/**
* Transforms an integer into its String representation and then returns the bytes
* of that string.
*
* @param i The integer to convert
* @return A byte array representing the integer
*/
public byte[] IntToByteArray(nint i)
{
return DocWriter.GetISOBytes(i.ToString());
}
示例7: TodaysStepCountChanged
private void TodaysStepCountChanged(nint stepCount)
{
//Setup Animation
var stepCountAnimation = new CATransition ();
stepCountAnimation.Duration = 0.7f;
stepCountAnimation.Type = "kCATransitionFade";
stepCountAnimation.TimingFunction = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseInEaseOut);
lblStepCount.Layer.AddAnimation(stepCountAnimation, "changeTextTransition");
lblStepCount.Text = stepCount.ToString();
var percentageCountAnimation = new CATransition ();
percentageCountAnimation.Duration = 0.7f;
percentageCountAnimation.Type = "kCATransitionFade";
percentageCountAnimation.TimingFunction = CAMediaTimingFunction.FromName (CAMediaTimingFunction.EaseInEaseOut);
lblPercentage.Layer.AddAnimation(percentageCountAnimation, "changeTextTransition");
if (stepCount == 0)
{
lblCalories.Text = "";
}
else
{
lblCalories.Text = Conversion.CaloriesBurnt(Conversion.StepsToMiles(stepCount)) + " Calories";
}
//Percentage Complete Label
if (stepCount <= 10000)
{
lblPercentage.Text = Conversion.StepCountToPercentage(stepCount) + "% Complete";
}
else
{
lblPercentage.Text = "Completed";
}
//Date
lblDate.Text = DateString;
//Distance
if (Settings.DistanceIsMetric == false)
{
btnDistance.SetTitle(Conversion.StepsToMiles(stepCount).ToString("N2") + " mi", UIControlState.Normal);
}
else
{
btnDistance.SetTitle(Conversion.StepsToKilometers(stepCount).ToString("N2") + " km",
UIControlState.Normal);
}
//Update progress filler view
_progressView.SetStepCount(stepCount);
if (stepCount <= 10000)
{
AnimateToPercentage(Conversion.StepCountToPercentage(stepCount));
}
else
{
AnimateToPercentage(100); //I want to show something...
}
}
示例8: GetTitle
public override string GetTitle(UIPickerView pickerView, nint row, nint component)
{
return row.ToString(CultureInfo.CurrentCulture);
}
示例9: GetTitle
public override string GetTitle(UIPickerView pickerView, nint row, nint component)
{
switch (component)
{
default:
return string.Empty;
case 0: // hours
return row.ToString("00'h'");
case 1: // minutes
return row.ToString("00'm'");
case 2: // seconds
return row.ToString("00's'");
case 3: // milliseconds
return "." + row.ToString(CultureInfo.InvariantCulture);
}
}