//重载形状改变函数
 protected override void OnSharpChanged(SharpChangedEventArgs e)
 {
     base.OnSharpChanged(e);
 }
 static void Sharp_SharpChanged(object sender, SharpChangedEventArgs e)
 {
     if (sender is Circle) Console.WriteLine("形状变化后圆形面积为{0}", e.Area);
     else if (sender is Rectangle) Console.WriteLine("形状变化后矩形面积为{0}", e.Area);
 }
 //形状改变虚函数
 protected virtual void OnSharpChanged(SharpChangedEventArgs e)
 {
     if (SharpChanged != null) SharpChanged(this, e);//触发形状改变事件
 }