void Load_WC3(string path) { int filesize = FileIO.load_file(ref wc3buffer, ref path, wc3filter); if (filesize == wc3.SIZE_WC3 || filesize == wc3.SIZE_WC3_jap) { if (filesize == wc3.SIZE_WC3_jap) { japanese = true; regionlab.Text = "JAP"; header1.MaxLength = 18; header2.MaxLength = 13; body1.MaxLength = 20; body2.MaxLength = 20; body3.MaxLength = 20; body4.MaxLength = 20; footer1.MaxLength = 20; footer2.MaxLength = 20; } else { japanese = false; regionlab.Text = "USA/EUR"; header1.MaxLength = 40; header2.MaxLength = 40; body1.MaxLength = 40; body2.MaxLength = 40; body3.MaxLength = 40; body4.MaxLength = 40; footer1.MaxLength = 40; footer2.MaxLength = 40; } wc3_path.Text = path; wc3file = new wc3(wc3buffer); update_wcdata(); save_wc3_but.Enabled = true; export_script_but.Enabled = true; import_script_but.Enabled = true; xse_export.Enabled = true; xse_import.Enabled = true; custom_script.Checked = false; drawCard(); } else { MessageBox.Show("Invalid file size."); } }
void Load_WCN(string path) { int filesize = FileIO.load_file(ref wcnbuffer, ref path, wcnfilter); if (filesize == SAV3.WCN_SIZE || filesize == SAV3.WCN_SIZE_jap) { if (filesize == SAV3.WCN_SIZE_jap) { japanese = true; regionlab.Text = "JAP"; header1.MaxLength = 20; body1.MaxLength = 20; body2.MaxLength = 20; body3.MaxLength = 20; body4.MaxLength = 20; body5.MaxLength = 20; body6.MaxLength = 20; body7.MaxLength = 20; body8.MaxLength = 20; body9.MaxLength = 20; body10.MaxLength = 20; } else { japanese = false; regionlab.Text = "USA/EUR"; header1.MaxLength = 40; body1.MaxLength = 40; body2.MaxLength = 40; body3.MaxLength = 40; body4.MaxLength = 40; body5.MaxLength = 40; body6.MaxLength = 40; body7.MaxLength = 40; body8.MaxLength = 40; body9.MaxLength = 40; body10.MaxLength = 40; } wc3_path.Text = path; wcnfile = new wc3(wcnbuffer); update_wcdata(); save_wc3_but.Enabled = true; } else { MessageBox.Show("Invalid file size."); } }