private static string TemperorySendSelfSMSRunner(string fetionnumber, string fetionpsd, string message) { bool iscancle = false; ms_IsLoginIn = false; sdk.AccountManager.FillUserIdAndPassword(fetionnumber, fetionpsd, false); sdk.ActiveMainWindow(); if (message == "") { return("消息不能为空"); } CWBPool.NavigationBegin(); //等待登陆结束 lock (sdk) { sdk.AccountManager.Login(); Monitor.Wait(sdk, 10000); } if (ms_IsLoginIn) { Thread.Sleep(1000); if (sdk.ContactControl.SendSMS.SendSMS(sdk.ContactControl.getMyself().Uri.Id.ToString(), message) != 1) { Thread.Sleep(5000); sdk.ContactControl.SendSMS.SendSMS(sdk.ContactControl.getMyself().Uri.Id.ToString(), message); } Thread.Sleep(1000); sdk.AccountManager.Logout(ref iscancle); CWBPool.NavigationEnd(); return("success"); } else { CWBPool.NavigationEnd(); return(ms_errormessage); } }
/// <summary> /// VBA方法:转到目标网址 /// </summary> public virtual void Navigate(string url) { bool isredirect; GetWebBrowser().NavToBlank(); //向联网控制中心注册 CWBPool.NavigationBegin(); do { isredirect = false; Navi(url); //判断是否含有AJAX if (DownloadScripts && m_IsNavigationCompleted) { AjaxWatch(); } //判断是否有重定向 isredirect = (m_IsRedirctionEnable && m_RedirectUrl.Count > 0); if (isredirect) { log.Debug("Navigation-Redirection:" + url + " >>>> " + m_RedirectUrl.Peek()); url = m_RedirectUrl.Pop(); } } while (isredirect); if (!m_IsNavigationCompleted && !IsWebFilled()) { log.Debug("Navigation Out Of Time"); m_IsNavigationError = true; m_IEErrorCode = WinInetErrors.ERROR_INTERNET_TIMEOUT; } //向联网控制中心注销 CWBPool.NavigationEnd(); }