Ejemplo n.º 1
0
        private void OnLeftButtonUp(object sender,
                                    System.Windows.Forms.HtmlElementEventArgs arg)
        {
            System.Windows.Forms.HtmlDocument doc     = (System.Windows.Forms.HtmlDocument)sender;
            System.Windows.Forms.HtmlElement  element = doc.GetElementFromPoint(arg.MousePosition);

            HtmlScreenElementBase button = FindButtonInHtml(element);

            if (null == button)
            {
                System.Windows.Forms.HtmlElement parentElement = element.Parent;
                if (null == parentElement)
                {
                    return;
                }

                button = FindButtonInHtml(parentElement);
                if (null == button)
                {
                    return;
                }
            }

            button.OnLeftMouseUp(sender, arg);
            arg.ReturnValue = true;
        }
Ejemplo n.º 2
0
        private void OnLeftButtonDown(object sender,
                                      System.Windows.Forms.HtmlElementEventArgs arg)
        {
            System.Windows.Forms.HtmlDocument doc     = (System.Windows.Forms.HtmlDocument)sender;
            System.Windows.Forms.HtmlElement  element = doc.GetElementFromPoint(arg.MousePosition);

            HtmlScreenElementBase newFcsElement = FindFocusElement(element);

            if (null != newFcsElement)
            {
                if (m_focusElement != newFcsElement)
                {
                    m_focusElement = newFcsElement;
                    //  ShowHandleInput(true);
                }
                m_focusElement.SetFocus();
            }
            else
            {
                ShowScreenKeyboard(false);
                m_focusElement = null;
                // ShowHandleInput(false);
            }

            HtmlScreenElementBase button = FindButtonInHtml(element);

            if (null == button)
            {
                System.Windows.Forms.HtmlElement parentElement = element.Parent;
                if (null == parentElement)
                {
                    return;
                }

                button = FindButtonInHtml(parentElement);
                if (null == button)
                {
                    return;
                }
            }

            button.OnLeftMouseDown(sender, arg);
            arg.ReturnValue = true;
        }