Exemplo n.º 1
0
        object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            StringRow row        = (StringRow)value;
            string    columnName = (string)parameter;

            return(row[columnName]);
        }
        public void IsDirty()
        {
            var control = new StringRow();
            Assert.Null(control.IsDirty);

            control.Value = "1";
            Assert.Null(control.IsDirty);

            control.OldValue = "2";
            Assert.True(control.IsDirty);

            control.OldValue = "1";
            Assert.False(control.IsDirty);

            control.Value = "3";
            Assert.True(control.IsDirty);

            control.OldValue = "3";
            Assert.False(control.IsDirty);
        }
        public void IsDirty()
        {
            var control = new StringRow();

            Assert.Null(control.IsDirty);

            control.Value = "1";
            Assert.Null(control.IsDirty);

            control.OldValue = "2";
            Assert.True(control.IsDirty);

            control.OldValue = "1";
            Assert.False(control.IsDirty);

            control.Value = "3";
            Assert.True(control.IsDirty);

            control.OldValue = "3";
            Assert.False(control.IsDirty);
        }