示例#1
0
 public void UnsetField()
 {
     OutdatedNotification.Hide();
     DataNotSpecifiedNotification.Hide();
     ParseErrorNotification.Hide();
     MainBorder.IsEnabled = true;
 }
        public void SetValue(string value)
        {
            Assert.ArgumentNotNull(value, nameof(value));

            if (!value.Equals(string.Empty))
            {
                DataNotSpecifiedNotification.Hide();
            }

            if (justSetField)
            {
                justSetField = false;
                fieldValue   = value;
                return;
            }

            if (fieldValue.Equals(value))
            {
                // No change ~> return
                return;
            }

            fieldValue = value;

            MainBorder.IsEnabled = false;
            DataNotSpecifiedNotification.Hide();
            OutdatedNotification.Show();

            var modified = ValueModified;

            if (modified != null)
            {
                modified();
            }
        }