Exemplo n.º 1
0
        private static void OnRequiredMessageChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.RequiredMessage = (string)newValue;
            }
        }
Exemplo n.º 2
0
        private static void OnReadOnlyTextColorChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.fieldValueDisplay.TextColor = (Color)newValue;
            }
        }
Exemplo n.º 3
0
        private static void OnEditorBackgroundChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.fieldBorder.BackgroundColor = (Color)newValue;
            }
        }
Exemplo n.º 4
0
        private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SetRequiredFlag();
            }
        }
Exemplo n.º 5
0
        private static void OnPlaceHolderChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                if (newValue != null)
                {
                    thisctrl.fieldValue.Placeholder = (string)newValue;
                }
            }
        }
Exemplo n.º 6
0
        private static void OnFieldLabelChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                if (newValue != null)
                {
                    thisctrl.fieldLabel.Text = newValue.ToString();
                }
                else
                {
                    thisctrl.fieldLabel.Text = null;
                }
            }
        }
Exemplo n.º 7
0
        private static void OnCanEditChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                //thisctrl.fieldBorder.IsVisible = !(bool)newValue;
                //thisctrl.fieldValueDisplay.IsVisible = (bool)newValue;
                thisctrl.SetVisibility((bool)newValue);
                if (!string.IsNullOrEmpty(thisctrl.fieldValueDisplay.Text))
                {
                    thisctrl.fieldValueDisplay.TextColor = thisctrl.ReadOnlyTextColor;
                }
                else
                {
                    thisctrl.fieldValueDisplay.TextColor = Color.Gray;
                }
            }
        }
Exemplo n.º 8
0
        private static void OnFieldValueChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.fieldValue.Text        = newValue?.ToString();
                thisctrl.fieldValueDisplay.Text = newValue?.ToString();
                if (newValue == null)
                {
                    thisctrl.fieldValueDisplay.Text      = thisctrl.PlaceHolder;
                    thisctrl.fieldValueDisplay.TextColor = Color.Gray;
                }
                else
                {
                    thisctrl.fieldValueDisplay.TextColor = Color.Default;
                }
                thisctrl.SetRequiredFlag();
                thisctrl.SetVisibility(thisctrl.CanEdit);
            }
        }