コード例 #1
0
        public void InsertChar(string letter, int position, CharOptions options)
        {
            Size letterSize = mFont.SizeText(letter);

            mChars.Insert(position, new TextBoxChar(letter, Color.Empty, letterSize));
            mCurrentWidth += letterSize.Width;
        }
コード例 #2
0
 public TextBoxChar(string charString, Size charSize, CharOptions options)
 {
     Char        = charString;
     CharSize    = charSize;
     CharColor   = options.ForeColor;
     CharOptions = options;
 }
コード例 #3
0
 public TextBoxChar(string charString, Size charSize, CharOptions options)
 {
     Char = charString;
     CharSize = charSize;
     CharColor = options.ForeColor;
     CharOptions = options;
 }
コード例 #4
0
 public void AddChar(string letter, CharOptions options)
 {
     Size letterSize = mFont.SizeText(letter);
     if (letter == "\n")
         letterSize.Width = 0;
     if (mCurrentWidth + letterSize.Width < mMaxWidth) {
         mChars.Add(new TextBoxChar(letter, letterSize, options));
         mCurrentWidth += letterSize.Width;
     }
 }
コード例 #5
0
        public void AddChar(string letter, CharOptions options)
        {
            Size letterSize = mFont.SizeText(letter);

            if (letter == "\n")
            {
                letterSize.Width = 0;
            }
            if (mCurrentWidth + letterSize.Width < mMaxWidth)
            {
                mChars.Add(new TextBoxChar(letter, letterSize, options));
                mCurrentWidth += letterSize.Width;
            }
        }
コード例 #6
0
 public void InsertChar(string letter, int position, CharOptions options)
 {
     Size letterSize = mFont.SizeText(letter);
     mChars.Insert(position, new TextBoxChar(letter, Color.Empty, letterSize));
     mCurrentWidth += letterSize.Width;
 }