コード例 #1
0
        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();
        }
コード例 #2
0
    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();
    }
コード例 #3
0
        public void DoLocalization()
        {
            LocalizationBase.TranslateControls(this);

            labelLatestStableVersionValue.Text = strings.versionUnknown;
            labelLatestVersionValue.Text       = strings.versionUnknown;
        }
コード例 #4
0
 public void DoLocalization()
 {
     LocalizationBase.TranslateControls(this);
     toolTip1.SetToolTip(checkBoxAppId, strings.checkBoxAppId_Tooltip);
     toolTip1.SetToolTip(checkBoxApiKey, strings.checkBoxApiKey_Tooltip);
     toolTip1.SetToolTip(checkBoxApiSecret, strings.checkBoxApiSecret_Tooltip);
 }
コード例 #5
0
        public void DoLocalization()
        {
            LocalizationBase.TranslateControls(this);

            comboBoxTTSEngine.DataSource       = TTSEngineFactory.Engines;
            labelLatestStableVersionValue.Text = strings.versionUnknown;
            labelLatestVersionValue.Text       = strings.versionUnknown;
        }
コード例 #6
0
 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();
 }
コード例 #7
0
    void Awake()
    {
        LocalizationBase = LocalizationBase.FindObjectOfType <LocalizationBase>();
        ButtonAudio      = GetComponent <AudioSource> ();
        AmbientAudio     = GameObject.Find("MainMenuController/AmbientMusic").GetComponent <AudioSource> ();

        UpdateSaves();
        UpdateAmbientMusic();
    }
コード例 #8
0
        private void ControllerOnLanguageChanged(bool fromView, string lang)
        {
            if (fromView)
            {
                return;
            }
            var ld = LocalizationBase.GetLanguage(lang);

            _controller.NotifyLanguageChanged(true, ld.LangCode);
            comboBoxLanguage.SelectedValue = ld.LangCode;
        }
コード例 #9
0
        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);
        }
コード例 #10
0
        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;
            }
        }
コード例 #11
0
        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();
        }
コード例 #12
0
    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();
    }
コード例 #13
0
 public static void ConfigLocalization(string code)
 {
     strings.Culture = CultureInfo.GetCultureInfo(code);
     LocalizationBase.ConfigLocalization(code);
 }
コード例 #14
0
 static Localization()
 {
     LocalizationBase.InitLocalization(strings.ResourceManager, SupportedLanguages, DefaultLanguage);
 }
コード例 #15
0
 public void DoLocalization()
 {
     LocalizationBase.TranslateControls(this);
 }