示例#1
0
        internal virtual void ReadXmlInternal(XmlReader reader)
        {
            string str;

            if ((reader.NodeType == ((XmlNodeType)((int)XmlNodeType.Element))) && ((str = reader.Name) != null))
            {
                if (str != "FloatingObjectStyleInfo")
                {
                    if (str != "IsAutomaticFill")
                    {
                        if (str == "IsAutomaticStroke")
                        {
                            this._isAutomaticStroke = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
                            return;
                        }
                        if (str == "FillDrawingColorSettings")
                        {
                            this.FillDrawingColorSettings = (SpreadDrawingColorSettings)Serializer.DeserializeObj(typeof(SpreadDrawingColorSettings), reader);
                            return;
                        }
                        if (str == "StrokeDrawingColorSettings")
                        {
                            this.StrokeDrawingColorSettings = (SpreadDrawingColorSettings)Serializer.DeserializeObj(typeof(SpreadDrawingColorSettings), reader);
                        }
                        return;
                    }
                }
                else
                {
                    this._styleInfo = (FloatingObjectStyleInfo)Serializer.DeserializeObj(typeof(FloatingObjectStyleInfo), reader);
                    return;
                }
                this._isAutomaticFill = (bool)((bool)Serializer.DeserializeObj(typeof(bool), reader));
            }
        }
示例#2
0
 internal override void Init(string name, double x, double y, double width, double height)
 {
     base.Init(name, x, y, width, height);
     this._styleInfo         = null;
     this._isAutomaticFill   = true;
     this._isAutomaticStroke = true;
 }
示例#3
0
 internal void CopyFromInternal(object o, bool clone)
 {
     if ((o is FloatingObjectStyleInfo) && !object.ReferenceEquals(o, this))
     {
         FloatingObjectStyleInfo info = (FloatingObjectStyleInfo)o;
         this._fontTheme      = info._fontTheme;
         this._fontThemeSet   = info._fontThemeSet;
         this._fontFamily     = info._fontFamily;
         this._fontFamilySet  = info._fontFamilySet;
         this._fontSize       = info._fontSize;
         this._fontSizeSet    = info._fontSizeSet;
         this._fontStretch    = info._fontStretch;
         this._fontStretchSet = info._fontStretchSet;
         this._fontStyle      = info._fontStyle;
         this._fontStyleSet   = info._fontStyleSet;
         this._fontWeight     = info._fontWeight;
         this._fontWeightSet  = info._fontWeightSet;
         if (info._fillSet)
         {
             ICloneable cloneable = info._fill as ICloneable;
             if (cloneable != null)
             {
                 this._fill = cloneable.Clone() as Brush;
             }
             else
             {
                 this._fill = info._fill;
             }
             this._fillSet = true;
         }
         else
         {
             this._fill    = null;
             this._fillSet = false;
         }
         if (info._foregroundSet)
         {
             ICloneable cloneable2 = info._foreground as ICloneable;
             if (cloneable2 != null)
             {
                 this._foreground = cloneable2.Clone() as Brush;
             }
             else
             {
                 this._foreground = info._foreground;
             }
             this._foregroundSet = true;
         }
         else
         {
             this._foreground    = null;
             this._foregroundSet = false;
         }
         this._fillThemeColor          = info._fillThemeColor;
         this._fillThemeColorSet       = info._fillThemeColorSet;
         this._foregroundThemeColor    = info._foregroundThemeColor;
         this._foregroundThemeColorSet = info._foregroundThemeColorSet;
         if (info._strokeSet)
         {
             ICloneable cloneable3 = info._stroke as ICloneable;
             if (cloneable3 != null)
             {
                 this._stroke = cloneable3.Clone() as Brush;
             }
             else
             {
                 this._stroke = info._stroke;
             }
             this._strokeSet = true;
         }
         else
         {
             this._stroke    = null;
             this._strokeSet = false;
         }
         this._strokeDashType      = info._strokeDashType;
         this._strokeDashTypeSet   = info._strokeDashTypeSet;
         this._strokeThemeColor    = info._strokeThemeColor;
         this._strokeThemeColorSet = info._strokeThemeColorSet;
         this._strokeThickness     = info._strokeThickness;
         this._strokeThicknessSet  = info._strokeThicknessSet;
         this._cornerRadius        = info._cornerRadius;
         this._cornerRadiusSet     = info._cornerRadiusSet;
         this._themeContext        = info._themeContext;
         if (info._formatterSet)
         {
             ICloneable cloneable4 = info._formatter as ICloneable;
             if (cloneable4 != null)
             {
                 this._formatter = cloneable4.Clone() as IFormatter;
             }
             else
             {
                 this._formatter = info._formatter;
             }
             this._formatterSet = true;
         }
         else
         {
             this._formatter    = null;
             this._formatterSet = false;
         }
         this._lineCapType               = info._lineCapType;
         this._lineCapTypeSet            = info._lineCapTypeSet;
         this._lineJoinType              = info.LineJoinType;
         this._lineJoinTypeSet           = info._lineJoinTypeSet;
         this._lineBeginArrowSettings    = info._lineBeginArrowSettings;
         this._lineBeginArrowSettingsSet = info._lineBeginArrowSettingsSet;
         this._lineEndArrowSettings      = info._lineEndArrowSettings;
         this._lineEndArrowSettingsSet   = info._lineEndArrowSettingsSet;
     }
 }
示例#4
0
 public FloatingObjectStyleInfo(FloatingObjectStyleInfo format)
 {
     this._suspendState = new WorkingState();
     this._lineJoinType = PenLineJoin.Round;
     this.CopyFromInternal(format, true);
 }