protected override int Initialise( )
        {
            m_HasGWFL = false;
            m_PerspectiveView = false;
            Application.Idle += delegate { Invalidate( ); };

            m_Scale = 1.0f;
            m_XDelta = 0.0f;
            m_YDelta = 0.0f;
            m_ZDelta = 0.0f;

            m_Grid = new Grid( this.GraphicsDevice );
            m_Grid.Create( m_ViewPlane, 1000, 1000, 10.0f, 0.0f,
                new Color( 32, 32, 128 ), 10, Color.Blue );

            MenuItem [ ] ViewportMenu = new MenuItem[ 1 ];
            ViewportMenu[ 0 ] = new MenuItem( "Change Viewport" );

            MenuItem [ ] ViewportSubMenu = new MenuItem[ 3 ];
            ViewportSubMenu[ 0 ] = new MenuItem( "Front",
                ViewportSubMenu_Front_Click );
            ViewportSubMenu[ 1 ] = new MenuItem( "Side",
                ViewportSubMenu_Side_Click );
            ViewportSubMenu[ 2 ] = new MenuItem( "Top",
                ViewportSubMenu_Top_Click );

            for( int i = 0; i < 3; ++i )
            {
                ViewportMenu[ 0 ].MenuItems.Add( ViewportSubMenu[ i ] );
            }
            m_ContextMenu = new ContextMenu( ViewportMenu );

            this.ContextMenu = m_ContextMenu;

            m_Effect = new BasicEffect( GraphicsDevice );

            m_ScreenRender = new RenderTarget2D( GraphicsDevice, this.Width, this.Height );
            m_SpriteBatch = new SpriteBatch( this.GraphicsDevice );

            return 0;
        }
        protected override int Initialise( )
        {
            m_HasGWFL = false;
            m_PerspectiveView = true;
            Application.Idle += delegate { Invalidate( ); };

            m_ClearColour = Microsoft.Xna.Framework.Color.Black;

            m_Grid = new Grid( this.GraphicsDevice );
            m_Grid.Create( VIEWPLANE.VIEWPLANE_XZ, 100, 100, 100.0f, 0.0f,
                new Color( 32, 32, 128 ), 10, Color.Blue );

            MenuItem [ ] PerspectiveMenu = new MenuItem[ 2 ];
            PerspectiveMenu[ 0 ] = new MenuItem( "Live Edit" );

            MenuItem [ ] LiveMenu = new MenuItem[ 2 ];
            LiveMenu[ 0 ] = new MenuItem( "Connect", LiveSubMenu_Connect );
            LiveMenu[ 1 ] = new MenuItem( "Disconnect",
                LiveSubMenu_Disconnect );

            for( int i = 0; i < 2; ++i )
            {
                PerspectiveMenu[ 0 ].MenuItems.Add( LiveMenu[ i ] );
            }

            PerspectiveMenu[ 1 ] = new MenuItem( "Change Clear Colour",
                ClearColour_ClickHandle );
            this.ContextMenu = new ContextMenu( PerspectiveMenu );

            m_ColourPicker = new ColorDialog( );

            m_SpriteBatch = new SpriteBatch( this.GraphicsDevice );

            m_ScreenRender = new RenderTarget2D( this.GraphicsDevice,
                this.Width, this.Height );

            m_AspectRatio = ( float )Width / ( float )Height;

            m_PacketWriter = new PacketWriter( );

            m_Connected = false;

            m_Effect = new BasicEffect( GraphicsDevice );

            m_Effect.LightingEnabled = false;
            m_Effect.VertexColorEnabled = true;
            m_MiddleButtonDown = false;

            m_CameraPosition = new Vector3( 0.0f, 100.0f, 100.0f );
            m_CameraLookAt = Vector3.Zero;
            m_Orbiting = m_Dollying = m_Panning = false;

            m_Orientation = new Quaternion( );

            m_CameraPositionTemp = m_CameraPosition;

            return 0;
        }