Exemplo n.º 1
0
 public void Refresh()
 {
     _currentHotSpots.Clear();
     HotSpots.Clear();
     _parent.AddHotSpots(HotSpots, _control);
     _control.Refresh();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the background image layout.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetBackgroundImageLayout(this TextBoxBase textBoxBase, ImageLayout value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetBackgroundImageLayout(value)));
     }
     else
     {
         textBoxBase.BackgroundImageLayout = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Sets the word wrap.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">if set to <c>true</c> [value].</param>
 public static void SetWordWrap(this TextBoxBase textBoxBase, bool value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetWordWrap(value)));
     }
     else
     {
         textBoxBase.WordWrap = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Sets the color of the back.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetBackColor(this TextBoxBase textBoxBase, Color value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetBackColor(value)));
     }
     else
     {
         textBoxBase.BackColor = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Sets the shortcuts enabled.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">if set to <c>true</c> [value].</param>
 public static void SetShortcutsEnabled(this TextBoxBase textBoxBase, bool value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetShortcutsEnabled(value)));
     }
     else
     {
         textBoxBase.ShortcutsEnabled = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Sets the text.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetText(this TextBoxBase textBoxBase, string value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetText(value)));
     }
     else
     {
         textBoxBase.Text = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// Sets the maximum length.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetMaxLength(this TextBoxBase textBoxBase, int value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetMaxLength(value)));
     }
     else
     {
         textBoxBase.MaxLength = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Sets the selection start.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetSelectionStart(this TextBoxBase textBoxBase, int value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetSelectionStart(value)));
     }
     else
     {
         textBoxBase.SelectionStart = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// Sets the lines.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetLines(this TextBoxBase textBoxBase, IEnumerable <string> value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetLines(value)));
     }
     else
     {
         textBoxBase.Lines = value.ToArray();
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// Sets the accepts tab.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">if set to <c>true</c> [value].</param>
 public static void SetAcceptsTab(this TextBoxBase textBoxBase, bool value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetAcceptsTab(value)));
     }
     else
     {
         textBoxBase.AcceptsTab = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 11
0
 /// <summary>
 /// Sets the hide selection.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">if set to <c>true</c> [value].</param>
 public static void SetHideSelection(this TextBoxBase textBoxBase, bool value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetHideSelection(value)));
     }
     else
     {
         textBoxBase.HideSelection = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// Sets the border style.
 /// </summary>
 /// <param name="textBoxBase">The text box base.</param>
 /// <param name="value">The value.</param>
 public static void SetBorderStyle(this TextBoxBase textBoxBase, BorderStyle value)
 {
     if (textBoxBase.InvokeRequired)
     {
         textBoxBase.BeginInvoke(new MethodInvoker(() => textBoxBase.SetBorderStyle(value)));
     }
     else
     {
         textBoxBase.BorderStyle = value;
         textBoxBase.Refresh();
     }
 }
Exemplo n.º 13
0
        /// <summary>
        /// </summary>
        /// <param name="textOutputControl"></param>
        /// <param name="someString"></param>
        private static void SetControlText
        (
            [CanBeNull] TextBoxBase textOutputControl,
            string someString)
        {
            if (textOutputControl != null)
            {
                textOutputControl.Text           = someString;
                textOutputControl.SelectionStart = textOutputControl.TextLength;
                textOutputControl.ScrollToCaret();

                textOutputControl.Refresh( );
            }
        }