using System;
using System.Threading.Tasks;
using TapSDK.Compliance.Model;
using TapSDK.Compliance.Internal;
using TapSDK.UI;
namespace TapSDK.Compliance
{
public static class TapComplianceUI
{
///
/// 打开健康提醒窗口
///
internal static void OpenHealthReminderPanel(PlayableResult playable, Action onOk = null, Action onSwitchAccount = null)
{
var path = ComplianceConst.GetPrefabPath(ComplianceConst.HEALTH_REMINDER_PANEL_NAME,
TapTapComplianceManager.IsUseMobileUI());
var healthReminderPanel = UIManager.Instance.OpenUI(path);
healthReminderPanel.Show(playable, onOk, onSwitchAccount);
}
///
/// 打开健康充值提醒窗口
///
///
internal static void OpenHealthPaymentPanel(PayableResult payable)
{
var path = ComplianceConst.GetPrefabPath(ComplianceConst.HEALTH_PAYMENT_PANEL_NAME,
TapTapComplianceManager.IsUseMobileUI());
var healthPaymentPanel = UIManager.Instance.OpenUI(path);
healthPaymentPanel.Show(payable);
}
///
/// 打开健康充值提醒窗口.填入自定义的文本内容
///
///
///
///
public static void OpenHealthPaymentPanel(string title, string content, string buttonText, Action onOk = null)
{
var path = ComplianceConst.GetPrefabPath(ComplianceConst.HEALTH_PAYMENT_PANEL_NAME,
TapTapComplianceManager.IsUseMobileUI());
var healthPaymentPanel = UIManager.Instance.OpenUI(path);
healthPaymentPanel.Show(title, content, buttonText, onOk);
}
///
/// 打开重试对话框
///
internal static void ShowRetryDialog(string message, Action onRetry, string confirmButtonText = null)
{
var path = ComplianceConst.GetPrefabPath(ComplianceConst.RETRY_ALERT_PANEL_NAME,
TapTapComplianceManager.IsUseMobileUI());
var retryAlert =
UIManager.Instance.OpenUI(path);
retryAlert.Show(message, onRetry, confirmButtonText);
}
public static Task ShowRetryDialog(string message, string confirmButtonText = null)
{
TaskCompletionSource