void CreatePackage() { List<byte[]> Data = new List<byte[]>(); List<string> Names = new List<string>(); Data.Add(File.ReadAllBytes(file)); Names.Add("body_LZ.bin"); if (chb_pngprev.Checked) { Sim frm = new Sim(); frm.Show(); Data.Add(frm.GeneratePreview()); Names.Add("Preview.png"); } if (File.Exists(Path.GetDirectoryName(file) + @"\bgm.bcstm")) { Data.Add(File.ReadAllBytes(Path.GetDirectoryName(file) + @"\bgm.bcstm")); Names.Add("bgm.bcstm"); if (chb_bmgprev.Checked && File.Exists(ogg)) { Data.Add(File.ReadAllBytes(ogg)); Names.Add("BGM.ogg"); } } if (chb_smdhinfo.Checked && File.Exists(SMDH)) { Data.Add(File.ReadAllBytes(SMDH)); Names.Add("info.smdh"); } DataToSend = Data.ToArray(); DataNames = Names.ToArray(); return; }
private void SimToolStrip_Click(object sender, EventArgs e) { Sim sim = new Sim(); sim.Show(); }
private void saveFile_Click(object sender, EventArgs e) { makeTheme(path + "new_dec_" + filename); dsdecmp.Compress(path + "new_dec_" + filename, path + filename); File.Delete(path + "new_dec_" + filename); if (APP_AutoGen_preview) { Sim frm = new Sim(); Preview_PATH = path + filename + ".png" ; generating_preview = true; frm.ShowDialog(); generating_preview = false; Preview_PATH = null; } StatusLabel.Visible = false; this.Refresh(); MessageBox.Show(messages[7]); }
private void generatePreviewForCHMMToolStripMenuItem_Click(object sender, EventArgs e) { Sim frm = new Sim(); Preview_PATH = null; generating_preview = true; frm.ShowDialog(); generating_preview = false; }
private void saveAsFile_Click(object sender, EventArgs e) { saveTheme.FileName = "body_LZ.bin"; if (saveTheme.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string newpath = saveTheme.FileName.Substring(0, saveTheme.FileName.LastIndexOf("\\") + 1); makeTheme(newpath + "new_dec_" + filename); dsdecmp.Compress(newpath + "new_dec_" + filename, saveTheme.FileName); File.Delete(newpath + "new_dec_" + filename); if (APP_AutoGen_preview) { Sim frm = new Sim(); Preview_PATH = path + filename + ".png"; generating_preview = true; frm.ShowDialog(); generating_preview = false; Preview_PATH = null; } StatusLabel.Visible = false; this.Refresh(); MessageBox.Show(messages[7]); } }