Пример #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                this.textField.Dispose();
                this.textField = null;
            }

            base.Dispose(disposing);
        }
Пример #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // todo: date field border for when not inside a table view cell
            this.dateField = new UIDateField(new RectangleF(20, 172, 280, 31));

            this.View.AddSubview(this.dateField);
            this.amount.KeyboardType = UIKeyboardType.DecimalPad;

            this.amount.BecomeFirstResponder();
        }
Пример #3
0
        private void ConfigureCell()
        {
            this.SelectionStyle = UITableViewCellSelectionStyle.None;

            this.textField = new UIDateField(this.CalculateTextFieldFrame(this.Text))
            {
                InputAccessoryView = new UILabel(new RectangleF(0, 0, 100, 50)),
            };

            this.textField.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleLeftMargin;

            this.ContentView.AddSubview(this.textField);
        }
Пример #4
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            this.amount.Text = string.Format("{0:0.00}", this.defaultAllowance);
            this.description.Text = "Weekly Allowance";

            // todo: date field border for when not inside a table view cell
            this.dateField = new UIDateField(new RectangleF(20, 172, 280, 31));

            this.View.AddSubview(this.dateField);
            this.amount.KeyboardType = UIKeyboardType.DecimalPad;

            this.description.BecomeFirstResponder();
        }
Пример #5
0
        private void ConfigureCell()
        {
            this.SelectionStyle = UITableViewCellSelectionStyle.None;

            this.dateField = new UIDateField(this.CalculateTextFieldFrame(this.Text))
            {
                AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleLeftMargin,
            };

            this.ContentView.AddSubview(this.dateField);

            var proxy = new EventProxy <DateInputElementTableViewCell, EventArgs>(this);

            proxy.Handle = (t, s, o) => { t.Value = ((UIDateField)s).Date; };
            this.dateField.ValueChanged += proxy.HandleEvent;
        }
Пример #6
0
        public override void ViewDidUnload()
        {
            base.ViewDidUnload();

            // Clear any references to subviews of the main view in order to
            // allow the Garbage Collector to collect them sooner.
            //
            // e.g. myOutlet.Dispose (); myOutlet = null;

            ReleaseDesignerOutlets();

            if (this.dateField != null)
            {
                this.dateField.Dispose();
                this.dateField = null;
            }
        }