Пример #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();
            }
        }
Пример #2
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();
            }
        }
Пример #3
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
            }
        }