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