Finished implementing localized game selection names

- Example: https://up.gmatrixgames.ga/u4VqZl.png
This commit is contained in:
GMatrixGames 2020-10-12 18:48:58 -04:00
parent 231ffeb0f7
commit 182c05bc8e
No known key found for this signature in database
GPG Key ID: 19B7F96FB9AF302F

View File

@ -36,68 +36,68 @@ namespace FModel.Windows.Launcher
if (!string.IsNullOrEmpty(fortniteFilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Fortnite found at {fortniteFilesPath}");
Globals.gNotifier.ShowCustomMessage("Fortnite", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/fortnite.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Fortnite", Property = fortniteFilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_Fortnite, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/fortnite.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Fortnite, Property = fortniteFilesPath });
}
string egl2FilesPath = EGL2.GetEGL2PakFilesPath();
if (!string.IsNullOrEmpty(egl2FilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[EGL2]", $"Fortnite found at {egl2FilesPath}");
Globals.gNotifier.ShowCustomMessage("Fortnite", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/egl2.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Fortnite [EGL2]", Property = egl2FilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_Fortnite, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/egl2.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Fortnite + " [EGL2]", Property = egl2FilesPath });
}
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Fortnite [LIVE]", Property = "donotedit-youcanteditanyway-fn.manifest" });
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Fortnite + " [LIVE]", Property = "donotedit-youcanteditanyway-fn.manifest" });
string valorantFilesPath = Paks.GetValorantPakFilesPath();
if (!string.IsNullOrEmpty(valorantFilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[RiotClientInstalls.json]", $"Valorant found at {valorantFilesPath}");
Globals.gNotifier.ShowCustomMessage("Valorant", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/valorant.live.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Valorant", Property = valorantFilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_Valorant, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/valorant.live.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Valorant, Property = valorantFilesPath });
}
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Valorant [LIVE]", Property = "donotedit-youcanteditanyway-val.manifest" });
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Valorant + " [LIVE]", Property = "donotedit-youcanteditanyway-val.manifest" });
string borderlands3FilesPath = Paks.GetBorderlands3PakFilesPath();
if (!string.IsNullOrEmpty(borderlands3FilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Borderlands 3 found at {borderlands3FilesPath}");
Globals.gNotifier.ShowCustomMessage("Borderlands 3", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/borderlands3.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Borderlands 3", Property = borderlands3FilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_Borderlands3, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/borderlands3.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Borderlands3, Property = borderlands3FilesPath });
}
string minecraftdungeonsFilesPath = Paks.GetMinecraftDungeonsPakFilesPath();
if (!string.IsNullOrEmpty(minecraftdungeonsFilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[launcher_settings.json]", $"Minecraft Dungeons found at {minecraftdungeonsFilesPath}");
Globals.gNotifier.ShowCustomMessage("Minecraft Dungeons", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/minecraftdungeons.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Minecraft Dungeons", Property = minecraftdungeonsFilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_MinecraftDungeons, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/minecraftdungeons.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_MinecraftDungeons, Property = minecraftdungeonsFilesPath });
}
string battlebreakersFilesPath = Paks.GetBattleBreakersPakFilesPath();
if (!string.IsNullOrEmpty(battlebreakersFilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Battle Breakers found at {battlebreakersFilesPath}");
Globals.gNotifier.ShowCustomMessage("Battle Breakers", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/battlebreakers.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Battle Breakers", Property = battlebreakersFilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_BattleBreakers, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/battlebreakers.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_BattleBreakers, Property = battlebreakersFilesPath });
}
string spellbreakFilesPath = Paks.GetSpellbreakPakFilesPath();
if (!string.IsNullOrEmpty(spellbreakFilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Spellbreak found at {spellbreakFilesPath}");
Globals.gNotifier.ShowCustomMessage("Spellbreak", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/spellbreak.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Spellbreak", Property = spellbreakFilesPath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_Spellbreak, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/spellbreak.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_Spellbreak, Property = spellbreakFilesPath });
}
string theCyclePath = Paks.GetTheCyclePakFilesPath();
if (!string.IsNullOrEmpty(theCyclePath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"The Cycle found at {theCyclePath}");
Globals.gNotifier.ShowCustomMessage("The Cycle (EA)", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/thecycle.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "The Cycle (Early Access)", Property = theCyclePath });
Globals.gNotifier.ShowCustomMessage(Properties.Resources.GameName_TheCycle, Properties.Resources.PathAutoDetected, "/FModel;component/Resources/thecycle.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = Properties.Resources.GameName_TheCycle, Property = theCyclePath });
}
//string sod2Path = Paks.GetStateOfDecay2PakFilesPath();
@ -109,7 +109,7 @@ namespace FModel.Windows.Launcher
// ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "State of Decay 2", Property = sod2Path });
//}
Games_CbBox.SelectedItem = ComboBoxVm.gamesCbViewModel.Where(x => x.Property.ToString() == Properties.Settings.Default.PakPath).FirstOrDefault();
Games_CbBox.SelectedItem = ComboBoxVm.gamesCbViewModel.FirstOrDefault(x => x.Property.ToString() == Properties.Settings.Default.PakPath);
}
private void OnClick(object sender, RoutedEventArgs e)