상속: IReadFile, IWriteFile
예제 #1
0
 private void btnRestore33_Click(object sender, EventArgs e)
 {
     IPersonality personality = Personalities.ElementAt(cmbPersonality33.SelectedIndex).Value;
     ppParser pp = personality.GetIcfPP();
     string name = "e" + cmbMode33.SelectedIndex.ToString("00") + "_" + personality.Slot.ToString("00") + "_" + cmbHeight33.SelectedIndex.ToString("00") + ".ICF";
     var sub = pp.Subfiles.First(iw => iw.Name.ToLower() == name.ToLower());
     var index = pp.Subfiles.IndexOf(pp.Subfiles.First(iw => iw.Name.ToLower() == name.ToLower()));
     sub = new Subfile(Paths.BACKUP + "\\" + name, sub.Name);
     pp.Subfiles[index] = sub;
     var back = pp.WriteArchive(pp.FilePath, false, "bak", true);
     ShowLoadingForm();
     back.RunWorkerAsync();
     while (back.IsBusy)
     {
         Application.DoEvents();
     }
     HideLoadingForm();
     MessageBox.Show("Finished!");
     LoadICF();
 }
예제 #2
0
 private void btnRestore32_Click(object sender, EventArgs e)
 {
     IPersonality personality = Personalities.ElementAt(cmbPersonality32.SelectedIndex).Value;
     ppParser pp = personality.GetLstPP();
     IWriteFile sub = pp.GetLstFromPP(personality);
     var index = pp.Subfiles.IndexOf(pp.Subfiles.First(iw => iw.Name == sub.Name));
     sub = new Subfile(Paths.BACKUP + "\\" + personality.LSTLocation.Replace('/', ';'), sub.Name);
     pp.Subfiles[index] = sub;
     var back = pp.WriteArchive(pp.FilePath, false, "bak", true);
     ShowLoadingForm();
     back.RunWorkerAsync();
     while (back.IsBusy)
     {
         Application.DoEvents();
     }
     HideLoadingForm();
     MessageBox.Show("Finished!");
 }
예제 #3
0
        private void btnSaveCHR_Click(object sender, EventArgs e)
        {
            if (!File.Exists(chrpath))
                return;

            var index = PP.jg2e01_00_00.Subfiles.IndexOf(PP.jg2e01_00_00.Subfiles.First(pp => pp.Name == "def0" + cmbCharacter.SelectedIndex.ToString() + ".png"));
            var sub = new Subfile(chrpath);
            sub.Name = "def0" + cmbCharacter.SelectedIndex.ToString() + ".png";
            PP.jg2e01_00_00.Subfiles[index] = sub;
            var back = PP.jg2e01_00_00.WriteArchive(PP.jg2e01_00_00.FilePath, false, "bak", true);
            ShowLoadingForm();
            back.RunWorkerAsync();
            while (back.IsBusy)
            {
                Application.DoEvents();
            }
            HideLoadingForm();
            MessageBox.Show("Finished!");
            cmbCharacter_SelectedIndexChanged(null, null);
        }
예제 #4
0
 private void btnRestoreAllCHR_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 2; i++)
     {
         var index = PP.jg2e01_00_00.Subfiles.IndexOf(PP.jg2e01_00_00.Subfiles.First(pp => pp.Name == "def0" + i.ToString() + ".png"));
         var sub = new Subfile(Paths.BACKUP + @"\def0" + i.ToString() + ".png");
         PP.jg2e01_00_00.Subfiles[index] = sub;
     }
     var back = PP.jg2e01_00_00.WriteArchive(PP.jg2e01_00_00.FilePath, false, "bak", true);
     ShowLoadingForm();
     back.RunWorkerAsync();
     while (back.IsBusy)
     {
         Application.DoEvents();
     }
     HideLoadingForm();
     MessageBox.Show("Finished!");
     cmbCharacter_SelectedIndexChanged(null, null);
 }
예제 #5
0
        private void btnRestoreBorder_Click(object sender, EventArgs e)
        {
            if (cmbBorder.SelectedIndex < 0)
                return;

            var index = PP.jg2e06_00_00.Subfiles.IndexOf(PP.jg2e06_00_00.Subfiles.First(pp => pp.Name == "sp_04_02_0" + cmbBorder.SelectedIndex.ToString() + ".tga"));
            var sub = new Subfile(Paths.BACKUP + @"\sp_04_02_0" + cmbBorder.SelectedIndex.ToString() + ".tga");
            PP.jg2e06_00_00.Subfiles[index] = sub;
            var back = PP.jg2e06_00_00.WriteArchive(PP.jg2e06_00_00.FilePath, false, "bak", true);
            ShowLoadingForm();
            back.RunWorkerAsync();
            while (back.IsBusy)
            {
                Application.DoEvents();
            }
            HideLoadingForm();
            MessageBox.Show("Finished!");
            cmbBorder_SelectedIndexChanged(null, null);
        }