Example #1
0
        void ApplySetting(object sender, EventArgs e)
        {
            //应用设置

            Settings.Default["double_countdown"]        = Convert.ToDouble(textBox_countdown.Text);
            Settings.Default["checkBox_text"]           = checkBox_text.Checked;
            Settings.Default["checkBox_gift"]           = checkBox_gift.Checked;
            Settings.Default["checkBox_sir"]            = checkBox_sir.Checked;
            Settings.Default["checkBox_suffix"]         = checkBox_suffix.Checked;
            Settings.Default["checkBox_latiaoCounter"]  = checkBox_latiaoCounter.Checked;
            Settings.Default["checkBox_blockDuplicate"] = checkBox_blockDuplicate.Checked;
            if (comboBox_Chinese.SelectedIndex == -1)
            {
                Settings.Default["str_TTSChinese"] = "";
            }
            else
            {
                Settings.Default["str_TTSChinese"] = comboBox_Chinese.Items[comboBox_Chinese.SelectedIndex].ToString();
            }
            if (comboBox_English.SelectedIndex == -1)
            {
                Settings.Default["str_TTSEnglish"] = "";
            }
            else
            {
                Settings.Default["str_TTSEnglish"] = comboBox_English.Items[comboBox_English.SelectedIndex].ToString();
            }
            if (comboBox_Japanese.SelectedIndex == -1)
            {
                Settings.Default["str_TTSJapanese"] = "";
            }
            else
            {
                Settings.Default["str_TTSJapanese"] = comboBox_Japanese.Items[comboBox_Japanese.SelectedIndex].ToString();
            }
            Settings.Default.Save();

            bool[] bool_setting =
            {
                checkBox_text.Checked,
                checkBox_gift.Checked,
                checkBox_sir.Checked,
                checkBox_suffix.Checked,
                checkBox_latiaoCounter.Checked,
                checkBox_blockDuplicate.Checked,
            };
            Double double_countdown = Convert.ToDouble(textBox_countdown.Text);

            string[] str_TTSSetting =
            {
                comboBox_Chinese.Items[comboBox_Chinese.SelectedIndex].ToString(),
                comboBox_Japanese.Items[comboBox_Japanese.SelectedIndex].ToString(),
                comboBox_English.Items[comboBox_English.SelectedIndex].ToString(),
            };

            BililiveTtsPlugin.ApplySetting(bool_setting, double_countdown, str_TTSSetting);
            this.Text = "谷歌娘属性调教中心";
            this.Text = "谷歌娘属性调教中心 - 调教成功";
        }
Example #2
0
 private void button_reload_Click(object sender, EventArgs e)
 {
     BililiveTtsPlugin.ReloadJson();
 }