Exemplo n.º 1
0
 //============================================================
 // <T>保存资源。</T>
 //============================================================
 public void SaveResource()
 {
     _font.FontName  = cboFontName.Text;
     _font.Color     = RColor.ParseHex(txtColor.Text);
     _font.Size      = RInt.Parse(txtSize.Text);
     _font.Bold      = chkBold.Checked;
     _font.Italic    = chkItalic.Checked;
     _font.Underline = chkUnderline.Checked;
     _font.Strikeout = chkStrikeout.Checked;
 }
Exemplo n.º 2
0
 //============================================================
 // <T>解析字符串。</T>
 //
 // @param value 字符串
 //============================================================
 public bool Parse(string value)
 {
     if (RString.IsEmpty(value))
     {
         return(false);
     }
     string[] items = value.Split(',');
     if (items.Length == 3)
     {
         _color = RColor.ParseHex(items[0]);
         _width = RInt.Parse(items[1]);
         _style = RUiLineStyle.Parse(items[2]);
     }
     return(false);
 }
Exemplo n.º 3
0
 //============================================================
 // <T>解析字符串。</T>
 //
 // @param value 字符串
 //============================================================
 public bool Parse(string value)
 {
     if (value != null)
     {
         string[] item = value.Split(',');
         if (7 == item.Length)
         {
             _fontName  = (item[0] == "None") ? "" : item[0];
             _color     = RColor.ParseHex(item[1]);
             _size      = RInt.Parse(item[2]);
             _bold      = RBool.IsTrue(item[3]);
             _italic    = RBool.IsTrue(item[4]);
             _strikeout = RBool.IsTrue(item[5]);
             _underline = RBool.IsTrue(item[6]);
         }
     }
     return(false);
 }