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

            sc.DoSomething();
            _messageBoxService.ShowMessage(sc.DoOtherThing(2).ToString());
        }
Esempio n. 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());
        }
Esempio n. 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());
 }
Esempio n. 4
0
 private void button3_Click(object sender, EventArgs e)
 {
     var sc = new DelegateCallbackSampleClass(DoSomethingAction, DoOtherThingAction);
     sc.DoSomething();
     _messageBoxService.ShowMessage(sc.DoOtherThing(2).ToString());
 }