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()); } }
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; } }
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; } }
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()); } }