예제 #1
0
        private void HandleShapeChanged(object sender, ShapeEventArgs e)
        {
            Shape s = sender as Shape;

            Console.WriteLine("Received event. Shape area is {0}", e.NewArea);

            s.Draw();
        }
예제 #2
0
 protected override void OnShapeChanged(ShapeEventArgs e)
 {
     // circle specific processing
     base.OnShapeChanged(e);
 }
예제 #3
0
        protected virtual void OnShapeChanged(ShapeEventArgs e)
        {
            var handler = ShapeChanged;

            handler?.Invoke(this, e);
        }
예제 #4
0
 protected override void OnShapeChanged(ShapeEventArgs e)
 {
     // specific rectangle processing
     base.OnShapeChanged(e);
 }