| 86 | cycrow | 1 | #include "Form1.h"
 | 
        
           |  |  | 2 |   | 
        
           |  |  | 3 | namespace GameLauncher {
 | 
        
           |  |  | 4 |   | 
        
           |  |  | 5 | Form1::Form1(System::String ^runGame, System::String ^arguments, System::String ^runManager)
 | 
        
           |  |  | 6 | {
 | 
        
           |  |  | 7 | 	InitializeComponent();
 | 
        
           |  |  | 8 |   | 
        
           |  |  | 9 | 	m_sGame = runGame;
 | 
        
           |  |  | 10 | 	m_sArgs = arguments;
 | 
        
           |  |  | 11 | 	m_sManager = runManager;
 | 
        
           |  |  | 12 |   | 
        
           |  |  | 13 | 	this->label3->Text = "Version: V" + VERSION + " (" + DATE + ")";
 | 
        
           |  |  | 14 |   | 
        
           |  |  | 15 | 	this->gameDataToolStripMenuItem->Visible = false;
 | 
        
           |  |  | 16 | 	m_bClosing = false;
 | 
        
           |  |  | 17 | 	m_bGameClosed = true;
 | 
        
           |  |  | 18 | 	m_bWaitingSteam = false;
 | 
        
           |  |  | 19 | 	m_bRunSteam = false;
 | 
        
           |  |  | 20 | 	m_bCheckProcess = false;
 | 
        
           |  |  | 21 | 	m_bAutoClose = true;
 | 
        
           |  |  | 22 | 	m_bAutoResume = true;
 | 
        
           |  |  | 23 | 	m_bNoLCD = false;
 | 
        
           |  |  | 24 | 	m_bResume = false;
 | 
        
           |  |  | 25 | 	m_bClose = false;
 | 
        
           |  |  | 26 | 	m_bUpdateLCD = true;
 | 
        
           |  |  | 27 | 	m_bCustomGui = true;
 | 
        
           |  |  | 28 | 	m_bGuiHooked = false;
 | 
        
           |  |  | 29 | 	m_iGameLog = LOGFILE;
 | 
        
           |  |  | 30 |   | 
        
           |  |  | 31 | 	// create the game data container
 | 
        
           |  |  | 32 | 	m_pGameData = new CX3Data(CyStringFromSystemString(System::IO::FileInfo(System::Windows::Forms::Application::ExecutablePath).DirectoryName));
 | 
        
           |  |  | 33 |   | 
        
           |  |  | 34 | 	// read the launchers settings
 | 
        
           |  |  | 35 | 	RegistryKey ^searchKey = Registry::CurrentUser->OpenSubKey("Software\\Egosoft\\PluginManagerSettings");
 | 
        
           |  |  | 36 | 	if ( searchKey )
 | 
        
           |  |  | 37 | 	{
 | 
        
           |  |  | 38 | 		if ( System::Convert::ToInt32(searchKey->GetValue("DontAutoResume")) )
 | 
        
           |  |  | 39 | 			m_bAutoResume = false;
 | 
        
           |  |  | 40 | 		if ( System::Convert::ToInt32(searchKey->GetValue("DontAutoClose")) )
 | 
        
           |  |  | 41 | 			m_bAutoClose = false;
 | 
        
           |  |  | 42 | 		if ( System::Convert::ToInt32(searchKey->GetValue("DontUpdateLCD")) )
 | 
        
           |  |  | 43 | 			m_bUpdateLCD = false;
 | 
        
           |  |  | 44 | 		if ( System::Convert::ToInt32(searchKey->GetValue("DontDoGUI")) )
 | 
        
           |  |  | 45 | 			m_bCustomGui = false;
 | 
        
           |  |  | 46 | 		if ( System::Convert::ToInt32(searchKey->GetValue("GameDataLog")) )
 | 
        
           |  |  | 47 | 			m_iGameLog = System::Convert::ToInt32(searchKey->GetValue("GameDataLog"));
 | 
        
           |  |  | 48 | 	}
 | 
        
           |  |  | 49 |   | 
        
           |  |  | 50 | 	// update the UI
 | 
        
           |  |  | 51 | 	this->ContextResume->Checked = m_bAutoResume;
 | 
        
           |  |  | 52 | 	this->ContextAutoClose->Checked = m_bAutoClose;
 | 
        
           |  |  | 53 | 	this->updateLCDToolStripMenuItem->Checked = m_bUpdateLCD;
 | 
        
           |  |  | 54 | 	this->gUIOverlayToolStripMenuItem->Checked = m_bCustomGui;
 | 
        
           |  |  | 55 | 	SetGameLogDisplay();
 | 
        
           |  |  | 56 |   | 
        
           |  |  | 57 | 	this->AddGames();
 | 
        
           |  |  | 58 |   | 
        
           |  |  | 59 | 	m_pLCD = NULL;
 | 
        
           |  |  | 60 | }
 | 
        
           |  |  | 61 |   | 
        
           |  |  | 62 | }
 |