Beispiel #1
0
        public override Object ConvertTo(ITypeDescriptorContext context,
                                         CultureInfo culture,
                                         Object value,
                                         Type destinationType)
        {
            if (destinationType.Equals(Type.GetType("System.String")) &&
                value.GetType().Equals(Type.GetType("DMS.DMS_Graphics.CFillOptions")))
            {
                CFillOptions FillOptions = (CFillOptions)(value);
                String       Desstr      = "填充类型:";
                switch (FillOptions.BrushType)
                {
                case LCBrushType.Blank: Desstr += "空心"; break;

                case LCBrushType.Solid: Desstr += "实填充"; break;

                case LCBrushType.Hatch: Desstr += "网格填充"; break;

                case LCBrushType.LinearGradient: Desstr += "渐变填充"; break;

                case LCBrushType.Texture: Desstr += "图案填充"; break;

                default: Desstr += "未知"; break;
                }
                //Desstr += ";填充色:" + FillOptions.BackColor.ToString();
                return(Desstr);
            }
            ExpandableObjectConverter sEx = new ExpandableObjectConverter();

            return(sEx.ConvertTo(context, culture, value, destinationType));
        }
Beispiel #2
0
 public void CopyTo(CFillOptions Dest)
 {
     Dest.BackColor      = this.BackColor;
     Dest.BrushType      = this.BrushType;
     Dest.ForeColor      = this.ForeColor;
     Dest.Hatch          = this.Hatch;
     Dest.LinearGradient = this.LinearGradient;
     Dest.TextureFile    = this.TextureFile;
     Dest.NoFrame        = this.NoFrame;
 }
Beispiel #3
0
        public CTuYuan(String _Name, CBase _Parent, Object _Owner) : base(_Name, _Parent, _Owner)    //,m_isAddWidth(false)
        {
            m_RotateAngle = 0;
            Copy_Matrix   = new Matrix();

            m_FillOptions = new CFillOptions();
            //m_FillOptions.OnFillOptionChange = new FillOptionChangeEventHandler(this, CTuYuan.OnFillOptionChange);

            m_SolidBrush = (SolidBrush)(Brushes.Transparent.Clone());
            CartoonBrush = (SolidBrush)(Brushes.Transparent.Clone());
            m_HatchBrush = new HatchBrush(FillOptions.Hatch, FillOptions.ForeColor, FillOptions.BackColor);
        }
Beispiel #4
0
        //public virtual int ComputeFocusPoint() { }
        //public virtual void UpDate(){}
        public CTuYuan() : base()
        {
            m_RotateAngle = 0;
            Copy_Matrix   = new Matrix();

            m_FillOptions = new CFillOptions();
            // m_FillOptions.OnFillOptionChange = new FillOptionChangeEventHandler(this,OnFillOptionChange);

            m_SolidBrush = (SolidBrush )(Brushes.Transparent.Clone());
            CartoonBrush = (SolidBrush )(Brushes.Transparent.Clone());
            m_HatchBrush = new HatchBrush(FillOptions.Hatch, FillOptions.ForeColor, FillOptions.BackColor);
        }
Beispiel #5
0
        public CFillOptions Clone()
        {
            CFillOptions FillOptions = new CFillOptions();

            FillOptions.BackColor      = this.BackColor;
            FillOptions.BrushType      = this.BrushType;
            FillOptions.ForeColor      = this.ForeColor;
            FillOptions.Hatch          = this.Hatch;
            FillOptions.LinearGradient = this.LinearGradient;
            FillOptions.TextureFile    = this.TextureFile;
            FillOptions.NoFrame        = this.NoFrame;
            return(FillOptions);
        }