private void BrowseForm_Load(object sender, EventArgs e) { var info = DetailsPropertyGrid.GetType().GetProperty("Controls"); var collection = info.GetValue(DetailsPropertyGrid, null) as Control.ControlCollection; foreach (var control in collection) { var ctyp = control.GetType(); if (ctyp.Name == "PropertyGridView") { var prop = ctyp.GetField("labelRatio"); var val = prop.GetValue(control); prop.SetValue(control, 4.0); //somehow this sets the width of the property grid's label column... } } FolderTextBox.Text = Settings.Default.GTAFolder; DataHexLineCombo.Text = "16"; DataTextBox.SetTabStopWidth(3); HideTexturesTab(); try { GTA5Keys.LoadFromPath(Settings.Default.GTAFolder); KeysLoaded = true; UpdateStatus("Ready to scan..."); } catch { UpdateStatus("Keys not loaded! This should not happen."); } }
private void ExtractRawForm_Load(object sender, EventArgs e) { FolderTextBox.Text = GTAFolder.CurrentGTAFolder; OutputFolderTextBox.Text = Settings.Default.ExtractedRawFilesFolder; try { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); KeysLoaded = true; UpdateExtractStatus("Ready to extract."); } catch { UpdateExtractStatus("Keys not found! This shouldn't happen."); } }
private void ExtractKeysForm_Load(object sender, EventArgs e) { FolderTextBox.Text = GTAFolder.CurrentGTAFolder; try { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); KeysLoaded = true; UpdateStatus("Keys loaded. Nothing to do here!"); } catch { //default label text has this case //UpdateStatus("Keys not found! Please scan a GTA 5 exe..."); } }
private void ExtractForm_Load(object sender, EventArgs e) { DumpTextBox.Text = Settings.Default.GTAExeDumpFile; FolderTextBox.Text = GTAFolder.CurrentGTAFolder; OutputFolderTextBox.Text = Settings.Default.CompiledScriptFolder; try { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); KeysLoaded = true; UpdateDumpStatus("Ready."); UpdateExtractStatus("Ready to extract."); } catch { UpdateDumpStatus("Keys not found! This shouldn't happen."); } }
private void BinarySearchForm_Load(object sender, EventArgs e) { FileSearchFolderTextBox.Text = Settings.Default.CompiledScriptFolder; DataHexLineCombo.Text = "16"; DataTextBox.SetTabStopWidth(3); if (RpfMan == null) { Task.Run(() => { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); RpfMan = new RpfManager(); RpfMan.Init(GTAFolder.CurrentGTAFolder, UpdateStatus, UpdateStatus, false, false); RPFScanComplete(); }); } else { RPFScanComplete(); } }
public JenkIndForm(GameFileCache gameFileCache = null) { InitializeComponent(); if (GlobalText.FullIndexBuilt) { IndexBuildComplete(); } else { MainPanel.Enabled = false; Cursor = Cursors.WaitCursor; if ((gameFileCache == null) || (gameFileCache.IsInited == false)) { Task.Run(() => { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); GameFileCache gfc = GameFileCacheFactory.Create(); gfc.DoFullStringIndex = true; gfc.Init(UpdateStatus, UpdateStatus); IndexBuildComplete(); }); } else { Task.Run(() => { UpdateStatus("Loading strings..."); gameFileCache.DoFullStringIndex = true; gameFileCache.InitStringDicts(); IndexBuildComplete(); }); } } }
private void ContentThread() { //main content loading thread. running = true; UpdateStatus("Scanning..."); try { GTA5Keys.LoadFromPath(GTAFolder.CurrentGTAFolder, Settings.Default.Key); } catch { MessageBox.Show("Keys not found! This shouldn't happen."); Close(); return; } GameFileCache.EnableDlc = true; GameFileCache.EnableMods = true; GameFileCache.LoadPeds = false; GameFileCache.LoadVehicles = true; GameFileCache.LoadArchetypes = false; //to speed things up a little GameFileCache.BuildExtendedJenkIndex = false; //to speed things up a little GameFileCache.DoFullStringIndex = true; //to get all global text from DLC... GameFileCache.Init(UpdateStatus, LogError); //UpdateDlcListComboBox(gameFileCache.DlcNameList); //EnableCacheDependentUI(); UpdateGlobalVehiclesUI(); LoadWorld(); //initialised = true; //EnableDLCModsUI(); //UpdateStatus("Ready"); Task.Run(() => { while (formopen && !IsDisposed) //renderer content loop { bool rcItemsPending = Renderer.ContentThreadProc(); if (!rcItemsPending) { Thread.Sleep(1); //sleep if there's nothing to do } } }); while (formopen && !IsDisposed) //main asset loop { bool fcItemsPending = GameFileCache.ContentThreadProc(); if (!fcItemsPending) { Thread.Sleep(1); //sleep if there's nothing to do } } GameFileCache.Clear(); running = false; }