Пример #1
0
        internal void SetFATEAsOccured(FATE fate)
        {
            isMatched = false;
            tryHide();
            this.Invoke(() =>
            {
                label_DutyCount.Text = fate.Area.Name;
                label_DutyName.Text  = fate.Name;
                label_DutyStatus.SetLocalizedText("overlay-fate-occured");
                if (Settings.TTS)
                {
                    Sound_Helper.TTS($"{fate.Name} {Localization.GetText("overlay-fate-occured")}", Localization.GetText("tts-langset"));
                }

                if (Settings.FlashWindow)
                {
                    WinApi.FlashWindow(mainForm.FFXIVProcess);
                }

                if (Settings.PlaySound && Settings.SoundLocation != "" && System.IO.File.Exists(Settings.SoundLocation))
                {
                    Sound_Helper.Play(Settings.SoundLocation, "sound_alert");
                    //System.Media.SoundPlayer player = new System.Media.SoundPlayer(Settings.SoundLocation);
                    //player.Play();
                }

                if (!Settings.ShowOverlay)
                {
                    mainForm.ShowNotification("tweet-fate-occured", fate.Name);
                }
                accentColor = Color.DarkOrange;
                StartBlink();
                Log.I("l-fate-occured-info", fate.Name);
            });
        }
Пример #2
0
        internal void SetDutyAsMatched(Instance instance)
        {
            isMatched = false;
            tryHide();
            this.Invoke(() =>
            {
                label_DutyCount.SetLocalizedText("overlay-queue-waiting-confirm");
                label_DutyName.Text = instance.Name;
                label_DutyStatus.SetLocalizedText("overlay-queue-matched");
                if (Settings.TTS)
                {
                    Sound_Helper.TTS($"{instance.Name} {Localization.GetText("overlay-queue-matched")}", Localization.GetText("tts-langset"));
                }

                if (Settings.FlashWindow)
                {
                    WinApi.FlashWindow(mainForm.FFXIVProcess);
                }

                if (Settings.PlaySound && Settings.SoundLocation != "" && System.IO.File.Exists(Settings.SoundLocation))
                {
                    Sound_Helper.Play(Settings.SoundLocation, "sound_alert");
                    //System.Media.SoundPlayer player = new System.Media.SoundPlayer(Settings.SoundLocation);
                    //player.Play();
                }

                if (!Settings.ShowOverlay)
                {
                    mainForm.ShowNotification("notification-queue-matched", instance.Name);
                }
                Log.S("l-queue-matched", instance.Name);
                accentColor = Color.Red;
                StartBlink();
            });
        }
Пример #3
0
 private void checkBox_PlaySound_CheckedChanged(object sender, EventArgs e)
 {
     button_SoundLocation.Enabled = button_Sound_Stop.Enabled = checkBox_PlaySound.Checked;
     if (button_SoundLocation.Enabled == false)
     {
         Sound_Helper.Stop("sound_alert");
         label_SoundLocation.Text = "";
         Settings.SoundLocation   = "";
     }
     Settings.PlaySound = checkBox_PlaySound.Checked;
     Settings.Save();
 }
Пример #4
0
        private void trackBar_tts_speed_Scroll(object sender, EventArgs e)
        {
            var ttsspeed = trackBar_tts_speed.Value.ToString();

            if (Settings.TTSSpeed == ttsspeed)
            {
                return;
            }
            Settings.TTSSpeed = ttsspeed;
            Settings.Save();
            textBox_tts_speed.Text = Settings.TTSSpeed;
            if (Settings.TTSCache != "2")
            {
                Sound_Helper.TTS_ClearCache();
            }
        }
Пример #5
0
 private void button_tts_test_Click(object sender, EventArgs e)
 {
     Sound_Helper.TTS("hello world", Localization.GetText("tts-langset"));
 }
Пример #6
0
 private void button_tts_clear_cache_Click(object sender, EventArgs e)
 {
     Sound_Helper.TTS_ClearCache();
 }
Пример #7
0
 private void button_Sound_Stop_Click(object sender, EventArgs e)
 {
     Sound_Helper.Stop("sound_alert");
 }