public CameraPropertyLogarithmicView(CameraProperty property, string localizationToken, Func <int, string> valueMapper)
        {
            this.property          = property;
            this.localizationToken = localizationToken;
            bool useDefaultMapper = valueMapper == null;

            this.valueMapper = useDefaultMapper ? defaultValueMapper : valueMapper;

            InitializeComponent();
            lblValue.Left = nud.Left;

            // TODO: retrieve localized name from the localization token.
            lblName.Text = localizationToken;

            if (property.Supported)
            {
                Populate();
            }
            else
            {
                this.Enabled = false;
            }

            nud.Visible      = useDefaultMapper;
            lblValue.Visible = !useDefaultMapper;
        }
 public override void Repopulate(CameraProperty property)
 {
     this.property = property;
     if (property.Supported)
     {
         Populate();
     }
 }
Example #3
0
        public CameraPropertyViewCheckbox(CameraProperty property, string text)
        {
            this.prop = property;

            InitializeComponent();
            cb.Text = text;

            if (property.Supported)
            {
                Populate();
            }
            else
            {
                this.Enabled = false;
            }
        }
        public CameraPropertyLinearView(CameraProperty property, string text, Func <int, string> valueMapper)
        {
            this.property    = property;
            this.valueMapper = valueMapper;

            InitializeComponent();

            // TODO: retrieve localized name from the localization token.
            lblName.Text = text;

            this.Enabled = property.Supported;

            if (property.Supported)
            {
                Populate();
            }
        }
        public CameraPropertyLogarithmicView(CameraProperty property, string localizationToken, Func <int, string> valueMapper)
        {
            this.property          = property;
            this.localizationToken = localizationToken;
            this.valueMapper       = valueMapper;

            InitializeComponent();

            // TODO: retrieve localized name from the localization token.
            lblName.Text = localizationToken;

            if (property.Supported)
            {
                Populate();
            }
            else
            {
                this.Enabled = false;
            }
        }
 public abstract void Repopulate(CameraProperty property);