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


C# Bundle.GetDouble方法代码示例

本文整理汇总了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);
			        }
			    }
			}
开发者ID:MahendrenGanesan,项目名称:samples,代码行数:34,代码来源:LunarView.cs

示例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;
        }
开发者ID:kierstendevenish,项目名称:vowapp2,代码行数:9,代码来源:MainActivity.cs

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

示例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();
            };
        }
开发者ID:dorofeev-serdg,项目名称:Xamarin,代码行数:73,代码来源:MainActivity.cs


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