// Token: 0x06000100 RID: 256 RVA: 0x000097A4 File Offset: 0x000079A4 internal static file Copy(file gameFile) { file file = new file(); file.filename = gameFile.filename; file.dependency = gameFile.dependency; file.title = gameFile.title; file.id = gameFile.id; file.Option = gameFile.Option; file.altname = gameFile.altname; if (gameFile.internals != null) { file.internals = new internals(); foreach (file current in gameFile.internals.files) { file.internals.files.Add(file.Copy(current)); } } file.cheats = new cheats(); foreach (group current2 in gameFile.groups) { file.groups.Add(group.Copy(current2)); } file.textmode = gameFile.textmode; file.type = gameFile.type; foreach (cheat current3 in gameFile.Cheats) { file.Cheats.Add(cheat.Copy(current3)); } return(file); }
// Token: 0x06000AEF RID: 2799 RVA: 0x0003B6BC File Offset: 0x000398BC private void FillCheats(string highlight) { this.dgCheats.Rows.Clear(); container targetGameFolder = this.m_game.GetTargetGameFolder(); if (targetGameFolder != null) { this.Select.Visible = true; List <cheat> allCheats = this.m_game.GetAllCheats(); if (allCheats.Count == 0) { int index = this.dgCheats.Rows.Add(new DataGridViewRow()); DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle(); dataGridViewCellStyle.ForeColor = Color.Gray; this.dgCheats.Rows[index].Cells[0].Tag = "NoCheats"; dataGridViewCellStyle.Font = new Font(this.dgCheats.Font, FontStyle.Italic); this.dgCheats.Rows[index].Cells[1].Style.ApplyStyle(dataGridViewCellStyle); this.dgCheats.Rows[index].Cells[1].Value = Resources.lblNoCheats; } if (targetGameFolder.preprocess == 1 && this.m_gameFiles != null && this.m_gameFiles.Count > 0) { container container = container.Copy(targetGameFolder); List <file> arg_132_0 = container.files._files; targetGameFolder.files._files = new List <file>(); foreach (string current in this.m_gameFiles) { file file = file.GetGameFile(container, this.m_game.LocalSaveFolder, current); if (file != null) { file = file.Copy(file); file.filename = current; targetGameFolder.files._files.Add(file); } } } using (List <file> .Enumerator enumerator2 = targetGameFolder.files._files.GetEnumerator()) { while (enumerator2.MoveNext()) { file current2 = enumerator2.Current; if (targetGameFolder.files._files.Count > 1) { int index2 = this.dgCheats.Rows.Add(new DataGridViewRow()); this.dgCheats.Rows[index2].Cells[1].Value = current2.VisibleFileName; this.dgCheats.Rows[index2].Cells[2].Value = ""; this.dgCheats.Rows[index2].Cells[1].Tag = current2.id; this.dgCheats.Rows[index2].Cells[0].Tag = "GameFile"; } foreach (cheat current3 in current2.cheats._cheats) { int index2 = this.dgCheats.Rows.Add(new DataGridViewRow()); this.dgCheats.Rows[index2].Cells[1].Value = current3.name; this.dgCheats.Rows[index2].Cells[2].Value = current3.note; this.dgCheats.Rows[index2].Cells[1].Tag = current3.id; this.dgCheats.Rows[index2].Cells[0].Tag = current2.filename; if (current3.id == "-1") { this.dgCheats.Rows[index2].Tag = "UserCheat"; this.dgCheats.Rows[index2].Cells[1].Tag = current3.code; } } foreach (group current4 in current2.groups) { this.FillGroupCheats(current2, current4, current2.filename, 0); } } goto IL_5D8; } } if (this.m_bShowOnly) { this.Select.Visible = false; this.btnApply.Enabled = false; foreach (container current5 in this.m_game.containers._containers) { foreach (file current6 in current5.files._files) { foreach (cheat current7 in current6.cheats._cheats) { int index3 = this.dgCheats.Rows.Add(); this.dgCheats.Rows[index3].Cells[1].Value = current7.name; this.dgCheats.Rows[index3].Cells[2].Value = current7.note; } foreach (group current8 in current6.groups) { this.FillGroupCheats(current6, current8, current6.filename, 0); } } } } IL_5D8: this.RefreshValue(); }