示例#1
0
 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;
 }
示例#2
0
 private void SimToolStrip_Click(object sender, EventArgs e) {
     Sim sim = new Sim();
     sim.Show();
 }
示例#3
0
 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]);
 }
示例#4
0
 private void generatePreviewForCHMMToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Sim frm = new Sim();
     Preview_PATH = null;
     generating_preview = true;
     frm.ShowDialog();
     generating_preview = false;
 }
示例#5
0
 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]);
     }
 }