Exemple #1
0
        private void body_OnClick(object sender, EventArgs e)
        {
            BubblingEventArgs bargs = HTMLUIControl.GetBublingEventArgs(e);
            BaseElement       elem  = bargs.RootSender as BaseElement;

            if (elem != null && elem is INPUTElementImpl)
            {
                if (elem.ID == "Button1")
                {
                    this.label1.Text = "Button 1 clicked";
                }
                else if (elem.ID == "Button2")
                {
                    this.label1.Text = "Button 2 clicked";
                }
                else if (elem.ID == "Button3")
                {
                    this.label1.Text = "Button 3 clicked";
                }
                else if (elem.ID == "Button4")
                {
                    this.label1.Text = "Button 4 clicked";
                }
            }
        }
Exemple #2
0
        private void body_MouseLeave(object sender, EventArgs e)
        {
            BubblingEventArgs bargs = HTMLUIControl.GetBublingEventArgs(e);
            BaseElement       elem  = bargs.RootSender as BaseElement;

            if (elem != null && elem is INPUTElementImpl && checkBox1.Checked == true)
            {
                if (elem.ID == "Button1")
                {
                    this.label1.Text = "Mouse just left Button 1";
                }
                else if (elem.ID == "Button2")
                {
                    this.label1.Text = "Mouse just left Button 2";
                }
                else if (elem.ID == "Button3")
                {
                    this.label1.Text = "Mouse just left Button 3";
                }
                else if (elem.ID == "Button4")
                {
                    this.label1.Text = "Mouse just left Button 4";
                }
            }
        }
Exemple #3
0
        private void ElementClick(object sender, EventArgs e)
        {
            BubblingEventArgs barg = HTMLUIControl.GetBublingEventArgs(e);
            BaseElement       elem = barg.RootSender as BaseElement;

            if (elem.Name == "p" && formatOrange != null)
            {
                if (radioButton1.Checked == true)
                {
                    elem.Format = formatOrange;
                }
                if (radioButton2.Checked == true)
                {
                    elem.Format = formatGreen;
                }
                else if (radioButton1.Checked == false && radioButton2.Checked == false)
                {
                    MessageBox.Show("Check any of the test Boxes to show the Format");
                }
                this.label1.Text = elem.Format.Name.ToString() + ":\n" + elem.Format.Font.ToString() + elem.Format.BackgroundColor.ToString();
            }
        }