Create() public static method

public static Create ( Control targetControl ) : TextBoxWrapper
targetControl System.Windows.Forms.Control
return TextBoxWrapper
Beispiel #1
0
 protected void OnWrapperNeeded(WrapperNeededEventArgs args)
 {
     if (WrapperNeeded != null)
     {
         WrapperNeeded(this, args);
     }
     if (args.Wrapper == null)
     {
         if (args.TargetControl is ScintillaNET.Scintilla)
         {
             args.Wrapper = ScintillaWrapper.Create((ScintillaNET.Scintilla)args.TargetControl);
         }
         else
         {
             args.Wrapper = TextBoxWrapper.Create(args.TargetControl);
         }
     }
 }
Beispiel #2
0
        bool IExtenderProvider.CanExtend(object extendee)
        {
            //find  AutocompleteMenu with lowest hashcode
            if (Container != null)
            {
                if (Container.Components.OfType <AutocompleteMenu>().Any(comp => comp.GetHashCode() < GetHashCode()))
                {
                    return(false);
                }
            }
            //we are main autocomplete menu on form ...
            //check extendee as TextBox
            if (!(extendee is Control))
            {
                return(false);
            }
            var temp = TextBoxWrapper.Create(extendee as Control);

            return(temp != null);
        }