| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using InABox.Mobile;
- namespace PRS.Mobile
- {
- public class DigitalFormLookupButton : DigitalFormLookupView
- {
- private readonly MobileButton _button;
- protected override void UpdateUI()
- {
- _button.Text = String.IsNullOrWhiteSpace(_value.Text) ? "Select Value" : _value.Text;
- }
-
- public DigitalFormLookupButton()
- {
-
- MinimumHeightRequest = 45;
- _button = new MobileButton()
- {
- Text = "Select Value"
- };
- _button.Clicked += DoLookup;
- Content = _button;
- }
- protected override void UpdateStatus()
- {
- IsEnabled = !ReadOnly || Definition.Properties.Secure;
-
- var labelcolors = DigitalFormUtils.GetColors(!IsEnabled, Definition.Properties.Required, true);
- _button.BackgroundColor = labelcolors.Background;
- _button.BorderColor = labelcolors.Border;
- _button.TextColor = labelcolors.Foreground;
- }
-
- }
- }
|