示例#1
0
        protected override void SetupEditControls()
        {
            var propertyUrl = new PropertyString {
                Value = OptionsData.Url
            };
            var propertyWidth = new PropertyNumber {
                Value = OptionsData.MaxWidth
            };
            var propertyHeight = new PropertyNumber {
                Value = OptionsData.MaxHeight
            };

            propertyUrlControl = new Property(propertyUrl)
            {
                EditMode = true
            };
            propertyWidthControl = new Property(propertyWidth)
            {
                EditMode = true
            };
            propertyHeightControl = new Property(propertyHeight)
            {
                EditMode = true
            };

            CreateAndAddControls(propertyUrlControl, "Url to video, photo etc");
            CreateAndAddControls(propertyWidthControl, "Max width");
            CreateAndAddControls(propertyHeightControl, "Max height");
        }
示例#2
0
        public BookToModelMapper WithProperty(PropertyNumberEntity propertyNumberEntity)
        {
            var propertyId = Guid.ParseExact(propertyNumberEntity.Id, "n");

            var propertyNumber = new PropertyNumber(
                propertyId, propertyNumberEntity.Number);

            _book.PropertyNumbers.Add(propertyNumber);

            return(this);
        }
示例#3
0
 public oEmbedPlugin()
 {
     url = new PropertyString {
         Name = "Url to video, photo etc"
     };
     width = new PropertyNumber {
         Name = "Max width"
     };
     height = new PropertyNumber {
         Name = "Max height"
     };
 }
        protected override void SetupEditControls()
        {
            var propertyUrl = new PropertyString { Value = OptionsData.Url };
            var propertyWidth = new PropertyNumber { Value = OptionsData.MaxWidth };
            var propertyHeight = new PropertyNumber { Value = OptionsData.MaxHeight };

            propertyUrlControl = new Property(propertyUrl) { EditMode = true };
            propertyWidthControl = new Property(propertyWidth) { EditMode = true };
            propertyHeightControl = new Property(propertyHeight) { EditMode = true };

            CreateAndAddControls(propertyUrlControl, "Url to video, photo etc");
            CreateAndAddControls(propertyWidthControl, "Max width");
            CreateAndAddControls(propertyHeightControl, "Max height");
        }
        public void GivenANullableIntProperty_WhenAccessedWithCompilerGeneratedPropertyGetter_ShouldReturnTheUnderlyingValue()
        {
            TypedPageActivator activator = new TypedPageActivator();
            TestPageType       page      = (TestPageType)activator.CreateAndPopulateTypedInstance(new PageData(), typeof(TestPageType));
            var property = new PropertyNumber();

            page.Property.Add("NullableIntTestProperty", property);
            int propertyValue = 123;

            page.SetValue("NullableIntTestProperty", propertyValue);

            int returnedPropertyValue = page.NullableIntTestProperty.Value;

            Assert.Equal <int>(propertyValue, returnedPropertyValue);
        }
示例#6
0
 public oEmbedPlugin()
 {
     url = new PropertyString { Name = "Url to video, photo etc" };
     width = new PropertyNumber { Name = "Max width" };
     height = new PropertyNumber { Name = "Max height" };
 }