/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
 */
void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event )
{
    wxString url;
    wxString command;
    wxFileName fileName( FindKicadFile( wxT( "freeroute.jnlp" ) ), wxPATH_UNIX );

    if( fileName.FileExists() )
    {
        wxString javaWebStartCommand = wxT( "javaws" );

        // Find the Java web start application on Windows.
#ifdef __WINDOWS__
        // If you thought the registry was brain dead before, now you have to deal with
        // accessing it in either 64 or 32 bit mode depending on the build version of
        // Windows and the build version of KiCad.

        // This key works for 32 bit Java on 32 bit Windows and 64 bit Java on 64 bit Windows.
        wxRegKey key( wxRegKey::HKLM, wxT( "SOFTWARE\\JavaSoft\\Java Web Start" ),
                      wxIsPlatform64Bit() ? wxRegKey::WOW64ViewMode_64 :
                      wxRegKey::WOW64ViewMode_Default );

        // It's possible that 32 bit Java is installed on 64 bit Windows.
        if( !key.Exists() && wxIsPlatform64Bit() )
            key.SetName( wxRegKey::HKLM, wxT( "SOFTWARE\\Wow6432Node\\JavaSoft\\Java Web Start" ) );

        if( !key.Exists() )
        {
            ::wxMessageBox( _( "It appears that the Java run time environment is not "
                               "installed on this computer.  Java is required to use "
                               "FreeRoute." ),
                            _( "Pcbnew Error" ), wxOK | wxICON_ERROR );
            return;
        }

        key.Open( wxRegKey::Read );

        // Get the current version of java installed to determine the executable path.
        wxString value;
        key.QueryValue( wxT( "CurrentVersion" ), value );
        key.SetName( key.GetName() + wxT( "\\" ) + value );
        key.QueryValue( wxT( "Home" ), value );
        javaWebStartCommand = value + wxFileName::GetPathSeparator() + javaWebStartCommand;
#endif

        // Wrap FullFileName in double quotes in case it has C:\Program Files in it.
        // The space is interpreted as an argument separator.
        command << javaWebStartCommand << wxChar( ' ' ) << wxChar( '"' )
                << fileName.GetFullPath() << wxChar( '"' );
        ProcessExecute( command );
        return;
    }

    url = m_FreerouteURLName->GetValue() + wxT( "/java/freeroute.jnlp" );

    wxLaunchDefaultBrowser( url );
}
Exemplo n.º 2
0
long GetMSWViewFlags(wxRegKey::WOW64ViewMode viewMode)
{
    long samWOW64ViewMode = 0;

    switch ( viewMode )
    {
        case wxRegKey::WOW64ViewMode_32:
#ifdef __WIN64__    // the flag is only needed by 64 bit apps
            samWOW64ViewMode = KEY_WOW64_32KEY;
#endif // Win64
            break;

        case wxRegKey::WOW64ViewMode_64:
#ifndef __WIN64__   // the flag is only needed by 32 bit apps
            // 64 bit registry can only be accessed under 64 bit platforms
            if ( wxIsPlatform64Bit() )
                samWOW64ViewMode = KEY_WOW64_64KEY;
#endif // Win32
            break;

        default:
            wxFAIL_MSG("Unknown registry view.");
            // fall through

        case wxRegKey::WOW64ViewMode_Default:
            // Use default registry view for the current application,
            // i.e. 32 bits for 32 bit ones and 64 bits for 64 bit apps
            ;
    }

    return samWOW64ViewMode;
}
Exemplo n.º 3
0
wxString CUpdater::GetUrl()
{
	wxString host = CBuildInfo::GetHostname();
	if (host.empty())
		host = _T("unknown");

	wxString version(PACKAGE_VERSION, wxConvLocal);
	version.Replace(_T(" "), _T("%20"));

	wxString url = wxString::Format(_T("https://update.filezilla-project.org/update.php?platform=%s&version=%s"), host, version);
#if defined(__WXMSW__) || defined(__WXMAC__)
	// Makes not much sense to submit OS version on Linux, *BSD and the likes, too many flavours.
	wxString osVersion = wxString::Format(_T("&osversion=%d.%d"), wxPlatformInfo::Get().GetOSMajorVersion(), wxPlatformInfo::Get().GetOSMinorVersion());
	url += osVersion;
#endif

#ifdef __WXMSW__
	if (wxIsPlatform64Bit())
		url += _T("&osarch=64");
	else
		url += _T("&osarch=32");
#endif

#ifdef HAVE_CPUID
	url += _T("&cpuid=") + GetCPUCaps();
#endif

	return url;
}
Exemplo n.º 4
0
void wxPlatformInfo::InitForCurrentPlatform()
{
    m_initializedForCurrentPlatform = true;

    // autodetect all informations
    const wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
    if ( !traits )
    {
        wxFAIL_MSG( wxT("failed to initialize wxPlatformInfo") );

        m_port = wxPORT_UNKNOWN;
        m_usingUniversal = false;
        m_tkVersionMajor =
                m_tkVersionMinor = 0;
    }
    else
    {
        m_port = traits->GetToolkitVersion(&m_tkVersionMajor, &m_tkVersionMinor);
        m_usingUniversal = traits->IsUsingUniversalWidgets();
        m_desktopEnv = traits->GetDesktopEnvironment();
    }

    m_os = wxGetOsVersion(&m_osVersionMajor, &m_osVersionMinor);
    m_osDesc = wxGetOsDescription();
    m_endian = wxIsPlatformLittleEndian() ? wxENDIAN_LITTLE : wxENDIAN_BIG;
    m_arch = wxIsPlatform64Bit() ? wxARCH_64 : wxARCH_32;

#ifdef __LINUX__
    m_ldi = wxGetLinuxDistributionInfo();
#endif
    // else: leave m_ldi empty
}
Exemplo n.º 5
0
void ConfigManager::InitPaths()
{
    ConfigManager::config_folder = ConfigManager::GetUserDataFolder();
    ConfigManager::home_folder = wxStandardPathsBase::Get().GetUserConfigDir();
    ConfigManager::app_path = ::DetermineExecutablePath();
    wxString res_path = ::DetermineResourcesPath();

    // if non-empty, the app has overriden it (e.g. "--prefix" was passed in the command line)
    if (data_path_global.IsEmpty())
    {
        if (platform::windows)
            ConfigManager::data_path_global = app_path + _T("\\share\\codeblocks");
        else if (platform::macosx)
            ConfigManager::data_path_global = res_path + _T("/share/codeblocks");
        else
            ConfigManager::data_path_global = wxStandardPathsBase::Get().GetDataDir();
    }
    else
        ConfigManager::data_path_global = UnixFilename(data_path_global);

#ifdef CB_AUTOCONF
    if (plugin_path_global.IsEmpty())
    {
        if (platform::windows || platform::macosx)
            ConfigManager::plugin_path_global = data_path_global;
        else
        {
            // It seems we can not longer rely on wxStandardPathsBase::Get().GetPluginsDir(),
            // because its behaviour has changed on some systems (at least Fedora 14 64-bit).
            // So we create the pathname manually
            ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallPrefix() + _T("/lib/codeblocks/plugins");
            // first assume, we use standard-paths
            if (!wxDirExists(ConfigManager::plugin_path_global) && wxIsPlatform64Bit())
            {
                // if standard-path does not exist and we are on 64-bit system, use lib64 instead
                ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallPrefix() + _T("/lib64/codeblocks/plugins");
            }
        }
    }
#endif

    wxString dataPathUser = ConfigManager::config_folder + wxFILE_SEP_PATH + _T("share");
#ifdef __linux__
    if (!has_alternate_user_data_path)
      dataPathUser = wxString::FromUTF8(g_build_filename (g_get_user_data_dir(), NULL));
#endif // __linux__

    ConfigManager::data_path_user = dataPathUser + wxFILE_SEP_PATH + _T("codeblocks");

    CreateDirRecursively(ConfigManager::config_folder);
    CreateDirRecursively(ConfigManager::data_path_user   + _T("/plugins/"));
    CreateDir(ConfigManager::data_path_user   + _T("/scripts/"));

    ConfigManager::temp_folder = wxStandardPathsBase::Get().GetTempDir();
}
Exemplo n.º 6
0
CUpdateWizard::CUpdateWizard(wxWindow* pParent)
	: m_parent(pParent)
{
	m_pEngine = new CFileZillaEngine;

	m_update_options = new CUpdateWizardOptions();

	m_pEngine->Init(this, m_update_options);

	m_inTransfer = false;
	m_skipPageChanging = false;
	m_currentPage = 0;

	wxString host = CBuildInfo::GetHostname();
	if (host == _T(""))
		host = _T("unknown");

	wxString version(PACKAGE_VERSION, wxConvLocal);
	version.Replace(_T(" "), _T("%20"));
	m_urlProtocol = HTTPS;
	m_urlServer = _T("update.filezilla-project.org");
	m_urlFile = wxString::Format(_T("/updatecheck.php?platform=%s&version=%s"), host.c_str(), version.c_str());
#if defined(__WXMSW__) || defined(__WXMAC__)
	// Makes not much sense to submit OS version on Linux, *BSD and the likes, too many flavours.
	wxString osVersion = wxString::Format(_T("&osversion=%d.%d"), wxPlatformInfo::Get().GetOSMajorVersion(), wxPlatformInfo::Get().GetOSMinorVersion());
	m_urlFile += osVersion;
#endif

#ifdef __WXMSW__
	if (wxIsPlatform64Bit())
		m_urlFile += _T("&osarch=64");
	else
		m_urlFile += _T("&osarch=32");
#endif

	m_statusTimer.SetOwner(this);
	m_autoCheckTimer.SetOwner(this);
	m_busy_timer.SetOwner(this);

	m_autoUpdateCheckRunning = false;

	m_loaded = false;
	m_updateShown = false;
	m_menuUpdated = false;
	m_start_check = false;
	m_successfully_downloaded = false;
}
Exemplo n.º 7
0
void ConfigManager::InitPaths()
{
#ifdef __WINDOWS__
    ConfigManager::config_folder = GetPortableConfigDir();
#else
    ConfigManager::config_folder = wxStandardPathsBase::Get().GetUserDataDir();
#endif
    ConfigManager::home_folder = wxStandardPathsBase::Get().GetUserConfigDir();
    ConfigManager::app_path = ::DetermineExecutablePath();
    wxString res_path = ::DetermineResourcesPath();

    // if non-empty, the app has overriden it (e.g. "--prefix" was passed in the command line)
    if (data_path_global.IsEmpty())
    {
        if(platform::windows)
            ConfigManager::data_path_global = app_path + _T("/share/codeblocks");
        else if(platform::macosx)
            ConfigManager::data_path_global = res_path + _T("/share/codeblocks");
        else
            ConfigManager::data_path_global = wxStandardPathsBase::Get().GetDataDir();
    }
#ifdef CB_AUTOCONF
    if (plugin_path_global.IsEmpty())
    {
        if(platform::windows || platform::macosx)
            ConfigManager::plugin_path_global = data_path_global;
        else
        {
            ConfigManager::plugin_path_global = wxStandardPathsBase::Get().GetPluginsDir() + _T("/plugins");
            // first assume, we use standard-paths
            if(!wxDirExists(ConfigManager::plugin_path_global) && wxIsPlatform64Bit())
            {
                // if standard-path does not exist and we are on 64-bit system, use lib64 instead
                ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallPrefix() + _T("/lib64/codeblocks/plugins");
            }
        }
    }
#endif

    ConfigManager::data_path_user = ConfigManager::relo ? data_path_global : config_folder + _T("/share/codeblocks");

    CreateDirRecursively(ConfigManager::config_folder);
    CreateDirRecursively(ConfigManager::data_path_user   + _T("/plugins/"));
    CreateDir(ConfigManager::data_path_user   + _T("/scripts/"));

    ConfigManager::temp_folder = wxStandardPathsBase::Get().GetTempDir();
};
Exemplo n.º 8
0
SpringDebugReport::SpringDebugReport()
	: NetDebugReport( "http://infologs.springrts.com/upload" )
{
	wxString tmp_filename = wxPathOnly( wxFileName::CreateTempFileName(_T("dummy")) ) + wxFileName::GetPathSeparator() + _T("settings.txt");
	wxCopyFile(TowxString(SlPaths::GetSpringConfigFilePath()), tmp_filename );
	AddFile( tmp_filename, _T("Settings") );

	AddVFSFile( _T("infolog.txt"),		_T("Infolog") );
	AddVFSFile( _T("script.txt"),		_T("Script") );
	AddVFSFile( _T("ext.txt"),			_T("Extensions") );
	AddVFSFile( _T("unitsync.log"),		_T("unitsync") );

	wxString info;
	info << wxGetOsDescription() << ( wxIsPlatform64Bit() ? _T(" 64bit\n") : _T(" 32bit\n") );
	AddText( _T("platform.txt"), info, _T("Platform") );
	AddText( _T("client.txt"), _T( "SpringLobby " ) + TowxString(GetSpringLobbyVersion()), _T("Client") );
	AddText( _T("appname.txt"), TowxString(getSpringlobbyName()), _T("Application Name"));
}
Exemplo n.º 9
0
void wxPlatformInfo::InitForCurrentPlatform()
{
    // autodetect all informations
    const wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
    if ( !traits )
    {
        wxFAIL_MSG( _T("failed to initialize wxPlatformInfo") );

        m_port = wxPORT_UNKNOWN;
        m_usingUniversal = false;
        m_tkVersionMajor =
                m_tkVersionMinor = 0;
    }
    else
    {
        m_port = traits->GetToolkitVersion(&m_tkVersionMajor, &m_tkVersionMinor);
        m_usingUniversal = traits->IsUsingUniversalWidgets();
    }

    m_os = wxGetOsVersion(&m_osVersionMajor, &m_osVersionMinor);
    m_endian = wxIsPlatformLittleEndian() ? wxENDIAN_LITTLE : wxENDIAN_BIG;
    m_arch = wxIsPlatform64Bit() ? wxARCH_64 : wxARCH_32;
}
Exemplo n.º 10
0
wxString wxGetOsDescription()
{
    wxString str;

    const OSVERSIONINFOEX info = wxGetWindowsVersionInfo();
    switch ( info.dwPlatformId )
    {
#ifdef VER_PLATFORM_WIN32_CE
        case VER_PLATFORM_WIN32_CE:
            str.Printf(_("Windows CE (%d.%d)"),
                       info.dwMajorVersion,
                       info.dwMinorVersion);
            break;
#endif
        case VER_PLATFORM_WIN32s:
            str = _("Win32s on Windows 3.1");
            break;

        case VER_PLATFORM_WIN32_WINDOWS:
            switch (info.dwMinorVersion)
            {
                case 0:
                    if ( info.szCSDVersion[1] == 'B' ||
                         info.szCSDVersion[1] == 'C' )
                    {
                        str = _("Windows 95 OSR2");
                    }
                    else
                    {
                        str = _("Windows 95");
                    }
                    break;
                case 10:
                    if ( info.szCSDVersion[1] == 'B' ||
                         info.szCSDVersion[1] == 'C' )
                    {
                        str = _("Windows 98 SE");
                    }
                    else
                    {
                        str = _("Windows 98");
                    }
                    break;
                case 90:
                    str = _("Windows ME");
                    break;
                default:
                    str.Printf(_("Windows 9x (%d.%d)"),
                               info.dwMajorVersion,
                               info.dwMinorVersion);
                    break;
            }
            if ( !wxIsEmpty(info.szCSDVersion) )
            {
                str << wxT(" (") << info.szCSDVersion << wxT(')');
            }
            break;

        case VER_PLATFORM_WIN32_NT:
            switch ( info.dwMajorVersion )
            {
                case 5:
                    switch ( info.dwMinorVersion )
                    {
                        case 0:
                            str = _("Windows 2000");
                            break;

                        case 2:
                            // we can't distinguish between XP 64 and 2003
                            // as they both are 5.2, so examine the product
                            // type to resolve this ambiguity
                            if ( wxIsWindowsServer() == 1 )
                            {
                                str = _("Windows Server 2003");
                                break;
                            }
                            //else: must be XP, fall through

                        case 1:
                            str = _("Windows XP");
                            break;
                    }
                    break;

                case 6:
                    switch ( info.dwMinorVersion )
                    {
                        case 0:
                            str = wxIsWindowsServer() == 1
                                    ? _("Windows Server 2008")
                                    : _("Windows Vista");
                            break;

                        case 1:
                            str = wxIsWindowsServer() == 1
                                    ? _("Windows Server 2008 R2")
                                    : _("Windows 7");
                            break;

                        case 2:
                            str = wxIsWindowsServer() == 1
                                    ? _("Windows Server 2012")
                                    : _("Windows 8");
                            break;

                        case 3:
                            str = wxIsWindowsServer() == 1
                                    ? _("Windows Server 2012 R2")
                                    : _("Windows 8.1");
                            break;
                    }
                    break;

                case 10:
                    str = wxIsWindowsServer() == 1
                            ? _("Windows Server 10")
                            : _("Windows 10");
                    break;
            }

            if ( str.empty() )
            {
                str.Printf(_("Windows NT %lu.%lu"),
                           info.dwMajorVersion,
                           info.dwMinorVersion);
            }

            str << wxT(" (")
                << wxString::Format(_("build %lu"), info.dwBuildNumber);
            if ( !wxIsEmpty(info.szCSDVersion) )
            {
                str << wxT(", ") << info.szCSDVersion;
            }
            str << wxT(')');

            if ( wxIsPlatform64Bit() )
                str << _(", 64-bit edition");
            break;
    }

    return str;
}
// Run freeroute, if it is available (freeroute.jar found in kicad binaries)
void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event )
{
    wxString dsnFile;

    if( m_freeRouterFound )
    {
        dsnFile = createDSN_File();

        if( dsnFile.IsEmpty() )     // Something is wrong or command cancelled
            return;
    }

    wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX );
    wxString command;

    // Find the Java application on Windows.
    // Colud be no more needed since we now have to run only java, not java web start
#ifdef __WINDOWS__

    // If you thought the registry was brain dead before, now you have to deal with
    // accessing it in either 64 or 32 bit mode depending on the build version of
    // Windows and the build version of KiCad.

    // This key works for 32 bit Java on 32 bit Windows and 64 bit Java on 64 bit Windows.
    wxString keyName = wxT( "SOFTWARE\\JavaSoft\\Java Runtime Environment" );
    wxRegKey key( wxRegKey::HKLM, keyName,
                  wxIsPlatform64Bit() ? wxRegKey::WOW64ViewMode_64 :
                  wxRegKey::WOW64ViewMode_Default );

    // It's possible that 32 bit Java is installed on 64 bit Windows.
    if( !key.Exists() && wxIsPlatform64Bit() )
    {
        keyName = wxT( "SOFTWARE\\Wow6432Node\\JavaSoft\\Java Runtime Environment" );
        key.SetName( wxRegKey::HKLM, keyName );
    }

    if( !key.Exists() )
    {
        ::wxMessageBox( _( "It appears that the Java run time environment is not "
                           "installed on this computer.  Java is required to use "
                           "FreeRoute." ),
                        _( "Pcbnew Error" ), wxOK | wxICON_ERROR );
        return;
    }

    key.Open( wxRegKey::Read );

    // Get the current version of java installed to determine the executable path.
    wxString value;
    key.QueryValue( wxT( "CurrentVersion" ), value );
    key.SetName( key.GetName() + wxT( "\\" ) + value );

    key.QueryValue( wxT( "JavaHome" ), value );
    command = value + wxFileName::GetPathSeparator();
    command << wxT("bin\\java");
#else   //  __WINDOWS__
        command = wxT( "java" );
#endif

    command << wxT(" -jar ");
    // add "freeroute.jar" to command line:
    command << wxChar( '"' ) << jarfileName.GetFullPath() << wxChar( '"' );
    // add option to load the .dsn file
    command << wxT( " -de " );
    // add *.dsn full filename (quoted):
    command << wxChar( '"' ) << dsnFile << wxChar( '"' );

    ProcessExecute( command );
}
void PASL::CreateControls()
{
////@begin PASL content construction
    // Generated by DialogBlocks, Fri 15 Jan 2010 16:18:25 EST (unregistered)

    PASL* itemFrame1 = this;

    wxPanel* itemPanel2 = new wxPanel( itemFrame1, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );

    wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(3, 1, 0, 0);
    itemPanel2->SetSizer(itemFlexGridSizer3);

    wxFlexGridSizer* itemFlexGridSizer4 = new wxFlexGridSizer(1, 3, 0, 0);
    itemFlexGridSizer3->Add(itemFlexGridSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer5Static = new wxStaticBox(itemPanel2, wxID_ANY, _("Resolution"));
    wxStaticBoxSizer* itemStaticBoxSizer5 = new wxStaticBoxSizer(itemStaticBoxSizer5Static, wxHORIZONTAL);
    itemFlexGridSizer4->Add(itemStaticBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxArrayString ResBoxStrings;
    ResBoxStrings.Add(_("640x480"));
    ResBoxStrings.Add(_("800x600"));
    ResBoxStrings.Add(_("1024x768"));
    ResBoxStrings.Add(_("1280x960"));
    ResBoxStrings.Add(_("1600x1200"));
    ResBox = new wxComboBox( itemPanel2, ID_COMBOBOX, _("1024x768"), wxDefaultPosition, wxSize(110, -1), ResBoxStrings, wxCB_READONLY );
    ResBox->SetStringSelection(_("1024x768"));
    itemStaticBoxSizer5->Add(ResBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemPanel2, wxID_ANY, _("Shaders"));
    wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxHORIZONTAL);
    itemFlexGridSizer4->Add(itemStaticBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxArrayString ShaderBoxStrings;
    ShaderBoxStrings.Add(_("Off"));
    ShaderBoxStrings.Add(_("Low"));
    ShaderBoxStrings.Add(_("High"));
    ShaderBox = new wxComboBox( itemPanel2, ID_COMBOBOX1, _("Low"), wxDefaultPosition, wxSize(70, -1), ShaderBoxStrings, wxCB_READONLY );
    ShaderBox->SetStringSelection(_("Low"));
    itemStaticBoxSizer7->Add(ShaderBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer9Static = new wxStaticBox(itemPanel2, wxID_ANY, _("VSync"));
    wxStaticBoxSizer* itemStaticBoxSizer9 = new wxStaticBoxSizer(itemStaticBoxSizer9Static, wxHORIZONTAL);
    itemFlexGridSizer4->Add(itemStaticBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxArrayString VSyncBoxStrings;
    VSyncBoxStrings.Add(_("Off"));
    VSyncBoxStrings.Add(_("On"));
    VSyncBox = new wxComboBox( itemPanel2, ID_COMBOBOX2, _("Off"), wxDefaultPosition, wxSize(60, -1), VSyncBoxStrings, wxCB_READONLY );
    VSyncBox->SetStringSelection(_("Off"));
    itemStaticBoxSizer9->Add(VSyncBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer11 = new wxFlexGridSizer(1, 2, 0, 0);
    itemFlexGridSizer3->Add(itemFlexGridSizer11, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer12Static = new wxStaticBox(itemPanel2, wxID_ANY, _("Map"));
    wxStaticBoxSizer* itemStaticBoxSizer12 = new wxStaticBoxSizer(itemStaticBoxSizer12Static, wxHORIZONTAL);
    itemFlexGridSizer11->Add(itemStaticBoxSizer12, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxArrayString MapBoxStrings;
    MapBox = new wxComboBox( itemPanel2, ID_COMBOBOX6, wxEmptyString, wxDefaultPosition, wxSize(180, -1), MapBoxStrings, wxCB_READONLY );
    itemStaticBoxSizer12->Add(MapBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer14Static = new wxStaticBox(itemPanel2, wxID_ANY, _("Map Image"));
    wxStaticBoxSizer* itemStaticBoxSizer14 = new wxStaticBoxSizer(itemStaticBoxSizer14Static, wxHORIZONTAL);
    itemFlexGridSizer11->Add(itemStaticBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    MapPrev = new wxStaticBitmap( itemPanel2, wxID_STATIC, itemFrame1->GetBitmapResource(wxT("NoImage.xpm")), wxDefaultPosition, wxSize(64, 64), wxSIMPLE_BORDER );
    itemStaticBoxSizer14->Add(MapPrev, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer16 = new wxFlexGridSizer(1, 1, 0, 0);
    itemFlexGridSizer3->Add(itemFlexGridSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxNotebook* itemNotebook17 = new wxNotebook( itemPanel2, ID_NOTEBOOK, wxDefaultPosition, wxSize(320, -1), wxBK_DEFAULT );

    wxPanel* itemPanel18 = new wxPanel( itemNotebook17, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemPanel18->SetBackgroundColour(wxColour(224, 223, 227));
    wxFlexGridSizer* itemFlexGridSizer19 = new wxFlexGridSizer(1, 3, 0, 0);
    itemFlexGridSizer19->AddGrowableCol(0);
    itemPanel18->SetSizer(itemFlexGridSizer19);

    FPSLaunch = new wxButton( itemPanel18, ID_BUTTON, _("Launch"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer19->Add(FPSLaunch, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemNotebook17->AddPage(itemPanel18, _("FPS"));

    wxPanel* itemPanel21 = new wxPanel( itemNotebook17, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemPanel21->SetBackgroundColour(wxColour(224, 223, 227));
    wxFlexGridSizer* itemFlexGridSizer22 = new wxFlexGridSizer(2, 2, 0, 0);
    itemFlexGridSizer22->AddGrowableCol(0);
    itemPanel21->SetSizer(itemFlexGridSizer22);

    SSPLaunch = new wxButton( itemPanel21, ID_BUTTON1, _("Launch"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer22->Add(SSPLaunch, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemNotebook17->AddPage(itemPanel21, _("SSP"));

    wxPanel* itemPanel24 = new wxPanel( itemNotebook17, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemPanel24->SetBackgroundColour(wxColour(224, 223, 227));
    wxFlexGridSizer* itemFlexGridSizer25 = new wxFlexGridSizer(2, 2, 0, 0);
    itemFlexGridSizer25->AddGrowableCol(0);
    itemPanel24->SetSizer(itemFlexGridSizer25);

    RPGLaunch = new wxButton( itemPanel24, ID_BUTTON2, _("Launch"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer25->Add(RPGLaunch, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemNotebook17->AddPage(itemPanel24, _("RPG"));

    wxPanel* itemPanel27 = new wxPanel( itemNotebook17, ID_PANEL4, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemPanel27->SetBackgroundColour(wxColour(224, 223, 227));
    wxFlexGridSizer* itemFlexGridSizer28 = new wxFlexGridSizer(3, 1, 0, 0);
    itemPanel27->SetSizer(itemFlexGridSizer28);

    wxFlexGridSizer* itemFlexGridSizer29 = new wxFlexGridSizer(1, 3, 0, 0);
    itemFlexGridSizer28->Add(itemFlexGridSizer29, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxStaticBox* itemStaticBoxSizer30Static = new wxStaticBox(itemPanel27, wxID_ANY, _("Server Name"));
    wxStaticBoxSizer* itemStaticBoxSizer30 = new wxStaticBoxSizer(itemStaticBoxSizer30Static, wxHORIZONTAL);
    itemFlexGridSizer29->Add(itemStaticBoxSizer30, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    ServerName = new wxTextCtrl( itemPanel27, ID_TEXTCTRL, _("Sandbox Server"), wxDefaultPosition, wxSize(100, -1), 0 );
    itemStaticBoxSizer30->Add(ServerName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer32Static = new wxStaticBox(itemPanel27, wxID_ANY, _("Players"));
    wxStaticBoxSizer* itemStaticBoxSizer32 = new wxStaticBoxSizer(itemStaticBoxSizer32Static, wxHORIZONTAL);
    itemFlexGridSizer29->Add(itemStaticBoxSizer32, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxArrayString PlayerBoxStrings;
    PlayerBoxStrings.Add(_("0"));
    PlayerBoxStrings.Add(_("1"));
    PlayerBoxStrings.Add(_("2"));
    PlayerBoxStrings.Add(_("3"));
    PlayerBoxStrings.Add(_("4"));
    PlayerBoxStrings.Add(_("5"));
    PlayerBoxStrings.Add(_("6"));
    PlayerBoxStrings.Add(_("7"));
    PlayerBoxStrings.Add(_("8"));
    PlayerBoxStrings.Add(_("9"));
    PlayerBoxStrings.Add(_("10"));
    PlayerBoxStrings.Add(_("11"));
    PlayerBoxStrings.Add(_("12"));
    PlayerBoxStrings.Add(_("13"));
    PlayerBoxStrings.Add(_("14"));
    PlayerBoxStrings.Add(_("15"));
    PlayerBoxStrings.Add(_("16"));
    PlayerBoxStrings.Add(_("17"));
    PlayerBoxStrings.Add(_("18"));
    PlayerBoxStrings.Add(_("19"));
    PlayerBoxStrings.Add(_("20"));
    PlayerBoxStrings.Add(_("21"));
    PlayerBoxStrings.Add(_("22"));
    PlayerBoxStrings.Add(_("23"));
    PlayerBoxStrings.Add(_("24"));
    PlayerBoxStrings.Add(_("25"));
    PlayerBoxStrings.Add(_("26"));
    PlayerBoxStrings.Add(_("27"));
    PlayerBoxStrings.Add(_("28"));
    PlayerBoxStrings.Add(_("29"));
    PlayerBoxStrings.Add(_("30"));
    PlayerBoxStrings.Add(_("31"));
    PlayerBoxStrings.Add(_("32"));
    PlayerBox = new wxComboBox( itemPanel27, ID_COMBOBOX3, _("12"), wxDefaultPosition, wxSize(60, -1), PlayerBoxStrings, wxCB_READONLY );
    PlayerBox->SetStringSelection(_("12"));
    itemStaticBoxSizer32->Add(PlayerBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer34Static = new wxStaticBox(itemPanel27, wxID_ANY, _("MMode"));
    wxStaticBoxSizer* itemStaticBoxSizer34 = new wxStaticBoxSizer(itemStaticBoxSizer34Static, wxHORIZONTAL);
    itemFlexGridSizer29->Add(itemStaticBoxSizer34, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxArrayString MasterBoxStrings;
    MasterBoxStrings.Add(_("N"));
    MasterBoxStrings.Add(_("Y"));
    MasterBox = new wxComboBox( itemPanel27, ID_COMBOBOX4, _("N"), wxDefaultPosition, wxSize(50, -1), MasterBoxStrings, wxCB_READONLY );
    MasterBox->SetStringSelection(_("N"));
    itemStaticBoxSizer34->Add(MasterBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer36 = new wxFlexGridSizer(1, 3, 0, 0);
    itemFlexGridSizer28->Add(itemFlexGridSizer36, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxStaticBox* itemStaticBoxSizer37Static = new wxStaticBox(itemPanel27, wxID_ANY, _("Server Password"));
    wxStaticBoxSizer* itemStaticBoxSizer37 = new wxStaticBoxSizer(itemStaticBoxSizer37Static, wxHORIZONTAL);
    itemFlexGridSizer36->Add(itemStaticBoxSizer37, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    ServerPassword = new wxTextCtrl( itemPanel27, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
    itemStaticBoxSizer37->Add(ServerPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer39Static = new wxStaticBox(itemPanel27, wxID_ANY, _("Dedicated"));
    wxStaticBoxSizer* itemStaticBoxSizer39 = new wxStaticBoxSizer(itemStaticBoxSizer39Static, wxHORIZONTAL);
    itemFlexGridSizer36->Add(itemStaticBoxSizer39, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxArrayString DedBoxStrings;
    DedBoxStrings.Add(_("N"));
    DedBoxStrings.Add(_("Y"));
    DedBox = new wxComboBox( itemPanel27, ID_COMBOBOX5, _("N"), wxDefaultPosition, wxSize(60, -1), DedBoxStrings, wxCB_READONLY );
    DedBox->SetStringSelection(_("N"));
    itemStaticBoxSizer39->Add(DedBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer41Static = new wxStaticBox(itemPanel27, wxID_ANY, _("Mode"));
    wxStaticBoxSizer* itemStaticBoxSizer41 = new wxStaticBoxSizer(itemStaticBoxSizer41Static, wxHORIZONTAL);
    itemFlexGridSizer36->Add(itemStaticBoxSizer41, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxArrayString ModeBoxStrings;
    ModeBoxStrings.Add(_("FPS"));
    ModeBoxStrings.Add(_("SSP"));
    ModeBoxStrings.Add(_("RPG"));
    ModeBox = new wxComboBox( itemPanel27, ID_COMBOBOX7, _("FPS"), wxDefaultPosition, wxSize(65, -1), ModeBoxStrings, wxCB_READONLY );
    ModeBox->SetStringSelection(_("FPS"));
    itemStaticBoxSizer41->Add(ModeBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer43 = new wxFlexGridSizer(1, 3, 0, 0);
    itemFlexGridSizer28->Add(itemFlexGridSizer43, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    itemFlexGridSizer43->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    ServerLaunch = new wxButton( itemPanel27, ID_BUTTON3, _("Launch"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer43->Add(ServerLaunch, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemFlexGridSizer43->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemNotebook17->AddPage(itemPanel27, _("Server"));

    wxPanel* itemPanel47 = new wxPanel( itemNotebook17, ID_PANEL5, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemPanel47->SetBackgroundColour(wxColour(224, 223, 227));
    wxFlexGridSizer* itemFlexGridSizer48 = new wxFlexGridSizer(2, 1, 0, 0);
    itemFlexGridSizer48->AddGrowableCol(0);
    itemPanel47->SetSizer(itemFlexGridSizer48);

    wxFlexGridSizer* itemFlexGridSizer49 = new wxFlexGridSizer(1, 2, 0, 0);
    itemFlexGridSizer48->Add(itemFlexGridSizer49, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxStaticBox* itemStaticBoxSizer50Static = new wxStaticBox(itemPanel47, wxID_ANY, _("IP Address"));
    wxStaticBoxSizer* itemStaticBoxSizer50 = new wxStaticBoxSizer(itemStaticBoxSizer50Static, wxHORIZONTAL);
    itemFlexGridSizer49->Add(itemStaticBoxSizer50, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    ClientIP = new wxTextCtrl( itemPanel47, ID_TEXTCTRL2, _("192.168.1.100"), wxDefaultPosition, wxSize(120, -1), 0 );
    itemStaticBoxSizer50->Add(ClientIP, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticBox* itemStaticBoxSizer52Static = new wxStaticBox(itemPanel47, wxID_ANY, _("Password"));
    wxStaticBoxSizer* itemStaticBoxSizer52 = new wxStaticBoxSizer(itemStaticBoxSizer52Static, wxHORIZONTAL);
    itemFlexGridSizer49->Add(itemStaticBoxSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    ClientPassword = new wxTextCtrl( itemPanel47, ID_TEXTCTRL3, wxEmptyString, wxDefaultPosition, wxSize(100, -1), 0 );
    itemStaticBoxSizer52->Add(ClientPassword, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer54 = new wxFlexGridSizer(1, 2, 0, 0);
    itemFlexGridSizer48->Add(itemFlexGridSizer54, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxStaticBox* itemStaticBoxSizer55Static = new wxStaticBox(itemPanel47, wxID_ANY, _("Mode"));
    wxStaticBoxSizer* itemStaticBoxSizer55 = new wxStaticBoxSizer(itemStaticBoxSizer55Static, wxHORIZONTAL);
    itemFlexGridSizer54->Add(itemStaticBoxSizer55, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
    wxArrayString CModeBoxStrings;
    CModeBoxStrings.Add(_("FPS"));
    CModeBoxStrings.Add(_("SSP"));
    CModeBoxStrings.Add(_("RPG"));
    CModeBox = new wxComboBox( itemPanel47, ID_COMBOBOX8, _("FPS"), wxDefaultPosition, wxSize(70, -1), CModeBoxStrings, wxCB_DROPDOWN );
    CModeBox->SetStringSelection(_("FPS"));
    itemStaticBoxSizer55->Add(CModeBox, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);

    ClientLaunch = new wxButton( itemPanel47, ID_BUTTON4, _("Launch"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer54->Add(ClientLaunch, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemNotebook17->AddPage(itemPanel47, _("Client"));

    wxPanel* itemPanel58 = new wxPanel( itemNotebook17, ID_PANEL6, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
    itemPanel58->SetBackgroundColour(wxColour(224, 223, 227));
    wxFlexGridSizer* itemFlexGridSizer59 = new wxFlexGridSizer(1, 1, 0, 0);
    itemFlexGridSizer59->AddGrowableCol(0);
    itemPanel58->SetSizer(itemFlexGridSizer59);

    MovieCubeButton = new wxButton( itemPanel58, ID_BUTTON5, _("Launch"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer59->Add(MovieCubeButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemNotebook17->AddPage(itemPanel58, _("MovieCube"));

    itemFlexGridSizer16->Add(itemNotebook17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

////@end PASL content construction

    //Enable JPEG Loading
    wxInitAllImageHandlers();

    //Get Current Resolution
    ResWidth = wxString::Format(wxT("%i"),wxSystemSettings::GetMetric(wxSYS_SCREEN_X));
    ResHeight = wxString::Format(wxT("%i"),wxSystemSettings::GetMetric(wxSYS_SCREEN_Y));
    ResBox->Append(ResWidth + wxT("x") + ResHeight);
    ResBox->SetValue(ResWidth + wxT("x") + ResHeight);

    //Figure Out Which OS Is Running And Set EXE/Map Directories
    #ifdef __WIN32__
        //WinExe = wxT("bin\\sandbox.exe -r ");
        CurFPSc = wxT("bin\\sandbox_fps.exe -qmy_stuff -r ");
        CurSSPc = wxT("bin\\sandbox_ssp.exe -qmy_stuff -r ");
        CurRPGc = wxT("bin\\sandbox_rpg.exe -qmy_stuff -r ");
        CurFPSs = wxT("bin\\sandbox_fps.exe -r ");
        CurSSPs = wxT("bin\\sandbox_ssp.exe -r ");
        CurRPGs = wxT("bin\\sandbox_rpg.exe -r ");
        CurMovie = wxT("bin\\sandbox_movie.exe");
        //CurExe = WinExe;
        MapDir = (wxGetCwd() + wxT("\\packages\\base\\"));
		StuffDir = (wxGetCwd() + wxT("\\my_stuff\\packages\\base\\"));
    #endif
    #ifdef __UNIX__
        if(wxIsPlatform64Bit())
        {
            //LinExe = wxT("./bin//sandbox_client_x86_64 -r ");
            CurFPSc = wxT("./bin/sandbox_client_64_fps -q") + wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts -r ");
            CurSSPc = wxT("./bin/sandbox_client_64_ssp -q") + wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts -r ");
            CurRPGc = wxT("./bin/sandbox_client_64_rpg -q") + wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts -r ");
            CurFPSs = wxT("./bin/sandbox_server_64_fps ");
            CurSSPs = wxT("./bin/sandbox_server_64_ssp ");
            CurRPGs = wxT("./bin/sandbox_server_64_rpg ");
            CurMovie = wxT("./bin/sandbox_client_32_movie");
        }
        else
        {
            CurFPSc = wxT("./bin/sandbox_client_32_fps -q") + wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts -r ");
            CurSSPc = wxT("./bin/sandbox_client_32_ssp -q") + wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts -r ");
            CurRPGc = wxT("./bin/sandbox_client_32_rpg -q") + wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts -r ");
            CurFPSs = wxT("./bin/sandbox_server_32_fps ");
            CurSSPs = wxT("./bin/sandbox_server_32_ssp ");
            CurRPGs = wxT("./bin/sandbox_server_32_rpg ");
            CurMovie = wxT("./bin/sandbox_client_32_movie");
            //LinExe = wxT(".//bin//sandbox_client_i686 -r ");
        }
        //LinExe = wxT(".//bin//sandbox_client_") + wxGetCommandOutput(wxT("uname -m")) + " -r ");
        //CurExe = LinExe;
        MapDir = (wxGetCwd() + wxT("/packages/base/"));
	StuffDir = (wxStandardPaths::Get().GetUserConfigDir() + wxT("/.platinumarts/packages/base/"));
    #endif

    //Get Map List
	wxString filename;
    wxDir dir(MapDir);
    if (dir.IsOpened())
    {
        bool cont = dir.GetFirst(&filename, wxEmptyString, wxDIR_FILES);
        while(cont)
        {
            if(filename.Right(4).IsSameAs(wxT(".ogz")))
            {
                MapBox->Append(filename.Left(filename.Len() - 4));
            }
            cont = dir.GetNext(&filename);
        }
    }
    wxDir dir2(StuffDir);
    if (dir2.IsOpened())
    {
        bool cont = dir2.GetFirst(&filename, wxEmptyString, wxDIR_FILES);
        while(cont)
        {
            if(filename.Right(4).IsSameAs(wxT(".ogz")))
            {
                MapBox->Append(filename.Left(filename.Len() - 4));
            }
            cont = dir2.GetNext(&filename);
        }
    }
    MapBox->SetValue(wxT("village"));

    //Set Default Values
    wxCommandEvent ce;
    OnResBoxSelected(ce);
    OnShaderBoxSelected(ce);
    OnVSyncSelected(ce);
    OnMapBoxSelected(ce);
    OnServerNameTextUpdated(ce);
    OnPlayerBoxSelected(ce);
    OnMasterBoxSelected(ce);
    OnServerPasswordTextUpdated(ce);
    OnDedBoxSelected(ce);
    OnModeBoxSelected(ce);
    OnClientIPTextUpdated(ce);
    OnClientPasswordTextUpdated(ce);
    OnCModeBoxSelected(ce);

}