Esempio n. 1
0
            public CircuitListTableViewCell(IntPtr handle) : base(handle)
            {
                ExceptionUtility.Try(() =>
                {
                    this._statusLabel.SetFontAndColor(StatusLabelFont);
                    this._statusLabel.Hidden = true;

                    _checkbox.OnCheckedChanged = () =>
                    {
                        if (_circuit != null)
                        {
                            _circuit.Selected = _checkbox.Checked;

                            if (_circuit.SelectedChanged != null)
                            {
                                _circuit.SelectedChanged();
                            }
                        }
                    };


                    //power icon
                    _powerIconImageView.Image = _powerIcon;
                    _powerIconImageView.SizeToFit();
                    _powerIconImageView.Hidden = true;

                    this.ContentView.AddSubviews(_checkbox, _statusLabel, _powerIconImageView);
                });
            }