CrystalMpq.Explorer.MainForm.OpenWoWFileSystem C# (CSharp) Method

OpenWoWFileSystem() private method

private OpenWoWFileSystem ( ) : void
return void
        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; }
        }