Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
        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;
            }
        }
Beispiel #3
0
 public EntryData Copy()
 {
     return(new EntryData(CopyableEntry.CopyList <ConditionalSet>(BattleConditionals), CopyableEntry.CopyList <ConditionalSet>(WorldConditionals),
                          CopyableEntry.CopyList <Event>(Events)));
 }
Beispiel #4
0
 public ConditionalBlock Copy()
 {
     return(new ConditionalBlock(Index, CopyableEntry.CopyList <Command>(Commands), Name));
 }
Beispiel #5
0
 public ConditionalSet Copy()
 {
     return(new ConditionalSet(Index, Name, CopyableEntry.CopyList <ConditionalBlock>(ConditionalBlocks)));
 }
Beispiel #6
0
 public Event Copy()
 {
     return(new Event(Index, Name, CopyableEntry.CopyList <Command>(CommandList), DataSection.Copy(), TextSection.Copy(), OriginalTextSection.Copy(), new List <byte>(OriginalBytes)));
 }
Beispiel #7
0
 public Command Copy()
 {
     return(new Command(Template, CopyableEntry.CopyList <CommandParameter>(Parameters)));
 }
Beispiel #8
0
        /*
         * 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));
        }