public NumericUpDown_Mobile()
        {
            this.OptionView = new UIView();
            //cultureList
            this.cultureList.Add((NSString)"Right");
            this.cultureList.Add((NSString)"Left");
            this.cultureList.Add((NSString)"Both");

            //adultNumericUpDown
            adultNumericUpDown                      = new SFNumericUpDown();
            adultNumericUpDown.AllowNull            = true;
            adultNumericUpDown.PercentDisplayMode   = SFNumericUpDownPercentDisplayMode.Compute;
            adultNumericUpDown.ValueChangeMode      = SFNumericUpDownValueChangeMode.OnLostFocus;
            adultNumericUpDown.Value                = 5;
            adultNumericUpDown.Minimum              = 0;
            adultNumericUpDown.Maximum              = 100;
            adultNumericUpDown.MaximumDecimalDigits = 0;
            adultNumericUpDown.Culture              = new NSLocale("en_US");
            this.AddSubview(adultNumericUpDown);

            //infantsNumericUpDown
            infantsNumericUpDown                      = new SFNumericUpDown();
            infantsNumericUpDown.AllowNull            = true;
            infantsNumericUpDown.PercentDisplayMode   = SFNumericUpDownPercentDisplayMode.Compute;
            infantsNumericUpDown.Value                = 3;
            infantsNumericUpDown.Minimum              = 0;
            infantsNumericUpDown.Maximum              = 100;
            infantsNumericUpDown.MaximumDecimalDigits = 0;
            infantsNumericUpDown.Culture              = new NSLocale("en_US");
            this.AddSubview(infantsNumericUpDown);

            mainPageDesign();
        }
예제 #2
0
        public NumericUpDown_Tablet()
        {
            //adultNumericUpDown
            adultNumericUpDown                      = new SFNumericUpDown();
            adultNumericUpDown.AllowNull            = true;
            adultNumericUpDown.PercentDisplayMode   = SFNumericUpDownPercentDisplayMode.Compute;
            adultNumericUpDown.ValueChangeMode      = SFNumericUpDownValueChangeMode.OnLostFocus;
            adultNumericUpDown.Value                = 5;
            adultNumericUpDown.Minimum              = 0;
            adultNumericUpDown.Maximum              = 100;
            adultNumericUpDown.MaximumDecimalDigits = 0;
            adultNumericUpDown.Culture              = new NSLocale("en_US");
            controlView.AddSubview(adultNumericUpDown);

            //infantsNumericUpDown
            infantsNumericUpDown                      = new SFNumericUpDown();
            infantsNumericUpDown.AllowNull            = true;
            infantsNumericUpDown.PercentDisplayMode   = SFNumericUpDownPercentDisplayMode.Compute;
            infantsNumericUpDown.Value                = 3;
            infantsNumericUpDown.Minimum              = 0;
            infantsNumericUpDown.Maximum              = 100;
            infantsNumericUpDown.MaximumDecimalDigits = 0;
            infantsNumericUpDown.Culture              = new NSLocale("en_US");
            controlView.AddSubview(infantsNumericUpDown);


            this.AddSubview(controlView);
            mainPageDesign();
            autoHide();
            loadOptionView();
        }
예제 #3
0
        void CreateStepper()
        {
            m_stepper       = new SFNumericUpDown();
            m_stepper.Frame = m_rect;

            double minValue = 0, maxValue = 1, currValue = 0, step = 1.0;

            Utils.Extract(m_data, ref currValue, ref minValue, ref maxValue, ref step);
            m_stepper.AllowNull          = true;
            m_stepper.PercentDisplayMode = SFNumericUpDownPercentDisplayMode.Value;
            m_stepper.ValueChangeMode    = SFNumericUpDownValueChangeMode.OnLostFocus;
            m_stepper.Value                = (nfloat)currValue;
            m_stepper.StepValue            = (nfloat)step;
            m_stepper.Minimum              = (nfloat)minValue;
            m_stepper.Maximum              = (nfloat)maxValue;
            m_stepper.Culture              = NSLocale.CurrentLocale; //new NSLocale("en_US");
            m_stepper.MaximumDecimalDigits = Utils.GetNumberOfDigits(m_data, 3);

            //m_stepper.BackgroundColor = UIColor.White;
            //m_stepper.UpdownButtonColor = UIColor.Clear;

            m_stepper.ValueChanged += (sender, e) => {
                ActionDelegate?.Invoke(WidgetName, e.Value.ToString());
            };

            ViewX = m_stepper;
        }