public void UpdateView()
        {
            this.ViewUpdating = true;
            ShellControlHelper.PropertyDescriptorUpdate(this, this._entity);
            FormElementPictureBoxEntityDev entity = (FormElementPictureBoxEntityDev)_formElement;
            PropertyDescriptorCollection   pdc    = TypeDescriptor.GetProperties(this);
            PropertyDescriptor             pds;

            pds = pdc.Find("Image", false);
            if (pds != null)
            {
                if (String.IsNullOrEmpty(entity.Img) == false)
                {
                    ImageResourceInfo imageResource = _resourceComponentService.GetImageResource(entity.Img);
                    if (imageResource != null)
                    {
                        Image image = imageResource.GetImage();
                        pds.SetValue(this, image);
                    }
                }
                else
                {
                    pds.SetValue(this, null);
                }
            }
            ShellControlHelper.SetProperty(this, "SizeMode", entity.SizeMode);
            this.ViewUpdating = false;
        }
Example #2
0
 public static void CheckWarning(FormElementPictureBoxEntityDev entity)
 {
 }