本文整理汇总了C#中Bundle.GetDouble方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.GetDouble方法的具体用法?C# Bundle.GetDouble怎么用?C# Bundle.GetDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle.GetDouble方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RestoreState
/// <summary>
/// Restores game state from the indicated Bundle. Typically called when
/// the Activity is being restored after having been previously
/// destroyed.
/// </summary>
/// <param name="savedState"> Bundle containing the game state </param>
public void RestoreState(Bundle savedState)
{
lock (this)
{
lock (mSurfaceHolder)
{
state = STATE_PAUSE;
mRotating = 0;
mEngineFiring = false;
mDifficulty = savedState.GetInt(KEY_DIFFICULTY);
mX = savedState.GetDouble(KEY_X);
mY = savedState.GetDouble(KEY_Y);
mDX = savedState.GetDouble(KEY_DX);
mDY = savedState.GetDouble(KEY_DY);
mHeading = savedState.GetDouble(KEY_HEADING);
mLanderWidth = savedState.GetInt(KEY_LANDER_WIDTH);
mLanderHeight = savedState.GetInt(KEY_LANDER_HEIGHT);
mGoalX = savedState.GetInt(KEY_GOAL_X);
mGoalSpeed = savedState.GetInt(KEY_GOAL_SPEED);
mGoalAngle = savedState.GetInt(KEY_GOAL_ANGLE);
mGoalWidth = savedState.GetInt(KEY_GOAL_WIDTH);
mWinsInARow = savedState.GetInt(KEY_WINS);
mFuel = savedState.GetDouble(KEY_FUEL);
}
}
}
示例2: OnRestoreInstanceState
protected override void OnRestoreInstanceState(Bundle bundle)
{
base.OnRestoreInstanceState(bundle);
this.isMonitoringOn = (bundle != null) ? bundle.GetBoolean ("monitoringState", true) : true;
toggleButton.Checked = this.isMonitoringOn;
this.testLongitudeValue = (bundle != null) ? bundle.GetDouble("offenderLongitude", 0.0) : 0.0;
this.testLatitudeValue = (bundle != null) ? bundle.GetDouble("offenderLatitude", 0.0) : 0.0;
}
示例3: OnRestoreInstanceState
protected override void OnRestoreInstanceState(Bundle bundle)
{
this.testLongitudeValue = (bundle != null) ? bundle.GetDouble("offenderLongitude", 0.0) : 0.0;
this.testLatitudeValue = (bundle != null) ? bundle.GetDouble("offenderLatitude", 0.0) : 0.0;
curTestLongitude.Text = testLongitudeValue.ToString();
curTestLatitude.Text = testLatitudeValue.ToString();
}
示例4: OnCreate
protected override void OnCreate(Bundle bundle)
{
calc = new Calc ();
base.OnCreate (bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
number0 = FindViewById<Button> (Resource.Id.Number0);
number1 = FindViewById<Button> (Resource.Id.Number1);
number2 = FindViewById<Button> (Resource.Id.Number2);
number3 = FindViewById<Button> (Resource.Id.Number3);
number4 = FindViewById<Button> (Resource.Id.Number4);
number5 = FindViewById<Button> (Resource.Id.Number5);
number6 = FindViewById<Button> (Resource.Id.Number6);
number7 = FindViewById<Button> (Resource.Id.Number7);
number8 = FindViewById<Button> (Resource.Id.Number8);
number9 = FindViewById<Button> (Resource.Id.Number9);
screen = FindViewById<TextView> (Resource.Id.digits);
dot = FindViewById<Button> (Resource.Id.Dot);
actionPlus = FindViewById<Button> (Resource.Id.ActionPlus);
actionMinus = FindViewById<Button> (Resource.Id.ActionMinus);
actionMul = FindViewById<Button> (Resource.Id.ActionMul);
actionDiv = FindViewById<Button> (Resource.Id.ActionDiv);
actionResult = FindViewById<Button> (Resource.Id.ActionResult);
backspace = FindViewById<Button> (Resource.Id.ActionBackspace);
clear = FindViewById<Button> (Resource.Id.ActionClear);
if (bundle != null) {
// Restore calc state
Console.Write("Restore calc state");
double calcResult = bundle.GetDouble ("Result");
double calcArgument = bundle.GetDouble ("Argument");
int calcDot = bundle.GetInt ("Dot");
int calcAction = bundle.GetInt ("Action");
string digits = bundle.GetString ("Digits");
calc = new Calc (calcResult, calcArgument, calcDot, calcAction);
screen.Text = digits;
}
number0.Click += (object sender, EventArgs e) => { NumberX_Click(0); };
number1.Click += (object sender, EventArgs e) => { NumberX_Click(1); };
number2.Click += (object sender, EventArgs e) => { NumberX_Click(2); };
number3.Click += (object sender, EventArgs e) => { NumberX_Click(3); };
number4.Click += (object sender, EventArgs e) => { NumberX_Click(4); };
number5.Click += (object sender, EventArgs e) => { NumberX_Click(5); };
number6.Click += (object sender, EventArgs e) => { NumberX_Click(6); };
number7.Click += (object sender, EventArgs e) => { NumberX_Click(7); };
number8.Click += (object sender, EventArgs e) => { NumberX_Click(8); };
number9.Click += (object sender, EventArgs e) => { NumberX_Click(9); };
actionPlus.Click += (object sender, EventArgs e) => { ActionX_Click(Calc.Actions.Plus);};
actionMinus.Click += (object sender, EventArgs e) => { ActionX_Click(Calc.Actions.Minus);};
actionMul.Click += (object sender, EventArgs e) => { ActionX_Click(Calc.Actions.Mul);};
actionDiv.Click += (object sender, EventArgs e) => { ActionX_Click(Calc.Actions.Div);};
actionResult.Click += (object sender, EventArgs e) => { Result_Click();};
clear.Click += (object sender, EventArgs e) => {
PressClear ();
};
backspace.Click += (object sender, EventArgs e) => {
PressBackspace ();
};
dot.Click += (object sender, EventArgs e) => {
PressDot();
};
}