public static void Show(IServiceProvider serviceProvider, Control parent, NiFindOptions options, NiFindOptions optionsMask, INiFindTarget findTarget) { if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } if (parent == null) { throw new ArgumentNullException("parent"); } if (findTarget == null) { throw new ArgumentNullException("findTarget"); } var control = parent.Controls.OfType <FindControl>().SingleOrDefault(); if (control == null) { control = new FindControl { Anchor = AnchorStyles.Right, Site = new SiteProxy(serviceProvider) }; control.Left = parent.ClientSize.Width - control.Width; parent.Controls.Add(control); } control._findManager.FindTarget = findTarget; control._findManager.SetOptions(options, optionsMask); control._findWhat.Focus(); }
public static void Show(IServiceProvider serviceProvider, Control parent, NiFindOptions options, NiFindOptions optionsMask, INiFindTarget findTarget) { if (serviceProvider == null) throw new ArgumentNullException("serviceProvider"); if (parent == null) throw new ArgumentNullException("parent"); if (findTarget == null) throw new ArgumentNullException("findTarget"); var control = parent.Controls.OfType<FindControl>().SingleOrDefault(); if (control == null) { control = new FindControl { Anchor = AnchorStyles.Right, Site = new SiteProxy(serviceProvider) }; control.Left = parent.ClientSize.Width - control.Width; parent.Controls.Add(control); } control._findManager.FindTarget = findTarget; control._findManager.SetOptions(options, optionsMask); control._findWhat.Focus(); }
public View(FindControl control) { _control = control; }
private void OpenFindWindow(NiFindOptions options) { FindControl.Show(Site, ActiveTextAreaControl.TextArea, options, NiFindOptions.ActionMask, FindTarget); }