コード例 #1
0
        void SldOperator_ValueChanged(object sender, EventArgs e)
        {
            float sldOperatorValue = SldOperator.Value;

            //To only round when it has decimals.
            if ((sldOperatorValue % 1) != 0)
            {
                float roundendValue = (float)Math.Round(sldOperatorValue);

                //Duration, Delay, Type of Animation, Action to Perform, Action on Completed Animation.
                UIView.Animate(0.5, 0, UIViewAnimationOptions.CurveEaseInOut, () => {
                    SldOperator.SetValue(roundendValue, true);

                    isFinishedTheAnimation = false;
                }, () => {
                    isFinishedTheAnimation = true;
                });
            }
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (BtnCalculate != null)
            {
                BtnCalculate.Dispose();
                BtnCalculate = null;
            }

            if (LblAddition != null)
            {
                LblAddition.Dispose();
                LblAddition = null;
            }

            if (LblDivision != null)
            {
                LblDivision.Dispose();
                LblDivision = null;
            }

            if (LblMultiplication != null)
            {
                LblMultiplication.Dispose();
                LblMultiplication = null;
            }

            if (LblNumber1 != null)
            {
                LblNumber1.Dispose();
                LblNumber1 = null;
            }

            if (LblNumber2 != null)
            {
                LblNumber2.Dispose();
                LblNumber2 = null;
            }

            if (LblResult != null)
            {
                LblResult.Dispose();
                LblResult = null;
            }

            if (LblSubstraction != null)
            {
                LblSubstraction.Dispose();
                LblSubstraction = null;
            }

            if (SldOperator != null)
            {
                SldOperator.Dispose();
                SldOperator = null;
            }

            if (TxtNumber1 != null)
            {
                TxtNumber1.Dispose();
                TxtNumber1 = null;
            }

            if (TxtNumber2 != null)
            {
                TxtNumber2.Dispose();
                TxtNumber2 = null;
            }

            if (BtnGoToSettings != null)
            {
                BtnGoToSettings.Dispose();
                BtnGoToSettings = null;
            }
        }