コード例 #1
0
        private void innerTextBox_Leave(object sender, EventArgs e)
        {
            if (innerTextBox.Text != string.Empty)
            {
                if (IsTextEqualEmptyTooltip())
                {
                    innerTextBox.ForeColor = this.EmptyTooltipForeColor;
                }
                else
                {
                    innerTextBox.ForeColor = this.ForeColor;
                }
            }
            else
            {
                innerTextBox.Text      = this.EmptyTooltipText;
                innerTextBox.ForeColor = this.EmptyTooltipForeColor;
                this.BeginInvoke((MethodInvoker) delegate {
                    innerTextBox.UseSystemPasswordChar = false;
                });
            }

            if (ButtonClickWorking)
            {
                return;
            }

            _innerTextBoxState = TextBoxStates.Normal;
            this.Invalidate();
        }
コード例 #2
0
        private void PaddingTextBox_LostFocus(object sender, EventArgs e)
        {
            if (ButtonClickWorking)
            {
                return;
            }

            _innerTextBoxState = TextBoxStates.Normal;
            this.Invalidate();
        }
コード例 #3
0
        private void PaddingTextBox_MouseLeave(object sender, EventArgs e)
        {
            if (ButtonClickWorking)
            {
                return;
            }

            if (!innerTextBox.Focused)
            {
                _innerTextBoxState = TextBoxStates.Normal;
            }

            this.Invalidate();
        }
コード例 #4
0
 protected override void OnEnabledChanged(EventArgs e)
 {
     if (Enabled)
     {
         _innerTextBoxState   = TextBoxStates.Normal;
         innerTextBox.Enabled = true;
     }
     else
     {
         _innerTextBoxState   = TextBoxStates.Disabled;
         innerTextBox.Enabled = false;
     }
     this.Invalidate();
     base.OnEnabledChanged(e);
 }
コード例 #5
0
 private void innerTextBox_GotFocus(object sender, EventArgs e)
 {
     _innerTextBoxState = TextBoxStates.Highlight;
     if (IsTextEqualEmptyTooltip())
     {
         innerTextBox.UseSystemPasswordChar = false;
         innerTextBox.ForeColor             = this.EmptyTooltipForeColor;
     }
     else
     {
         innerTextBox.UseSystemPasswordChar = this.UseSystemPasswordChar;
         innerTextBox.ForeColor             = this.ForeColor;
     }
     this.Invalidate();
 }
コード例 #6
0
        /// <summary>
        /// Draws a TextBox in the specified state, on the specified graphics
        /// surface, and within the specified bounds
        /// </summary>
        /// <param name="g">The Graphics to draw on</param>
        /// <param name="textRect">The Rectangle that represents the dimensions
        /// of the TextBox</param>
        /// <param name="clipRect">The Rectangle that represents the clipping area</param>
        /// <param name="state">A TextBoxStates value that specifies the
        /// state to draw the TextBox in</param>
        public static void DrawTextBox(Graphics g, Rectangle textRect, Rectangle clipRect, TextBoxStates state)
        {
            if (g == null || textRect.Width <= 0 || textRect.Height <= 0 || clipRect.Width <= 0 || clipRect.Height <= 0)
            {
                return;
            }

            if (ThemeManager.VisualStylesEnabled)
            {
                ThemeManager.DrawThemeBackground(g, ThemeClasses.TextBox, (int)TextBoxParts.EditText, (int)state, textRect, clipRect);
            }
            else
            {
                ControlPaint.DrawBorder3D(g, textRect, Border3DStyle.Sunken);
            }
        }
コード例 #7
0
 /// <summary>
 /// Draws a TextBox in the specified state, on the specified graphics
 /// surface, and within the specified bounds
 /// </summary>
 /// <param name="g">The Graphics to draw on</param>
 /// <param name="textRect">The Rectangle that represents the dimensions
 /// of the TextBox</param>
 /// <param name="state">A TextBoxStates value that specifies the
 /// state to draw the TextBox in</param>
 public static void DrawTextBox(Graphics g, Rectangle textRect, TextBoxStates state)
 {
     ThemeManager.DrawTextBox(g, textRect, textRect, state);
 }
コード例 #8
0
		/// <summary>
		/// Draws a TextBox in the specified state, on the specified graphics 
		/// surface, and within the specified bounds
		/// </summary>
		/// <param name="g">The Graphics to draw on</param>
		/// <param name="textRect">The Rectangle that represents the dimensions 
		/// of the TextBox</param>
		/// <param name="clipRect">The Rectangle that represents the clipping area</param>
		/// <param name="state">A TextBoxStates value that specifies the 
		/// state to draw the TextBox in</param>
		public static void DrawTextBox(Graphics g, Rectangle textRect, Rectangle clipRect, TextBoxStates state)
		{
			if (g == null || textRect.Width <= 0 || textRect.Height <= 0 || clipRect.Width <= 0 || clipRect.Height <= 0)
			{
				return;
			}

			if (ThemeManager.VisualStylesEnabled)
			{
				ThemeManager.DrawThemeBackground(g, ThemeClasses.TextBox, (int) TextBoxParts.EditText, (int) state, textRect, clipRect);
			}
			else
			{
				ControlPaint.DrawBorder3D(g, textRect, Border3DStyle.Sunken);
			}
		}
コード例 #9
0
		/// <summary>
		/// Draws a TextBox in the specified state, on the specified graphics 
		/// surface, and within the specified bounds
		/// </summary>
		/// <param name="g">The Graphics to draw on</param>
		/// <param name="textRect">The Rectangle that represents the dimensions 
		/// of the TextBox</param>
		/// <param name="state">A TextBoxStates value that specifies the 
		/// state to draw the TextBox in</param>
		public static void DrawTextBox(Graphics g, Rectangle textRect, TextBoxStates state)
		{
			ThemeManager.DrawTextBox(g, textRect, textRect, state);
		}
コード例 #10
0
 private void innerTextBox_MouseEnter(object sender, EventArgs e)
 {
     _innerTextBoxState = TextBoxStates.Highlight;
     this.Invalidate();
 }