Example #1
0
        //============================================================
        // <T>转换内容为指定类型。</T>
        //
        // @param context 环境
        // @param culture 文化
        // @param value 内容
        // @param destinationType 目标类型
        // @return 是否含有位图
        //============================================================
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            FRcPicture source = (FRcPicture)value;

            if (source != null)
            {
                return(source.ToString());
            }
            return(null);
        }
Example #2
0
        ////============================================================
        //// <T>获得或设置资源编号。</T>
        ////============================================================
        //[Category("属性")]
        //[Browsable(true)]
        //[Editor(typeof(FUiResourceEditor), typeof(UITypeEditor))]
        //[DefaultValue("")]
        //[Description("资源编号")]
        //public string ResourceId {
        //   get { return id; }
        //   set {
        //      if (id != value) {
        //         id = value;
        //         // SetupResource(_foreResource);
        //      }
        //   }
        //}

        //============================================================
        // <T>接收尺寸对象。</T>
        //
        // @param size 尺寸对象
        //============================================================
        public void Assign(FRcPicture picture)
        {
            if (picture == null)
            {
                return;
            }
            _code    = picture.Code;
            _alignCd = picture.AlignCd;
            _location.Assign(picture.Location);
            _size.Assign(picture.Size);
            _padding.Assign(picture.Padding);
        }