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


C# Bundle.PutDouble方法代码示例

本文整理汇总了C#中Bundle.PutDouble方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.PutDouble方法的具体用法?C# Bundle.PutDouble怎么用?C# Bundle.PutDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bundle的用法示例。


在下文中一共展示了Bundle.PutDouble方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateNewInstance

        public static PlaceFragment CreateNewInstance(Place place, Position position)
        {
            var b = new Bundle ();
            b.PutString ("name", place.Name);
            b.PutString ("distance", place.GetDistance (position.Latitude,
                position.Longitude, CultureInfo.CurrentCulture.Name != "en-US" ?
                CoffeeFilter.Shared.GeolocationUtils.DistanceUnit.Kilometers :
                CoffeeFilter.Shared.GeolocationUtils.DistanceUnit.Miles).ToString ("##.###", CultureInfo.CurrentUICulture));

            b.PutString ("rating", place.Rating.ToString ("#.#", CultureInfo.CurrentUICulture));
            b.PutDouble ("lat", place.Geometry.Location.Latitude);
            b.PutDouble ("lng", place.Geometry.Location.Longitude);
            b.PutString ("placeId", place.PlaceId);

            return new PlaceFragment {
                Arguments = b
            };
        }
开发者ID:RobGibbens,项目名称:Coffee-Filter,代码行数:18,代码来源:PlaceFragment.cs

示例2: handleButton

 private void handleButton()
 {
     Button btn_viewmap = view.FindViewById<Button> (Resource.Id.btn_viewmap);
     btn_viewmap.Click += (object sender, EventArgs e) => {
         checkWifi ();
         if (isWifi) {
             var intent = new Intent (context, typeof(MapController));
             Bundle bundle = new Bundle ();
             bundle.PutString ("name", store.name);
             bundle.PutString ("addressDetail", store.addressDetail);
             bundle.PutDouble ("longtitude", store.longtitude);
             bundle.PutDouble ("latitude", store.latitude);
             bundle.PutString ("profilePicutre", store.profilePicutre);
             intent.PutExtras (bundle);
             context.StartActivity (intent);
             this.Dismiss ();
         }
     };
 }
开发者ID:JackNguyen-Developer,项目名称:TroLySo_YTe,代码行数:19,代码来源:DetailDialogFragment.cs

示例3: SaveState

			/// <summary>
			/// Dump game state to the provided Bundle. Typically called when the
			/// Activity is being suspended.
			/// </summary>
			/// <returns> Bundle with this view's state </returns>
			public Bundle SaveState(Bundle map)
			{
				lock (mSurfaceHolder)
				{
					if (map != null)
					{
						map.PutInt(KEY_DIFFICULTY, Convert.ToInt32(mDifficulty));
						map.PutDouble(KEY_X, Convert.ToDouble(mX));
						map.PutDouble(KEY_Y, Convert.ToDouble(mY));
						map.PutDouble(KEY_DX, Convert.ToDouble(mDX));
						map.PutDouble(KEY_DY, Convert.ToDouble(mDY));
						map.PutDouble(KEY_HEADING, Convert.ToDouble(mHeading));
						map.PutInt(KEY_LANDER_WIDTH, Convert.ToInt32(mLanderWidth));
						map.PutInt(KEY_LANDER_HEIGHT, Convert.ToInt32(mLanderHeight));
						map.PutInt(KEY_GOAL_X, Convert.ToInt32(mGoalX));
						map.PutInt(KEY_GOAL_SPEED, Convert.ToInt32(mGoalSpeed));
						map.PutInt(KEY_GOAL_ANGLE, Convert.ToInt32(mGoalAngle));
						map.PutInt(KEY_GOAL_WIDTH, Convert.ToInt32(mGoalWidth));
						map.PutInt(KEY_WINS, Convert.ToInt32(mWinsInARow));
						map.PutDouble(KEY_FUEL, Convert.ToDouble(mFuel));
					}
				}
				return map;
			}
开发者ID:MahendrenGanesan,项目名称:samples,代码行数:29,代码来源:LunarView.cs

示例4: NewInstance

        public static EntityViewFragment NewInstance(BankEntity bankEntity, bool IsRelativeToUserLocation)
        {
            EntityViewFragment entityViewFragment = new EntityViewFragment ();
            Bundle args = new Bundle();
            args.PutDouble ("Distance", bankEntity.Distance);
            args.PutString ("Name", bankEntity.Name);
            args.PutDouble ("Latitude", bankEntity.Latitude);
            args.PutDouble ("Longitude", bankEntity.Longitude);
            args.PutString ("LocationType", bankEntity.LocationType);
            args.PutLong ("LocationId", bankEntity.LocationId);
            args.PutLong ("Id", bankEntity.Id);
            args.PutString ("Brand", bankEntity.BrandName ());
            args.PutString ("Address", bankEntity.Address);
            args.PutBoolean ("IsRelativeToUserLocation", IsRelativeToUserLocation);

            entityViewFragment.Arguments =  args;
            return entityViewFragment;
        }
开发者ID:priyaaank,项目名称:XamarinMapsPoc,代码行数:18,代码来源:EnityViewPageAdapter.cs

示例5: OnSaveInstanceState

 protected override void OnSaveInstanceState(Bundle outState)
 {
     outState.PutDouble ("offenderLongitude", this.testLongitudeValue);
     outState.PutDouble ("offenderLatitude", this.testLatitudeValue);
     base.OnSaveInstanceState (outState);
 }
开发者ID:kierstendevenish,项目名称:vowapp2,代码行数:6,代码来源:TestActivity.cs

示例6: OnSaveInstanceState

        protected override void OnSaveInstanceState(Bundle outState)
        {
            Console.WriteLine ("Save calc state");
            outState.PutDouble ("Result", calc.Result);
            outState.PutDouble ("Argument", calc.Argument);
            outState.PutInt ("Dot", calc.Dot);
            outState.PutInt ("Action", (int)calc.Action);
            outState.PutString ("Digits", screen.Text);

            // always call the base implementation!
            base.OnSaveInstanceState (outState);
        }
开发者ID:dorofeev-serdg,项目名称:Xamarin,代码行数:12,代码来源:MainActivity.cs


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