private void ReloadAll() { if (tabControl.SelectedTab == tabPage_BattleConditionals) { _entryData.BattleConditionals = CopyableEntry.CopyList <ConditionalSet>(_entryDataDefault.BattleConditionals); PopulateBattleTab(); } else if (tabControl.SelectedTab == tabPage_WorldConditionals) { _entryData.WorldConditionals = CopyableEntry.CopyList <ConditionalSet>(_entryDataDefault.WorldConditionals); PopulateWorldTab(); } else if (tabControl.SelectedTab == tabPage_Events) { _entryData.Events = CopyableEntry.CopyList <Event>(_entryDataDefault.Events); PopulateEventTab(); } }
private void menuItem_LoadISO_Click(object sender, EventArgs e) { EntryData inputEntryData = _entryData ?? new EntryData(null, null, null); if (ISOForm.InitDialog(_dataHelper, inputEntryData, ISOForm.Mode.Load, _context) == DialogResult.OK) { _entryDataDefault = _entryDataDefault ?? _dataHelper.LoadDefaultEntryData(); _entryData = _entryData ?? inputEntryData; _entryData.BattleConditionals = inputEntryData.BattleConditionals ?? _entryData.BattleConditionals ?? CopyableEntry.CopyList <ConditionalSet>(_entryDataDefault.BattleConditionals); _entryData.WorldConditionals = inputEntryData.WorldConditionals ?? _entryData.WorldConditionals ?? CopyableEntry.CopyList <ConditionalSet>(_entryDataDefault.WorldConditionals); _entryData.Events = inputEntryData.Events ?? _entryData.Events ?? CopyableEntry.CopyList <Event>(_entryDataDefault.Events); PopulateTabs(); EnableMenu(); tabControl.Enabled = true; } }
public EntryData Copy() { return(new EntryData(CopyableEntry.CopyList <ConditionalSet>(BattleConditionals), CopyableEntry.CopyList <ConditionalSet>(WorldConditionals), CopyableEntry.CopyList <Event>(Events))); }
public ConditionalBlock Copy() { return(new ConditionalBlock(Index, CopyableEntry.CopyList <Command>(Commands), Name)); }
public ConditionalSet Copy() { return(new ConditionalSet(Index, Name, CopyableEntry.CopyList <ConditionalBlock>(ConditionalBlocks))); }
public Event Copy() { return(new Event(Index, Name, CopyableEntry.CopyList <Command>(CommandList), DataSection.Copy(), TextSection.Copy(), OriginalTextSection.Copy(), new List <byte>(OriginalBytes))); }
public Command Copy() { return(new Command(Template, CopyableEntry.CopyList <CommandParameter>(Parameters))); }
/* * public void DecodeText(bool forceDecode = false) * { * if ((!IsTextDecoded) || (forceDecode)) * { * foreach (CustomEntry entry in CustomEntryList) * { * entry.SetText(TextUtility.Decode(entry.Bytes), false); * } * * IsTextDecoded = true; * } * } */ public CustomSection Copy() { return(new CustomSection(CopyableEntry.CopyList <CustomEntry>(CustomEntryList), NumTextEntries, IsTextDecoded)); }