Beispiel #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            var sc = new DelegateCallbackSampleClass(DoSomethingAction, DoOtherThingAction);

            sc.DoSomething();
            _messageBoxService.ShowMessage(sc.DoOtherThing(2).ToString());
        }
Beispiel #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            var sc = new DelegateCallbackSampleClass(
                () => MessageBox.Show("tralalala"),
                d =>
            {
                MessageBox.Show((2 * d).ToString());
                return(3 * d);
            }
                );

            sc.DoSomething();
            _messageBoxService.ShowMessage(sc.DoOtherThing(2).ToString());
        }
Beispiel #3
0
 private void button4_Click(object sender, EventArgs e)
 {
     var sc = new DelegateCallbackSampleClass(
         () => MessageBox.Show("tralalala"),
         d =>
             {
                 MessageBox.Show((2 * d).ToString());
                 return 3 * d;
             }
         );
     sc.DoSomething();
     _messageBoxService.ShowMessage(sc.DoOtherThing(2).ToString());
 }
Beispiel #4
0
 private void button3_Click(object sender, EventArgs e)
 {
     var sc = new DelegateCallbackSampleClass(DoSomethingAction, DoOtherThingAction);
     sc.DoSomething();
     _messageBoxService.ShowMessage(sc.DoOtherThing(2).ToString());
 }