Skip to content

Commit

Permalink
Merge branch develop v9.3.7-211107.2014
Browse files Browse the repository at this point in the history
  • Loading branch information
anoyetta committed Nov 7, 2021
2 parents 88fd713 + d225301 commit 60d7265
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,5 @@ Advanced Combat Tracker.exe
source_dotnet5/

resources/desktop.ini

*.lnk
2 changes: 1 addition & 1 deletion source/@MasterVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v9.3.6
v9.3.7
4 changes: 2 additions & 2 deletions source/ACT.Hojoring.Common/Version.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;

[assembly: AssemblyVersion("9.3.0.6")]
[assembly: AssemblyFileVersion("9.3.0.6")]
[assembly: AssemblyVersion("9.3.0.7")]
[assembly: AssemblyFileVersion("9.3.0.7")]
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,14 @@ public void Dispose()
DiscordBridge.Instance.SendMessageDelegate = null;
DiscordBridge.Instance.SendSpeakingDelegate = null;

this.Disconnect();
if (this.isConnected)
{
this.Disconnect();
}
}

private bool isConnected;

public async void Connect(
bool isInitialize = false)
{
Expand Down Expand Up @@ -207,6 +212,8 @@ public async void Connect(
await this.discordClient.LoginAsync(TokenType.Bot, this.Config.Token);
await Task.Delay(TimeSpan.FromSeconds(0.25));
await this.discordClient.StartAsync();

this.isConnected = true;
}
catch (Exception ex)
{
Expand Down Expand Up @@ -246,6 +253,8 @@ public async void Disconnect()
this.discordClient?.Dispose();
this.discordClient = null;
}

this.isConnected = false;
}

public async void JoinVoiceChannel()
Expand Down
32 changes: 19 additions & 13 deletions source/ACT.TTSYukkuri/ACT.TTSYukkuri.Core/PluginCore.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using ACT.TTSYukkuri.Config;
using ACT.TTSYukkuri.Config.Views;
using ACT.TTSYukkuri.Discord.Models;
Expand All @@ -10,15 +19,6 @@
using FFXIV.Framework.WPF;
using FFXIV.Framework.WPF.Views;
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.Integration;

namespace ACT.TTSYukkuri
{
Expand Down Expand Up @@ -474,8 +474,11 @@ await Task.Run(() =>
// CeVIOをアイコン化する
if (Settings.Default.TTS == TTSType.Sasara)
{
CevioTrayManager.Start();
CevioTrayManager.ToIcon();
if (Settings.Default.SasaraSettings.IsHideCevioWindow)
{
CevioTrayManager.Start();
CevioTrayManager.ToIcon();
}
}

if (this.PluginStatusLabel != null)
Expand Down Expand Up @@ -521,8 +524,11 @@ public void DeInitPlugin()
try
{
// CeVIO のアイコン化を解除する
CevioTrayManager.RestoreWindow();
CevioTrayManager.End();
if (Settings.Default.SasaraSettings.IsHideCevioWindow)
{
CevioTrayManager.RestoreWindow();
CevioTrayManager.End();
}

// 設定を保存する
Settings.Default.Save();
Expand Down

0 comments on commit 60d7265

Please sign in to comment.