public WindowImplementation GetWindowImp()
 {
     if (_imp == null)
     {
         if (_windowType == "PM")
         {
             _imp = new PMWindow();
         }
         else
         {
             _imp = new XWindow();
         }
     }
     return(_imp);
 }
        public virtual void DrawRect(Point point1, Point point2)
        {
            WindowImplementation imp = GetWindowImp();

            imp.DeviceRect(new Coordinate(point1.X), new Coordinate(point1.Y), new Coordinate(point2.X), new Coordinate(point2.Y));
        }