Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     EnterNameFormOkPressedArgs args = new EnterNameFormOkPressedArgs(textBox1.Text);
     if (OkPressed != null)
         OkPressed(this, args);
     if (!args.Cancel)
     {
         this.DialogResult = System.Windows.Forms.DialogResult.OK;
         Close();
     }
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            EnterNameFormOkPressedArgs args = new EnterNameFormOkPressedArgs(textBox1.Text);

            if (OkPressed != null)
            {
                OkPressed(this, args);
            }
            if (!args.Cancel)
            {
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                Close();
            }
        }