public virtual void OnTextChanging(ref string text)
        {
            // Darren - Limit the number of characters. Eat everything over limit.
            if (currentTB.LimitText > 0)
            {
                if (text?.Length > currentTB.LimitText)
                {
                    text = text.Substring(0, currentTB.LimitText);
                }
                else if (currentTB.TextLength + text?.Length > currentTB.LimitText)
                {
                    text = string.Empty;
                }
            }

            if (TextChanging != null)
            {
                var args = new TextChangingEventArgs()
                {
                    InsertingText = text
                };
                TextChanging(this, args);
                text = args.InsertingText;
                if (args.Cancel)
                {
                    text = string.Empty;
                }
            }
            ;
        }
Beispiel #2
0
 internal void OnTextChanging(ref string text)
 {
     if (TextChanging != null)
     {
         var args = new TextChangingEventArgs()
         {
             InsertingText = text
         };
         TextChanging(this, args);
         text = args.InsertingText;
     }
     ;
 }
Beispiel #3
0
 public virtual void OnTextChanging(ref string text)
 {
     if (TextChanging != null)
     {
         var args = new TextChangingEventArgs {
             InsertingText = text
         };
         TextChanging(this, args);
         text = args.InsertingText;
         if (args.Cancel)
         {
             text = string.Empty;
         }
     }
 }
Beispiel #4
0
        internal void OnTextChanging(ref String text)
        {
            if (TextChanging != null)
            {
                var args = new TextChangingEventArgs()
                {
                    InsertingText = text
                };
                TextChanging(this, args);
                text = args.InsertingText;

                if (args.Cancel)
                {
                    text = String.Empty;
                }
            }
            ;
        }
Beispiel #5
0
 private void code_TextChanging(object sender, FastColoredTextBoxNS.TextChangingEventArgs e)
 {
 }
Beispiel #6
0
 void fctbDocument_TextChanging(object sender, FastColoredTextBoxNS.TextChangingEventArgs e)
 {
     // throw new NotImplementedException();
 }