Ejemplo n.º 1
0
        public ScTextBox(ScMgr scmgr = null)
            : base(scmgr)
        {
            Type = "ScTextBoxEx";

            textBox           = new ScTextViewBox(scmgr);
            textBox.ForeColor = Color.Black;
            ForeFont          = new D2DFont("微软雅黑", 12, SharpDX.DirectWrite.FontWeight.Regular);
            textBox.TextViewLostFocusEvent += TextBox_TextViewLostFocusEvent;
            Add(textBox);

            SizeChanged += ScTextBox_SizeChanged;
            D2DPaint    += ScTextBoxEx_D2DPaint;

            textBox.TextViewKeyDownEvent += TextBox_TextViewKeyDownEvent;
            textBox.ValueChangedEvent    += TextBox_ValueChangedEvent;
        }
Ejemplo n.º 2
0
Archivo: ScLabel.cs Proyecto: lypvc/Sc
 public ScLabel(ScMgr scmgr)
     : base(scmgr)
 {
     foreFont  = new D2DFont("微软雅黑", 12, SharpDX.DirectWrite.FontWeight.Regular);
     D2DPaint += ScLabel_D2DPaint;
 }