private void OnResetSettingsButtonClick(out DialogResult dialogResult) { dialogResult = new MessageForm(Globals.Localization.SettingsResetYouSureQuestion, Globals.Localization.YouSureQuestion, Images.Basic.Warning, Images.Basic.Warning, MessageBoxButtons.YesNo, new[] { Globals.Localization.Yes, Globals.Localization.No }) .ShowDialog(); if (dialogResult != DialogResult.Yes) { return; } Globals.ExistFileRewrite.ResetValue(); Globals.QueueAutoDownload.ResetValue(); Globals.ForceClose.ResetValue(); Globals.ConvertSVGToPNG.ResetValue(); Globals.NotStrictAPICheck.ResetValue(); Globals.CheckHash.ResetValue(); _downloadPathTextBox.Text = Globals.DefaultDownloadFolder; _downloadNameTextBox.Text = Globals.DefaultDownloadFileName; LocalizationBase.UpdateLocalization(LocalizationBase.CurrentCulture.LCID); Globals.Config.SaveProperties(); }
void Awake() { LocalizationBase = LocalizationBase.FindObjectOfType <LocalizationBase>(); HaterPlateManager = HaterPlateManager.FindObjectOfType <HaterPlateManager>(); ButtonAudio = GetComponent <AudioSource> (); AmbientAudio = GameObject.Find("GameSceneController/AmbientMusic").GetComponent <AudioSource> (); playerMusicSetting = PlayerPrefs.GetInt("PlayerMusicSetting"); playerSoundSetting = PlayerPrefs.GetInt("PlayerSoundSetting"); playerLanguageSetting = PlayerPrefs.GetInt("PlayerLanguageSetting"); playerLevelNumber = PlayerPrefs.GetInt("PlayerLevelNumber"); if (PlayerPrefs.HasKey("PlayerScore")) { playerScore = PlayerPrefs.GetInt("PlayerScore"); } if (playerScore == 0) { playerScore = playerScore + Mathf.FloorToInt(levelsMaxScores [playerLevelNumber] * 0.15f); } if (playerLevelNumber == 0) { MinExpValue = 0; } else { MinExpValue = Mathf.FloorToInt(playerScore * 0.8f); } UpdateSaves(); }
public void DoLocalization() { LocalizationBase.TranslateControls(this); labelLatestStableVersionValue.Text = strings.versionUnknown; labelLatestVersionValue.Text = strings.versionUnknown; }
public void DoLocalization() { LocalizationBase.TranslateControls(this); toolTip1.SetToolTip(checkBoxAppId, strings.checkBoxAppId_Tooltip); toolTip1.SetToolTip(checkBoxApiKey, strings.checkBoxApiKey_Tooltip); toolTip1.SetToolTip(checkBoxApiSecret, strings.checkBoxApiSecret_Tooltip); }
public void DoLocalization() { LocalizationBase.TranslateControls(this); comboBoxTTSEngine.DataSource = TTSEngineFactory.Engines; labelLatestStableVersionValue.Text = strings.versionUnknown; labelLatestVersionValue.Text = strings.versionUnknown; }
public LocalizationComboBox(LocalizationBase localization) { _localizationBase = localization ?? throw new NullReferenceException(); BindingContext = new BindingContext(); DataSource = GetItemsForDataSource(); LocalizationBase.LanguageChanged += SetLanguage; LanguageChanged += lcid => LocalizationBase.UpdateLocalization(lcid, _localizationBase.AvailableLocalization); SetLanguage(); }
void Awake() { LocalizationBase = LocalizationBase.FindObjectOfType <LocalizationBase>(); ButtonAudio = GetComponent <AudioSource> (); AmbientAudio = GameObject.Find("MainMenuController/AmbientMusic").GetComponent <AudioSource> (); UpdateSaves(); UpdateAmbientMusic(); }
private void ControllerOnLanguageChanged(bool fromView, string lang) { if (fromView) { return; } var ld = LocalizationBase.GetLanguage(lang); _controller.NotifyLanguageChanged(true, ld.LangCode); comboBoxLanguage.SelectedValue = ld.LangCode; }
public void SetLanguage(Int32 lcid) { Int32 selectedIndex = LocalizationBase.GetLanguageOrderID(lcid); if (MathUtils.InRange(selectedIndex, MathUtils.Position.Left, 0, Items.Count)) { SelectedIndex = selectedIndex; return; } SelectedIndex = LocalizationBase.GetLanguageOrderID(LocalizationBase.BasicCulture.LCID); }
public void DoLocalization() { LocalizationBase.TranslateControls(this); var settings = _plugin.Settings.BaipiaoSettings; if (!settings.Accept) { MessageBox.Show(strings.labelBaipiaoDisclaimer, strings.actPanelTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); settings.Accept = true; } }
public void DoLocalization() { LocalizationBase.TranslateControls(this); foreach (var cs in _channelSettings) { cs.ButtonColor.Font = DefaultFont; } comboBoxProxyType.DisplayMember = nameof(Item.Name); comboBoxProxyType.ValueMember = nameof(Item.Value); comboBoxProxyType.DataSource = new[] { new Item(strings.proxyTypeNone, ProxyFactory.TypeNone), new Item(strings.proxyTypeHttp, ProxyFactory.TypeHttp), new Item(strings.proxyTypeSocks5, ProxyFactory.TypeSocks5) }.ToList(); labelLatestStableVersionValue.Text = strings.versionUnknown; labelLatestVersionValue.Text = strings.versionUnknown; translateProviderPanel.DoLocalization(); }
void Awake() { LocalizationBase = LocalizationBase.FindObjectOfType <LocalizationBase> (); GameSceneController = GameSceneController.FindObjectOfType <GameSceneController> (); HaterPlateManager = HaterPlateManager.FindObjectOfType <HaterPlateManager> (); HaterAudio = GetComponent <AudioSource>(); HaterSetType(); BusterHater(); if (!IsBoss) { haterCurrentExp = Random.Range(Mathf.FloorToInt(haterMaxExp * 0.15f), Mathf.FloorToInt(haterMaxExp * 0.85f)); haterCurrentHp = Random.Range(Mathf.FloorToInt(haterMaxHp * 0.3f), Mathf.FloorToInt(haterMaxHp * 1f)); } else { SetSelebrity(); } haterExpSlider.maxValue = haterMaxExp; haterHpSlider.maxValue = haterMaxHp; UpdateHaterFraze(); UpdateHaterName(); UpdateText(); }
public static void ConfigLocalization(string code) { strings.Culture = CultureInfo.GetCultureInfo(code); LocalizationBase.ConfigLocalization(code); }
static Localization() { LocalizationBase.InitLocalization(strings.ResourceManager, SupportedLanguages, DefaultLanguage); }
public void DoLocalization() { LocalizationBase.TranslateControls(this); }