当前位置: 首页>>代码示例>>C#>>正文


C# nint.ToString方法代码示例

本文整理汇总了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();
			}
开发者ID:GoXuni,项目名称:Xamarin.iOS-Samples,代码行数:7,代码来源:ThemingController.cs

示例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.");
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:20,代码来源:AssetGroupEnumerationScreen.cs

示例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;		
		}
开发者ID:xamarin,项目名称:mac-samples,代码行数:22,代码来源:NSTableViewExample.cs

示例4: Dismissed

			/// <summary>
			/// Runs after Clicked
			/// </summary>
			public override void Dismissed (UIAlertView alertView, nint buttonIndex)
			{
				Console.WriteLine ("Alert Dismissed, button " + buttonIndex.ToString ());
			}
开发者ID:ARMoir,项目名称:mobile-samples,代码行数:7,代码来源:AlertViewsScreen_iPhone.xib.cs

示例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 ());
			}
开发者ID:ARMoir,项目名称:mobile-samples,代码行数:7,代码来源:AlertViewsScreen_iPhone.xib.cs

示例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());
 }
开发者ID:JamieMellway,项目名称:iTextSharpLGPL-Monotouch,代码行数:11,代码来源:RtfAddableElement.cs

示例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...
            }
        }
开发者ID:jhy871167495,项目名称:My-StepCounter,代码行数:61,代码来源:StepCounterController.cs

示例8: GetTitle

 public override string GetTitle(UIPickerView pickerView, nint row, nint component)
 {
     return row.ToString(CultureInfo.CurrentCulture);
 }
开发者ID:milindur,项目名称:MdkControlApp,代码行数:4,代码来源:NumberPickerTableViewCell.cs

示例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);
     }
 }
开发者ID:milindur,项目名称:MdkControlApp,代码行数:16,代码来源:TimePickerTableViewCell.cs


注:本文中的nint.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。