Example #1
0
File: Form1.cs Project: Gwee/csharp
        private void Form_event_From_User(object sender, myEventArgs e)
        {
            if (this.Text == "Button")
            {
                button_UC          = e.UC;
                button_labelWidth  = this.labelWidth;
                button_labelHeight = this.labelHeight;
                button_isRed       = this.checkBoxRed.Checked;
                button_isGreen     = this.checkBoxGreen.Checked;
                button_isBlue      = this.checkBoxBlue.Checked;
            }
            else
            {
                label_UC          = e.UC;
                label_labelWidth  = this.labelWidth;
                label_labelHeight = this.labelHeight;
                label_isRed       = this.checkBoxRed.Checked;
                label_isGreen     = this.checkBoxGreen.Checked;
                label_isBlue      = this.checkBoxBlue.Checked;
            }
            counterEvents++;

            if (counterEvents == 2)
            {
                Action();
            }
        }
Example #2
0
        private void UserControl1_Click(object sender, EventArgs e)
        {
            myEventArgs myEventArgs_temp = new myEventArgs();

            myEventArgs_temp.UC = this;

            if (event_From_User != null)
            {
                event_From_User(this, myEventArgs_temp);
            }
        }