public TV_editor(SAV3 save) { InitializeComponent(); sav3file = save; events = new TV_EVENTS(sav3file.get_TV_EVENT()); ingame_swarm = new SHOW(sav3file.get_TV_OUTBREAK()); shows = new TV_SHOWS(sav3file.get_TV_SHOWS()); swarm = new SWARM(sav3file.get_TV_OUTBREAK_EXTRA()); load_data(); }
public Decor_editor(SAV3 save) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); sav3file = save; decorbuff = sav3file.get_decorations(); decortypebox.SelectedIndex = 0; numericUpDown1.Maximum = slots_max[decortypebox.SelectedIndex]; decorationbox.SelectedIndex = 0; load_decor(); // // TODO: Add constructor code after the InitializeComponent() call. // }
void Load_save(string path) { int filesize = FileIO.load_file(ref savbuffer, ref path, savfilter); if (filesize == SAV3.SAVE_SIZE) { sav3_path.Text = path; sav3file = new SAV3(savbuffer); update_button_state(); language_box.SelectedIndex = sav3file.language - 1; game_box.SelectedIndex = sav3file.game; if (sav3file.isjap && sav3file.language != 1) { DialogResult dialogResult = MessageBox.Show("Region/language autodetection inconsistency.\n\nIs this a japanese savegame?", "Region Input", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { sav3file.isjap = true; region_lab.Text = "JAP"; language_box.SelectedIndex = 0; } else if (dialogResult == DialogResult.No) { sav3file.isjap = false; region_lab.Text = "USA/EUR"; } } sav3file.updateOffsets(); } else if (filesize == -1) { } else { MessageBox.Show("Invalid file."); } }
void Load_save(string path) { int filesize = FileIO.load_file(ref savbuffer, ref path, savfilter); if (filesize == SAV3.SAVE_SIZE) { sav3_path.Text = path; sav3file = new SAV3(savbuffer); region_but.Enabled = false; switch (sav3file.game) { case 0: //Gamelabel.Text = "Ruby/Sapphire"; break; case 1: //Gamelabel.Text = "Emerald"; break; case 2: //Gamelabel.Text = "Fire Red/Leaf Green"; break; default: //Gamelabel.Text = "Can't autodetect save game"; break; } if (sav3file.isjap) { region_lab.Text = "JAP"; } else { region_lab.Text = "USA/EUR"; } region_but.Enabled = true; language_box.SelectedIndex = sav3file.language - 1; game_box.SelectedIndex = sav3file.game; if (sav3file.isjap && sav3file.language != 1) { DialogResult dialogResult = MessageBox.Show("Region/language autodetection inconsistency.\n\nIs this a japanesse savegame?", "Region Input", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { sav3file.isjap = true; region_lab.Text = "JAP"; language_box.SelectedIndex = 0; } else if (dialogResult == DialogResult.No) { sav3file.isjap = false; region_lab.Text = "USA/EUR"; } } sav3file.updateOffsets(); } else if (filesize == -1) { ; } else { MessageBox.Show("Invalid file."); } }