Example #1
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            WpfEventArgs args = new WpfEventArgs();

            args.OutputValue = textBox.Text;
            args.Button      = "OK";

            OnOkButtonClick?.Invoke(this, args);
        }
Example #2
0
        private void OnWpfOkButtonClick(object sender, EventArgs e)
        {
            WpfEventArgs args = (WpfEventArgs)e;

            if (args.Button.Equals("OK"))
            {
                Result      = DialogResult.OK;
                OutputValue = args.OutputValue;
                Hide();
            }
        }