//public AccountManager accManager; public LoginThreadManager(String uName, String pWord,ShowStatusLoginAccount dshowLoginFunc, List<AccountManager> accounts) { this.userName = uName; this.passWord = pWord; this.mControlAllAccounts = accounts; this.dShowStatusLoginAccounts += dshowLoginFunc; //设置委托回调 }
public AccountLoginCoreModule(List<AccountInfo> allAccountInfo,ShowStatusLoginAccount dFunc) { mAllAccountsInfo = allAccountInfo; //only Reference //deleShowSuccessLoginAccounts += dFunc; ProcessAccountLogin(dFunc); }
// private LoginThreadManager mSingletonThreadInfo = new LoginThreadManager(); // private ; private void ProcessAccountLogin(ShowStatusLoginAccount deleShowLoginAccounts) { //mSingletonThreadInfo = mAllAccountsInfo; foreach (var accountInfo in mAllAccountsInfo) { LoginThreadManager paramThread = new LoginThreadManager(accountInfo.userName, accountInfo.passWord, deleShowLoginAccounts, mHandleAllAccounts); //Thread.Sleep(8000); ThreadPool.QueueUserWorkItem(LoginAccountFormBackground, paramThread); } }