Introducing Windows Azure- P41:The cloud platform is getting more and more attractive to the computing world. Today, service-oriented architecture (SOA) and aspect-oriented programming (AOP) techniques are widely used in enterprise solutions. A question an IT management team or a software development team may ask is, what is the next trend going to be? Cloud computing seems to be the right answer. | CHAPTER 6 AZURE .NET SERVICES SERVICE BUS const PixelFormat PIXELFORMAT protected Bitmap bitmap null protected Random random null protected Graphics graphics null protected int shapeWidth 0 protected int shapeHeight 0 protected int drawAreaWidth 0 protected int drawAreaHeight 0 public Shape Panel drawArea if null drawArea 0 0 throw new ArgumentException The draw area must be specified and valid random new Random int bitmap new Bitmap PIXELFORMAT graphics bitmap drawAreaWidth public Bitmap Map get return bitmap public int ShapeWidth get return shapeWidth public int ShapeHeight get return shapeHeight protected int RandomWidth get shapeWidth 0 drawAreaWidth return shapeWidth 193 CHAPTER 6 AZURE .NET SERVICES SERVICE BUS protected int RandomHeight get shapeHeight 0 drawAreaHeight return shapeHeight protected Pen RandomColorPen get return new Pen 0 255 0 255 o 255 endregion region Protected Method protected void Reset if null bitmap this. bitmap .Clear endregion abstract public void Draw A class derived from this base class is responsible for drawing a specific shape. Listing 6-11 shows how to draw a Circle bitmap programmatically on the panel surface. A protected function Reset is called before drawing. This function clears the previously drawn bitmap and sets the bitmap to the background color. When an application needs to draw different shapes on the same panel surface it just needs to dynamically construct a drawing class and pass in the panel object instance. The implementation will be presented later in this exercise. Listing 6-11. Derived Drawing Class Used to Draw a Circle Bitmap on a Panel Surface using System using using using .