mirror of
https://git.oceanpay.cc/danial/kami_itunes_june.git
synced 2025-12-18 12:36:40 +00:00
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using System;
|
|
using AppleBatch_June.AppleWebServace;
|
|
using AppleBatch_June.ExecuteTasks;
|
|
using AppleBatch_June.Model;
|
|
using AppleBatch_June.Utils;
|
|
|
|
namespace AppleBatch_June.Interfaces
|
|
{
|
|
public class WebAccountDisabled : IAccountDisabled
|
|
{
|
|
private Action<string, DisplyType, string> action;
|
|
|
|
private Action<string, DisplyType, string> applyAtion;
|
|
|
|
private bool _openVpn;
|
|
|
|
public ITaskRunState taskState;
|
|
|
|
public WebAccountDisabled(bool openVpn, Action<string, DisplyType, string> _action, Action<string, DisplyType, string> _applyAtion, ITaskRunState _taskState)
|
|
{
|
|
taskState = _taskState ?? throw new Exception("任务运行状态不能是空的");
|
|
_openVpn = openVpn;
|
|
action = _action;
|
|
applyAtion = _applyAtion;
|
|
}
|
|
|
|
public bool accountCheck(string account, string pwd, string notityKey)
|
|
{
|
|
if (AppSysConfig.webProtocolS2k)
|
|
{
|
|
return new AppleReportaproblemWeb(_openVpn, action, applyAtion, taskState)
|
|
{
|
|
ProxyIp = ProxyAccountCache.getProxyAccountIP(account)
|
|
}.checkDisable(account, pwd, notityKey);
|
|
}
|
|
AppleManageWebUtlis appleManageWebUtlis = new AppleManageWebUtlis(action, applyAtion, taskState);
|
|
appleManageWebUtlis.ProxyIp = ProxyAccountCache.getProxyAccountIP(account);
|
|
bool result = appleManageWebUtlis.checkDisable(_openVpn, account, pwd, notityKey);
|
|
appleManageWebUtlis.reportSingOut();
|
|
return result;
|
|
}
|
|
}
|
|
}
|