Example #1
0
        public void OpenFile_Click(object sender, EventArgs e)
        {
            string path = "";

            path = AndiFileDialog.OpenDialog(path, _LastPath, "WildEncounter EX Gen IV - File Open", "Any Files|*.*|Narc Files|*.*");

            if (path != "")
            {
                Program.GlobalPath = Path.GetDirectoryName(path);
                _LastPath          = Path.GetDirectoryName(path);

                flepath = new FileInfo(path);
                Program.mForm.fname.Text = flepath.Name;
                Program.mForm.fsize.Text = flepath.Length + "";

                if (CheckMagicHeaderID.get(path) != "NARC")
                {
                    MessageBox.Show("This Not NARC File, File Extension Signature is " + CheckMagicHeaderID.get(path) + ", and is not NARC File!", "Error!");
                    return;
                }

                narc.OpenData(path);
                EventsAfterOpenFile();
            }
        }
Example #2
0
        public void SaveFile_Click(object sender, EventArgs e)
        {
            AndiFileDialog.NarcSaveDialog(Narc[0], Path.GetDirectoryName(_LastPath), "Save Evolution Data", "narc file|*.narc");

            if (isBabyEvoOpened)
            {
                AndiFileDialog.NarcSaveDialog(Narc[1], Path.GetDirectoryName(_LastPath), "Save Base Evolution Data", "narc file|*.narc");
            }
        }
Example #3
0
        public void OpenFile_Click(object sender, EventArgs e)
        {
            string path = "", path2 = "";

            path = AndiFileDialog.OpenDialog(path, Path.GetDirectoryName(_LastPath), "Evolution Narc File - File Open", "Any Files|*.*|Narc Files|*.*");

            if (path != "")
            {
                flepath = new FileInfo(path);
                Program.mForm.fname.Text = flepath.Name;
                Program.mForm.fsize.Text = flepath.Length + "";

                path2 = AndiFileDialog.OpenDialog(path2, Path.GetDirectoryName(_LastPath), "BabyEvolution Narc File - File Open", "Any Files|*.*|Narc Files|*.*");
            }

            if (path2 != "")
            {
                if (CheckMagicHeaderID.get(path2) != "NARC")
                {
                    MessageBox.Show(
                        "This Not NARC File, File Extension Signature is " + CheckMagicHeaderID.get(path2) + ", and is not NARC File!", "Error!");
                    isBabyEvoOpened            = false;
                    andiImageComboBox4.Enabled = false;
                }
                else
                {
                    andiImageComboBox4.Enabled = true;
                    Narc[1] = new AndiNarcReader();
                    Narc[1].OpenData(path2);
                    isBabyEvoOpened = true;
                }
            }
            else
            {
                isBabyEvoOpened            = false;
                andiImageComboBox4.Enabled = false;
            }

            if (path != "")
            {
                Program.GlobalPath = Path.GetDirectoryName(path);
                _LastPath          = path;

                if (CheckMagicHeaderID.get(path) != "NARC")
                {
                    MessageBox.Show("This Not NARC File, File Extension Signature is " + CheckMagicHeaderID.get(path) + ", and is not NARC File!", "Error!");
                    return;
                }

                andiCustomTabControl1.Enabled = true;
                Narc[0] = new AndiNarcReader();
                Narc[0].OpenData(path);
                EventsAfterOpenFile();
            }
        }
Example #4
0
 public void SaveFile_Click(object sender, EventArgs e)
 {
     try
     {
         AndiFileDialog.NarcSaveDialog(narc, Path.GetDirectoryName(_LastPath), "Save Moveset Data", "narc file|*.narc");
     }
     catch (Exception ex)
     {
         Database.InsertReader.InsertLogs("Error", "Yellow", ex);
     }
 }
Example #5
0
        public void SaveFile_Click(object sender, EventArgs e)
        {
            try
            {
                AndiFileDialog.NarcSaveDialog(narc, Path.GetDirectoryName(_LastPath), "Save In-Game Trade Data", "narc file|*.narc");
            }
            catch (Exception ex)
            {
#if DEBUG
                Database.InsertReader.InsertLogs("error", "Yello", ex);
#endif
            }
        }
Example #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            string path = "";

            path = AndiFileDialog.OpenDialog(path, _LastPath, "OVA9 Table - File Open", "Any Files|*.*|Bin Files|*.bin");

            if (path != "")
            {
                a = new FileStream(path, FileMode.Open);
                int b = (int)(a.Length / 32);
                object[,] datatemp = new object[b, 9];

                for (int i = 0; i < b; i++)
                {
                    byte[] buffernew = new byte[4];
                    a.Position = 0 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 0] = BitConverter.ToUInt32(buffernew, 0);
                    a.Position     = 4 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 1] = BitConverter.ToUInt32(buffernew, 0).ToString("x8");
                    a.Position     = 8 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 2] = BitConverter.ToUInt32(buffernew, 0);
                    a.Position     = 12 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 3] = BitConverter.ToUInt32(buffernew, 0);
                    a.Position     = 16 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 4] = BitConverter.ToUInt32(buffernew, 0).ToString("x8");
                    a.Position     = 20 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 5] = BitConverter.ToUInt32(buffernew, 0).ToString("x8");
                    a.Position     = 24 + i * 32;
                    a.Read(buffernew, 0, 4);
                    datatemp[i, 6] = BitConverter.ToUInt32(buffernew, 0);
                    a.Position     = 28 + i * 32;
                    buffernew      = new byte[3];
                    a.Read(buffernew, 0, 3);
                    datatemp[i, 7] = BitConverter.ToUInt16(buffernew, 0).ToString("x8");

                    a.Position = 31 + i * 32;
                    buffernew  = new byte[1];
                    a.Read(buffernew, 0, 1);
                    datatemp[i, 8] = (int)buffernew[0];
                }

                FillGrid.Build(grid1, b, 9, "OVA#", "RAM Addr", "RAM Size", "BSS Size", "Static InitStart", "Static InitEnd", "File ID#", "RESERVED", "Compressed Flag");
                Fill(grid1, datatemp);
            }
        }
Example #7
0
        public void OpenFile_Click(object sender, EventArgs e)
        {
            try
            {
                string path = "";

                path = AndiFileDialog.OpenDialog(path, _LastPath, "InGameTrade - File Open", "Any Files|*.*|Narc Files|*.*");

                if (path != "")
                {
                    Program.GlobalPath = Path.GetDirectoryName(path);
                    _LastPath          = Path.GetDirectoryName(path);
                    _LastPath2         = path;
                    FileStream a = new FileStream(path, FileMode.Open);
                    Program.mForm.fname.Text = a.Name;
                    Program.mForm.fsize.Text = a.Length + "";
                    byte[] bytee = new byte[4];

                    a.Position = 0;

                    a.Read(bytee, 0, 4);

                    string check = System.Text.Encoding.ASCII.GetString(bytee);
                    a.Close();

                    if (check != "NARC")
                    {
                        MessageBox.Show("This Not NARC File, File Extension Signature is " + check + ", and is not NARC File!", "Error!");
                        return;
                    }

                    narc.OpenData(path);

                    if (narc.FileCount != 20)
                    {
                        MessageBox.Show("Invalid File.", "Error!");
                        return;
                    }

                    EventsAfterOpenFile();
                }
            }
            catch (Exception ex)
            {
#if DEBUG
                Database.InsertReader.InsertLogs("error", "Yello", ex);
#endif
            }
        }
Example #8
0
        public void OpenFile_Click(object sender, EventArgs e)
        {
            try
            {
                string path = "";

                path = AndiFileDialog.OpenDialog(path, _LastPath, "Hidden Grotto - File Open", "Any Files|*.*|Narc Files|*.*");

                if (path != "")
                {
                    Program.GlobalPath = Path.GetDirectoryName(path);
                    _LastPath          = Path.GetDirectoryName(path);

                    flepath = new FileInfo(path);
                    Program.mForm.fname.Text = flepath.Name;
                    Program.mForm.fsize.Text = flepath.Length + "";

                    if (CheckMagicHeaderID.get(path) != "NARC")
                    {
                        MessageBox.Show("This Not NARC File, File Extension Signature is " + CheckMagicHeaderID.get(path) + ", and is not NARC File!", "Error!");
                        return;
                    }

                    narc.OpenData(path);

                    if (narc.FileCount != 20)
                    {
                        MessageBox.Show("Invalid File.", "Error!");
                        return;
                    }

                    EventsAfterOpenFile();
                }
            }
            catch (Exception ex)
            {
#if DEBUG
                Database.InsertReader.InsertLogs("error", "Yello", ex);
#endif
            }
        }
Example #9
0
 public void SaveFile_Click(object sender, EventArgs e)
 {
     AndiFileDialog.NarcSaveDialog(narc, Path.GetDirectoryName(_LastPath), "WildEncounter Ex G4 Data", "narc file|*.narc");
 }
Example #10
0
 public void SaveFile_Click(object sender, EventArgs e)
 {
     AndiFileDialog.NarcSaveDialog(narc, Path.GetDirectoryName(_LastPath), "Save Experience Data", "narc file|*.narc");
 }