private void init(StarterProfile p) { InitializeComponent(); Translator.TranslateForm(this); InitLocales(); AnyGameStarter.Program.TryRestorePermissions(); GameUtils.RedetectGames(); initGames(); nameBox.Enabled = false; niceLanguageBox.Enabled = false; languageBox.Enabled = false; locationBox.Enabled = false; _dontChangeExecutable = true; foreach (string game in p.InstalledGames) { if (expansionBox.Items.ContainsKey(game)) { expansionBox.Items[game].Checked = expansionBox.CheckBoxes; } } nameBox.Text = p.Name; executableBox.Text = p.Executable; languageBox.Text = p.Locale; Text = Translator.GetText("EditProfileDialog"); AdvancedCheck.Checked = false; }
private void init() { InitializeComponent(); AdvancedCheck.Checked = false; Translator.TranslateForm(this); InitLocales(); initGames(); int i = 1; b: string name = "AnyGame " + i; foreach (var profile in StarterProfile.Profiles) { if (profile.Name == name) { i++; goto b; } } nameBox.Text = name; if (GameUtils.UnifiedExe != null) { executableBox.Text = GameUtils.UnifiedExe; } else { AdvancedCheck.Checked = true; } languageBox.Text = GameUtils.Locale; }
public AboutBox() { InitializeComponent(); Translator.TranslateForm(this); var version = Assembly.GetExecutingAssembly().GetName().Version; versionInfo.Text = Translator.GetText("Version", version.Major.ToString(), version.Minor.ToString()) + "/" + (GameUtils.BaseGame == null ? "N" : GameUtils.BaseGame.Sku.ToString()) + "." + System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag ; // +"." + GameUtils.Locale; }
public AddProfileDialog(bool b) { InitializeComponent(); Translator.TranslateForm(this); InitLocales(); initGames(); nameBox.Text = "Default"; locationBox.Text = ""; executableBox.Text = GameUtils.UnifiedExe; languageBox.Text = GameUtils.Locale; nameBox.Enabled = false; locationBox.Enabled = false; executableBox.Enabled = false; expansionBox.Enabled = false; foreach (ListViewItem i in expansionBox.Items) { i.Checked = expansionBox.CheckBoxes; } Text = Translator.GetText("DefaultProfileDialog"); AdvancedCheck.Checked = false; }
public StartGameErrorDialog(StartGameResult startGameResult) { InitializeComponent(); Translator.TranslateForm(this); switch (startGameResult) { case StartGameResult.EarlyGameExit: mainInstruction.Text = Translator.GetText("EarlyGameExitMainInstruction"); subTitle.Text = Translator.GetText("EarlyGameExitSubtitle"); instruction.Text = Translator.GetText("EarlyGameExitInstruction1") + "\n\n" + Translator.GetText("EarlyGameExitInstruction2") + "\n\n" + Translator.GetText("EarlyGameExitInstruction3"); break; case StartGameResult.Failure: mainInstruction.Text = Translator.GetText("FailureMainInstruction"); subTitle.Text = Translator.GetText("FailureSubtitle"); instruction.Text = Translator.GetText("FailureInstruction1") + "\n\n" + Translator.GetText("FailureInstruction2") + "\n\n" + Translator.GetText("FailureInstruction3"); break; case StartGameResult.PermissionsNeeded: mainInstruction.Text = Translator.GetText("PermissionsNeededMainInstruction"); subTitle.Text = Translator.GetText("PermissionsNeededSubtitle"); instruction.Text = Translator.GetText("PermissionsNeededInstruction1") + "\n\n" + Translator.GetText("PermissionsNeededInstruction2") + "\n\n" + Translator.GetText("PermissionsNeededInstruction3"); break; case StartGameResult.ProfileNotFound: mainInstruction.Text = Translator.GetText("ProfileMissingMainInstruction"); subTitle.Text = Translator.GetText("ProfileMissingSubtitle"); instruction.Text = Translator.GetText("ProfileMissingInstruction1"); break; } }
/// <summary> /// Main initialization procedure /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainForm_Load(object sender, EventArgs e) { if (GameUtils.BaseGame == null) { if (MessageBox.Show(Translator.GetText("NoSimsFound"), "Any Game Starter 3", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { Close(); Application.Exit(); return; } } //Program.TryRestorePermissions(); Translator.TranslateForm(this); if (StarterProfile.IsFirstRun()) { new AboutBox().ShowDialog(); } DefaultProfileItem = new ListViewItem(Translator.GetText("DefaultProfile")); DefaultProfileItem.SubItems.Add("All"); DefaultProfileItem.ImageIndex = 0; Profiles.Groups.Add("default", Translator.GetText("DefaultProfileSection")); Profiles.Groups.Add("anygame", Translator.GetText("AdditionalProfileSection")); ReloadProfiles(); }