Rev 105 | Blame | Compare with Previous | Last modification | View Log | RSS feed
#include "Form1.h"
namespace GameLauncher {
Form1::Form1(System::String ^runGame, System::String ^arguments, System::String ^runManager)
{
InitializeComponent();
m_sGame = runGame;
m_sArgs = arguments;
m_sManager = runManager;
this->label3->Text = "Version: V" + VERSION + " (" + DATE + ")";
this->gameDataToolStripMenuItem->Visible = false;
m_bClosing = false;
m_bGameClosed = true;
m_bWaitingSteam = false;
m_bRunSteam = false;
m_bCheckProcess = false;
m_bAutoClose = true;
m_bAutoResume = true;
m_bNoLCD = false;
m_bResume = false;
m_bClose = false;
m_bUpdateLCD = true;
m_bCustomGui = true;
m_bGuiHooked = false;
m_iGameLog = LOGFILE;
// create the game data container
m_pGameData = new CX3Data(_WS(System::IO::FileInfo(System::Windows::Forms::Application::ExecutablePath).DirectoryName));
// read the launchers settings
RegistryKey ^searchKey = Registry::CurrentUser->OpenSubKey("Software\\Egosoft\\PluginManagerSettings");
if ( searchKey )
{
if ( System::Convert::ToInt32(searchKey->GetValue("DontAutoResume")) )
m_bAutoResume = false;
if ( System::Convert::ToInt32(searchKey->GetValue("DontAutoClose")) )
m_bAutoClose = false;
if ( System::Convert::ToInt32(searchKey->GetValue("DontUpdateLCD")) )
m_bUpdateLCD = false;
if ( System::Convert::ToInt32(searchKey->GetValue("DontDoGUI")) )
m_bCustomGui = false;
if ( System::Convert::ToInt32(searchKey->GetValue("GameDataLog")) )
m_iGameLog = System::Convert::ToInt32(searchKey->GetValue("GameDataLog"));
}
// update the UI
this->ContextResume->Checked = m_bAutoResume;
this->ContextAutoClose->Checked = m_bAutoClose;
this->updateLCDToolStripMenuItem->Checked = m_bUpdateLCD;
this->gUIOverlayToolStripMenuItem->Checked = m_bCustomGui;
SetGameLogDisplay();
this->AddGames();
m_pLCD = NULL;
}
void Form1::_launchManager(bool bAdvanced)
{
if ( m_bAutoClose )
{
m_bResume = true;
this->Close();
}
else
LaunchManager(false);
}
}