コード例 #1
0
 //============================================================
 // <T>加载样式内容。</T>
 //============================================================
 public override void LoadStyleValue()
 {
     // 加载父样式信息
     base.LoadStyleValue();
     // 加载内边框属性
     if (_propertyBorderInner != null)
     {
         _borderInner.LoadStyleProperty(_propertyBorderInner);
     }
     // 加载外边框属性
     if (_propertyBorderOuter != null)
     {
         _borderOuter.LoadStyleProperty(_propertyBorderOuter);
     }
     // 加载前景颜色属性
     if (_propertyForeColor != null)
     {
         _foreColor = _propertyForeColor.GetHex();
     }
     // 加载背景颜色属性
     if (_propertyBackColor != null)
     {
         _backColor = _propertyBackColor.GetHex();
     }
 }
コード例 #2
0
 //============================================================
 // <T>加载主题样式属性。</T>
 //
 // @param property 主题样式属性
 //============================================================
 public void LoadStyleProperty(FTplThemeStyleProperty property)
 {
     if (property == null)
     {
         return;
     }
     _fontName  = property.GetString("font_name");
     _color     = property.GetHex("color", _color);
     _size      = property.GetInteger("size", _size);
     _bold      = property.GetBoolean("bold", _bold);
     _italic    = property.GetBoolean("italic", _italic);
     _underline = property.GetBoolean("underline", _underline);
     _strikeout = property.GetBoolean("strikeout", _strikeout);
 }
コード例 #3
0
ファイル: FRcButton.cs プロジェクト: whztt07/MoCross
 //============================================================
 // <T>加载样式内容。</T>
 //============================================================
 public override void LoadStyleValue()
 {
     // 加载父样式内容
     base.LoadStyleValue();
     // 加载字体
     if (_propertyFont != null)
     {
         _font.LoadStyleProperty(_propertyFont);
     }
     // 加载热点内边框属性
     if (_propertyBorderHoverInner != null)
     {
         _borderHoverInner.LoadStyleProperty(_propertyBorderHoverInner);
     }
     // 加载热点外边框属性
     if (_propertyBorderHoverOuter != null)
     {
         _borderHoverOuter.LoadStyleProperty(_propertyBorderHoverOuter);
     }
     // 加载热点背景颜色属性
     if (_propertyBackHoverColor != null)
     {
         _backHoverColor = _propertyBackHoverColor.GetHex();
     }
     // 加载选中内边框属性
     if (_propertyBorderSelectInner != null)
     {
         _borderSelectInner.LoadStyleProperty(_propertyBorderSelectInner);
     }
     // 加载选中外边框属性
     if (_propertyBorderSelectOuter != null)
     {
         _borderSelectOuter.LoadStyleProperty(_propertyBorderSelectOuter);
     }
     // 加载选中背景颜色属性
     if (_propertyBackSelectColor != null)
     {
         _backSelectColor = _propertyBackSelectColor.GetHex();
     }
 }
コード例 #4
0
 //============================================================
 // <T>加载主题样式属性。</T>
 //
 // @param property 主题样式属性
 //============================================================
 public bool EqualsStyleProperty(FTplThemeStyleProperty property)
 {
     if (property == null)
     {
         return(false);
     }
     if (_fontName != property.GetString("font_name"))
     {
         return(false);
     }
     if (_color != property.GetHex("color", _color))
     {
         return(false);
     }
     if (_size != property.GetInteger("size", _size))
     {
         return(false);
     }
     if (_bold != property.GetBoolean("bold", _bold))
     {
         return(false);
     }
     if (_italic != property.GetBoolean("italic", _italic))
     {
         return(false);
     }
     if (_underline != property.GetBoolean("underline", _underline))
     {
         return(false);
     }
     if (_strikeout != property.GetBoolean("strikeout", _strikeout))
     {
         return(false);
     }
     return(true);
 }