Esempio n. 1
0
 //============================================================
 // <T>存储设置信息</T>
 //
 // @param xconfig 设置信息
 //============================================================
 public override void OnSaveConfig(FXmlNode xconfig)
 {
     base.OnSaveConfig(xconfig);
     // 存储配置
     xconfig.SetNvl("option_visible", _optionVisible);
     xconfig.SetNvl("option_enable", _optionEnable);
     // 保存属性
     if (_dockCd != ERcDock.None)
     {
         xconfig.SetNvl("dock_cd", REnum.ToString(typeof(ERcDock), _dockCd));
     }
     // 存储位置
     if (!_location.IsEmpty())
     {
         xconfig.Set("location", _location.ToString());
     }
     // 存储尺寸
     if (!_size.IsEmpty())
     {
         xconfig.SetNvl("size", _size.ToString());
     }
     // 加载空白
     if (!_margin.IsEmpty())
     {
         xconfig.SetNvl("margin", _margin.ToString());
     }
     if (!_padding.IsEmpty())
     {
         xconfig.SetNvl("padding", _padding.ToString());
     }
     // 存储边框
     if (_propertyBorderInner == null || (_propertyBorderInner != null && !_borderInner.EqualsStyleProperty(_propertyBorderInner)))
     {
         _borderInner.SaveConfig(xconfig, "border_inner");
     }
     if (_propertyBorderOuter == null || (_propertyBorderOuter != null && !_borderOuter.EqualsStyleProperty(_propertyBorderOuter)))
     {
         _borderOuter.SaveConfig(xconfig, "border_outer");
     }
     // 保存前景资源
     if ((_propertyForeColor == null) || (_propertyForeColor != null && _foreColor != _propertyForeColor.GetHex()))
     {
         xconfig.Set("fore_color", RColor.FormatHtml(_foreColor));
     }
     _foreResource.SaveConfig(xconfig, "fore");
     // 保存后景资源
     if ((_propertyBackColor == null) || (_propertyBackColor != null && _backColor != _propertyBackColor.GetHex()))
     {
         xconfig.Set("back_color", RColor.FormatHtml(_backColor));
     }
     _backResource.SaveConfig(xconfig, "back");
     // 存储事件
     xconfig.SetNvl("on_click", _onClick);
     xconfig.SetNvl("on_double_click", _onDoubleClick);
     xconfig.SetNvl("on_mouse_down", _onMouseDown);
     xconfig.SetNvl("on_mouse_up", _onMouseUp);
     xconfig.SetNvl("on_mouse_enter", _onMouseEnter);
     xconfig.SetNvl("on_mouse_move", _onMouseMove);
     xconfig.SetNvl("on_mouse_leave", _onMouseLeave);
 }
Esempio n. 2
0
        //============================================================
        // <T>获得字符串内容。</T>
        //
        // @return 字符串内容
        //============================================================
        public override string ToString()
        {
            string resule = "";

            resule += RColor.FormatHtml(_color);
            resule += "," + _width;
            resule += "," + _style.ToString();
            return(resule);
        }
Esempio n. 3
0
 //============================================================
 // <T>加载资源。</T>
 //
 // @param resource 资源
 //============================================================
 public void LoadResource(FRcFont font)
 {
     _font                = font;
     cboFontName.Text     = _font.FontName;
     txtColor.Text        = RColor.FormatHtml(_font.Color);
     txtSize.Text         = _font.Size.ToString();
     chkBold.Checked      = _font.Bold;
     chkItalic.Checked    = _font.Italic;
     chkUnderline.Checked = _font.Underline;
     chkStrikeout.Checked = _font.Strikeout;
 }
Esempio n. 4
0
        //============================================================
        // <T>获得字符串内容。</T>
        //
        // @return 字符串内容
        //============================================================
        public override string ToString()
        {
            string result = (_fontName == "" || _fontName == null) ? "None" : _fontName;

            result += "," + RColor.FormatHtml(_color);
            result += "," + _size;
            result += "," + _bold;
            result += "," + _italic;
            result += "," + _strikeout;
            result += "," + _underline;
            return(result);
        }