Ejemplo n.º 1
0
        private void OpenArchive(string filename)
        {
            ClearView();

            if (fileSystem != null)
            {
                fileSystem.Dispose();
            }
            fileSystem = null;

            try
            {
                var mpqFileSystem = new MpqFileSystem();

                mpqFileSystem.Archives.Add(new MpqArchive(filename));

                fileSystem = mpqFileSystem;

                SetTitle(filename);
                FillTreeView();

                saveAsToolStripMenuItem.Enabled = true;
                saveAsToolStripButton.Enabled   = true;
            }
            catch (Exception ex) { ErrorDialog(ex.ToString()); }
        }
Ejemplo n.º 2
0
        private void OpenWoWFileSystem()
        {
            UseWaitCursor = true;

            Application.DoEvents();

            if (fileSystem != null)
            {
                fileSystem.Dispose();
            }
            fileSystem = null;

            try
            {
                var wowInstallation = WoWInstallation.Find();

                languagePackDialog.WoWInstallation = wowInstallation;

                foreach (var languagePack in wowInstallation.LanguagePacks)
                {
                    if (languagePack.Culture == System.Globalization.CultureInfo.CurrentCulture)
                    {
                        languagePackDialog.LanguagePack = languagePack;
                    }
                }

                if (wowInstallation.LanguagePacks.Count > 1)
                {
                    if (languagePackDialog.ShowDialog(this) != DialogResult.OK)
                    {
                        return;
                    }
                }

                ClearView();
                fileSystem = wowInstallation.CreateFileSystem(languagePackDialog.LanguagePack, false, true);
                SetTitle(wowInstallation.Path);
                FillTreeView();

                saveAsToolStripMenuItem.Enabled = true;
                saveAsToolStripButton.Enabled   = true;
            }
            catch (Exception ex) { ErrorDialog(ex.ToString()); }
            finally { UseWaitCursor = false; }
        }
Ejemplo n.º 3
0
        private void OpenWoWFileSystem()
        {
            UseWaitCursor = true;

            Application.DoEvents();

            if (fileSystem != null) fileSystem.Dispose();
            fileSystem = null;

            try
            {
                var wowInstallation = WoWInstallation.Find();

                languagePackDialog.WoWInstallation = wowInstallation;

                foreach (var languagePack in wowInstallation.LanguagePacks)
                    if (languagePack.Culture == System.Globalization.CultureInfo.CurrentCulture)
                        languagePackDialog.LanguagePack = languagePack;

                if (wowInstallation.LanguagePacks.Count > 1)
                    if (languagePackDialog.ShowDialog(this) != DialogResult.OK) return;

                ClearView();
                fileSystem = wowInstallation.CreateFileSystem(languagePackDialog.LanguagePack, false, true);
                SetTitle(wowInstallation.Path);
                FillTreeView();

                saveAsToolStripMenuItem.Enabled = true;
                saveAsToolStripButton.Enabled = true;
            }
            catch (Exception ex) { ErrorDialog(ex.ToString()); }
            finally { UseWaitCursor = false; }
        }
Ejemplo n.º 4
0
        private void OpenArchive(string filename)
        {
            ClearView();

            if (fileSystem != null) fileSystem.Dispose();
            fileSystem = null;

            try
            {

                var mpqFileSystem = new MpqFileSystem();

                mpqFileSystem.Archives.Add(new MpqArchive(filename));

                fileSystem = mpqFileSystem;

                SetTitle(filename);
                FillTreeView();

                saveAsToolStripMenuItem.Enabled = true;
                saveAsToolStripButton.Enabled = true;
            }
            catch (Exception ex) { ErrorDialog(ex.ToString()); }
        }