private void Button1_Click(object sender, EventArgs e) { if (storageFolderBrowserDialog.ShowDialog() != DialogResult.OK) { DialogResult = DialogResult.Cancel; return; } string path = storageFolderBrowserDialog.SelectedPath; if (!File.Exists(Path.Combine(path, ".build.info"))) { MessageBox.Show("Invalid storage folder selected!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } _gameType = CASCGame.DetectLocalGame(path); if (_gameType == CASCGameType.Unknown) { return; } textBox1.Text = path; if (_gameType == CASCGameType.WoW) { wowProductComboBox.Enabled = true; } }
public static string GetDataFolder(CASCGameType gameType) { if (gameType == CASCGameType.HotS) { return("HeroesData"); } if (gameType == CASCGameType.S2) { return("SC2Data"); } if (gameType == CASCGameType.Hearthstone) { return("Hearthstone_Data"); } if (gameType == CASCGameType.WoW || gameType == CASCGameType.D3) { return("Data"); } if (gameType == CASCGameType.Overwatch) { return("data/casc"); } return(null); }
public static string GetDataFolder(CASCGameType gameType) { if (gameType == CASCGameType.HotS) { return("HeroesData"); } if (gameType == CASCGameType.S2) { return("SC2Data"); } if (gameType == CASCGameType.Hearthstone) { return("Hearthstone_Data"); } if (gameType == CASCGameType.WoW || gameType == CASCGameType.D3) { return("Data"); } if (gameType == CASCGameType.Overwatch) { return("data/casc"); } throw new Exception("GetDataFolder called with unsupported gameType"); }
private void Button1_Click(object sender, EventArgs e) { if (storageFolderBrowserDialog.ShowDialog() != DialogResult.OK) { DialogResult = DialogResult.Cancel; return; } string path = storageFolderBrowserDialog.SelectedPath; if (!File.Exists(Path.Combine(path, ".build.info"))) { MessageBox.Show("Invalid storage folder selected!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } _gameType = CASCGame.DetectLocalGame(path); if (_gameType == CASCGameType.Unknown) { return; } textBox1.Text = path; productComboBox.Items.Clear(); productComboBox.Enabled = sharedInstallProducts.TryGetValue(_gameType, out var products); if (productComboBox.Enabled) { productComboBox.Items.AddRange(products); } }
public static bool SupportsLocaleSelection(CASCGameType gameType) { return(gameType == CASCGameType.D3 || gameType == CASCGameType.WoW || gameType == CASCGameType.HotS || gameType == CASCGameType.S2 || gameType == CASCGameType.Overwatch); }
public static string GetDataFolder(CASCGameType gameType) { if (gameType == CASCGameType.WoW || gameType == CASCGameType.D3 || gameType == CASCGameType.WC3) { return("Data"); } throw new Exception("GetDataFolder called with unsupported gameType"); }
private void OnStorageChanged() { CASCHandler casc = viewHelper.CASC; CASCConfig cfg = casc.Config; CASCGameType gameType = cfg.GameType; bool isWoW = gameType == CASCGameType.WoW; extractInstallFilesToolStripMenuItem.Enabled = true; extractCASCSystemFilesToolStripMenuItem.Enabled = true; scanFilesToolStripMenuItem.Enabled = isWoW; analyseUnknownFilesToolStripMenuItem.Enabled = isWoW || gameType == CASCGameType.Overwatch; addFileDataIDToSoundFilesToolStripMenuItem.Enabled = isWoW; analyzeSoundFilesToolStripMenuItem.Enabled = isWoW; localeFlagsToolStripMenuItem.Enabled = CASCGame.SupportsLocaleSelection(gameType); useLVToolStripMenuItem.Enabled = isWoW; exportListfileToolStripMenuItem.Enabled = true; CASCFolder root = viewHelper.Root; TreeNode node = new TreeNode() { Name = root.Name, Tag = root, Text = "Root [Read only]" }; folderTree.Nodes.Add(node); node.Nodes.Add(new TreeNode() { Name = "tempnode" }); // add dummy node node.Expand(); folderTree.SelectedNode = node; if (cfg.OnlineMode) { CDNBuildsToolStripMenuItem.Enabled = true; if (cfg.Builds.Count > 1) { foreach (var bld in cfg.Builds) { CDNBuildsToolStripMenuItem.DropDownItems.Add(bld["build-name"][0]); } } else { CDNBuildsToolStripMenuItem.DropDownItems.Add(cfg.BuildName); } } statusProgress.Visible = false; statusLabel.Text = string.Format("Loaded {0} files ({1} names missing)", casc.Root.CountSelect - casc.Root.CountUnknown, casc.Root.CountUnknown); }
public static string GetDataFolder(CASCGameType gameType) { if (gameType == CASCGameType.HotS) return "HeroesData"; if (gameType == CASCGameType.S2) return "SC2Data"; if (gameType == CASCGameType.Hearthstone) return "Hearthstone_Data"; if (gameType == CASCGameType.WoW || gameType == CASCGameType.D3) return "Data"; if (gameType == CASCGameType.Overwatch) return "data/casc"; return null; }
public static bool SupportsLocaleSelection(CASCGameType gameType) { return gameType == CASCGameType.D3 || gameType == CASCGameType.WoW || gameType == CASCGameType.HotS || gameType == CASCGameType.S2 || gameType == CASCGameType.Overwatch; }