-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using PublicOsuBotTransfer; | ||
using Sync; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace RealTimePPDisplayer.Warpper | ||
{ | ||
class PublicOsuBotTransferWarpper | ||
{ | ||
private PublicOsuBotTransferPlugin s_pobt; | ||
public string Token => s_pobt.Token; | ||
public string Username => s_pobt.Username; | ||
|
||
public bool Init() | ||
{ | ||
if (SyncHost.Instance.EnumPluings().FirstOrDefault(p => p.Name == "PublicOsuBotTransferPlugin") is PublicOsuBotTransferPlugin pobt) | ||
{ | ||
if (pobt.GetType().Assembly.GetName().Version >= Version.Parse("1.3.0")) | ||
{ | ||
s_pobt = pobt; | ||
return true; | ||
} | ||
else | ||
{ | ||
Sync.Tools.IO.DefaultIO.WriteColor(DefaultLanguage.HINT_POBT_VERSION_LOWER, ConsoleColor.Yellow); | ||
return false; | ||
} | ||
} | ||
|
||
return false; | ||
} | ||
} | ||
} |