Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 public View(FindControl control)
 {
     _control = control;
 }
 private void OpenFindWindow(NiFindOptions options)
 {
     FindControl.Show(Site, ActiveTextAreaControl.TextArea, options, NiFindOptions.ActionMask, FindTarget);
 }
Beispiel #5
0
 public View(FindControl control)
 {
     _control = control;
 }