示例#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;
            }
        }
示例#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;
            }
        }
示例#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;
            }
        }
示例#4
0
        private static void OnShowRequiredFlagChanged(BindableObject bindable, object oldValue, object newValue)
        {
            ESIEditor thisctrl = (ESIEditor)bindable;

            if (thisctrl != null && oldValue != newValue)
            {
                thisctrl.SetRequiredFlag();
            }
        }
示例#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;
                }
            }
        }
示例#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;
                }
            }
        }
示例#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;
                }
            }
        }
示例#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);
            }
        }