示例#1
0
        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;
                }
            }
            ;
        }
示例#2
0
 internal void OnTextChanging(ref string text)
 {
     if (TextChanging != null)
     {
         var args = new TextChangingEventArgs()
         {
             InsertingText = text
         };
         TextChanging(this, args);
         text = args.InsertingText;
     }
     ;
 }
示例#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;
         }
     }
 }
示例#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;
                }
            }
            ;
        }
示例#5
0
 private void code_TextChanging(object sender, FastColoredTextBoxNS.TextChangingEventArgs e)
 {
 }
示例#6
0
 void fctbDocument_TextChanging(object sender, FastColoredTextBoxNS.TextChangingEventArgs e)
 {
     // throw new NotImplementedException();
 }