/// <summary>
        /// Returns a default setup for the UserSettings
        /// </summary>
        public static UserSettings DefaultSettings( )
        {
            UserSettings settings = new UserSettings( );

            settings.ServerIpHistory.Add( new RemoteHostAddress( ) );
            settings.SceneFileHistory.Add( "scene0.components.xml" );
            settings.InputFileHistory.Add( "testCommandInputs0.components.xml" );
            settings.ViewerFileHistory.Add( "viewerSetup0.components.xml" );

            return settings;
        }
        public ControlPanelForm( )
        {
            //	Display a log viewer
            LogViewer viewer = new LogViewer( );
            viewer.Show( );

            //	Write greeting
            AppLog.Info( "Beginning Rb.TestApp at {0}", DateTime.Now );
            AppLog.GetSource( Severity.Info ).WriteEnvironment( );

            //	Load the rendering assembly
            string renderAssembly = ConfigurationManager.AppSettings[ "renderAssembly" ];
            if ( renderAssembly == null )
            {
                renderAssembly = "Rb.Rendering.OpenGl.Windows";
            }
            RenderFactory.Load( renderAssembly );

            //	Load resource settings
            string resourceSetupPath = ConfigurationManager.AppSettings[ "resourceSetupPath" ];
            if ( resourceSetupPath == null )
            {
                resourceSetupPath = "../resourceSetup.xml";
            }
            ResourceManager.Instance.Setup( resourceSetupPath );

            //	Create the test and camera command lists (must come before scene creation, because it's referenced
            //	by the scene setup file)
            CommandList.FromEnum( typeof( TestCommands ) );
            CommandList.FromEnum( typeof( CameraCommands ) );

            //	Load user settings
            m_Settings = UserSettings.Load( );

            InitializeComponent( );

            //	Set transparency key in button images
            Color transparent = Color.FromArgb( 0xff, 0x00, 0xff );
            ( ( Bitmap )editServerIpAddressButton.Image ).MakeTransparent( transparent );
            ( ( Bitmap )browseSceneFileButton.Image ).MakeTransparent( transparent );
            ( ( Bitmap )browseInputFileButton.Image ).MakeTransparent( transparent );
            ( ( Bitmap )browseViewerFileButton.Image ).MakeTransparent( transparent );

            //	Add resource providers to the resource provider combo
            foreach ( ResourceProvider provider in ResourceManager.Instance.Providers )
            {
                resourceProviderCombo.Items.Add( provider );
            }
            resourceProviderCombo.SelectedIndex = 0;

            //	Populate the control panel with the user settings
            sceneFileCombo.Items.AddRange( m_Settings.SceneFileHistory.ToArray( ) );
            inputFileCombo.Items.AddRange( m_Settings.InputFileHistory.ToArray( ) );
            viewerFileCombo.Items.AddRange( m_Settings.ViewerFileHistory.ToArray( ) );
            serverIpCombo.Items.AddRange( m_Settings.ServerIpHistory.ToArray( ) );

            sceneFileCombo.SelectedIndex = 0;
            inputFileCombo.SelectedIndex = 0;
            serverIpCombo.SelectedIndex = 0;
            viewerFileCombo.SelectedIndex = 0;
        }