本文整理汇总了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
};
}
示例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 ();
}
};
}
示例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;
}
示例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;
}
示例5: OnSaveInstanceState
protected override void OnSaveInstanceState(Bundle outState)
{
outState.PutDouble ("offenderLongitude", this.testLongitudeValue);
outState.PutDouble ("offenderLatitude", this.testLatitudeValue);
base.OnSaveInstanceState (outState);
}
示例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);
}