コード例 #1
0
        public GTextField()
            : base()
        {
            _textFormat = new TextFormat();
            _textFormat.font = UIConfig.defaultFont;
            _textFormat.size = 12;
            _textFormat.color = Color.black;
            _textFormat.lineSpacing = 3;
            _textFormat.letterSpacing = 0;

            TextFormat tf = _textField.textFormat;
            tf.CopyFrom(_textFormat);
            _textField.textFormat = tf;

            _text = string.Empty;
            _autoSize = AutoSizeType.Both;
            _widthAutoSize = true;
            _heightAutoSize = true;
            _textField.autoSize = true;
            _textField.wordWrap = false;

            gearColor = new GearColor(this);

            onFocusIn = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged = new EventListener(this, "onChanged");
        }
コード例 #2
0
        public GTextField()
            : base()
        {
            _textFormat               = new TextFormat();
            _textFormat.font          = UIConfig.defaultFont;
            _textFormat.size          = 12;
            _textFormat.color         = Color.black;
            _textFormat.lineSpacing   = 3;
            _textFormat.letterSpacing = 0;

            TextFormat tf = _textField.textFormat;

            tf.CopyFrom(_textFormat);
            _textField.textFormat = tf;

            _text               = string.Empty;
            _autoSize           = AutoSizeType.Both;
            _widthAutoSize      = true;
            _heightAutoSize     = true;
            _textField.autoSize = true;
            _textField.wordWrap = false;

            gearColor = new GearColor(this);

            onFocusIn  = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged  = new EventListener(this, "onChanged");
        }
コード例 #3
0
ファイル: GTextField.cs プロジェクト: qutin/github-kgui-qutin
        public GTextField() : base()
        {
            _fontSize      = 12;
            _align         = AlignType.Left;
            _verticalAlign = VertAlignType.Top;
            _text          = "";
            _leading       = 3;

            _autoSize       = AutoSizeType.Both;
            _widthAutoSize  = true;
            _heightAutoSize = true;


            gearColor = new GearColor(this);

            //
            onFocusIn  = new EventListener(this, "onFocusIn");
            onFocusOut = new EventListener(this, "onFocusOut");
            onChanged  = new EventListener(this, "onChanged");
        }
コード例 #4
0
        public GTextField()
            : base()
        {
            _textFormat               = new TextFormat();
            _textFormat.font          = UIConfig.defaultFont;
            _textFormat.size          = 12;
            _textFormat.color         = Color.black;
            _textFormat.lineSpacing   = 3;
            _textFormat.letterSpacing = 0;

            TextFormat tf = _textField.textFormat;

            tf.CopyFrom(_textFormat);
            _textField.textFormat = tf;

            _text               = string.Empty;
            _autoSize           = AutoSizeType.Both;
            _widthAutoSize      = true;
            _heightAutoSize     = true;
            _textField.autoSize = true;
            _textField.wordWrap = false;
        }
コード例 #5
0
ファイル: FRichText.cs プロジェクト: cnscj/THSTG
 public void SetAutoSize(AutoSizeType type)
 {
     _obj.asRichTextField.autoSize = type;
 }
コード例 #6
0
        override public void Setup_BeforeAdd(XML xml)
        {
            base.Setup_BeforeAdd(xml);

            string str;

            this.displayAsPassword = xml.GetAttributeBool("password", false);
            str = xml.GetAttribute("font");
            if (str != null)
            {
                _textFormat.font = str;
            }

            str = xml.GetAttribute("fontSize");
            if (str != null)
            {
                _textFormat.size = int.Parse(str);
            }

            str = xml.GetAttribute("color");
            if (str != null)
            {
                _textFormat.color = ToolSet.ConvertFromHtmlColor(str);
            }

            str = xml.GetAttribute("align");
            if (str != null)
            {
                _align = FieldTypes.ParseAlign(str);
            }

            str = xml.GetAttribute("vAlign");
            if (str != null)
            {
                _verticalAlign = FieldTypes.ParseVerticalAlign(str);
            }

            str = xml.GetAttribute("leading");
            if (str != null)
            {
                _textFormat.lineSpacing = int.Parse(str);
            }

            str = xml.GetAttribute("letterSpacing");
            if (str != null)
            {
                _textFormat.letterSpacing = int.Parse(str);
            }

            _ubbEnabled = xml.GetAttributeBool("ubb", false);

            str = xml.GetAttribute("autoSize");
            if (str != null)
            {
                this.autoSize = FieldTypes.ParseAutoSizeType(str);
            }

            _textFormat.underline = xml.GetAttributeBool("underline", false);
            _textFormat.italic    = xml.GetAttributeBool("italic", false);
            _textFormat.bold      = xml.GetAttributeBool("bold", false);
            _singleLine           = xml.GetAttributeBool("singleLine", false);
            str = xml.GetAttribute("strokeColor");
            if (str != null)
            {
                _strokeColor = ToolSet.ConvertFromHtmlColor(str);
                _stroke      = true;
            }
        }
コード例 #7
0
 /// <summary>
 /// Tests a bitflagged enumeration to see if 'isModeSet's flags are set in currentMode.
 /// </summary>
 /// <param name="currentMode">The current value of the enumeration which you desire to test</param>
 /// <param name="isModeSet"></param>
 /// <returns></returns>
 protected static bool FlagIsSet(AutoSizeType currentMode, AutoSizeType isModeSet)
 {
     return((currentMode & isModeSet) == isModeSet);
 }