protected override void OnStartup(StartupEventArgs e) { try { ComponentDispatcher.ThreadIdle += new EventHandler(this.ComponentDispatcher_ThreadIdle); Messenger.Initialize(); MemoryManager.Init(); ITXData pData = Messenger.TM.CreateTXData(); CoreMessenger.Instance.TM.EventProcessing(AsyncHandle_Type.AsyncHandle_StartUp, 0x0, pData); string appPath = CoreMessenger.Instance.GetAppPath(APP_PATH_TYPE.APP_PATH_ROOT); this.LoadModules(appPath + "modules.xml"); this.InitXaml(); LoginWindow window = new LoginWindow(); window.ShowDialog(); if (window.LoginResult) { WindowHelper.GetMainFrame().Show(); } else { base.Shutdown(); } } catch (Exception exception) { this.ShowException(exception); base.Shutdown(); } }
void ITXIMLoginUIEventExt.OnServerPwd2(ITXData pData, out string pbsEnterCode, out int pbCancel) { pbsEnterCode = string.Empty; pbCancel = 1; DebugLog.Assert(false, "Server要求输入二级密码"); TXLog.TXLog2("Login", "Server要求输入二级密码"); }
void ITXIMLoginUIEventExt.OnServerVerifyCode(ITXData pData, out string pbsEnterCode, out int pbCancel) { pbsEnterCode = string.Empty; pbCancel = 1; ITXBuffer buf = pData.GetBuf(LoginUI.bufVerifyPic); uint size = buf.GetSize(); byte[] destination = new byte[size]; byte[] buffer2 = destination; if (buffer2 != null) { int length = buffer2.Length; } Marshal.Copy(buf.GetNativeBuf(), destination, 0, (int)size); MemoryStream memorystreamPng = new MemoryStream(destination); if (VerifyCodeWindow.ShowVerifyCode(memorystreamPng, this.winHandle, out pbsEnterCode)) { pbCancel = 0; } else { pbCancel = 1; } }
void ITXIMLoginUIEventExt.OnSavePassword(ITXBuffer pNewBuffer) { if (pNewBuffer != null) { ITXIMConfig service = CoreMessenger.Instance.GetService <ITXIMConfig>(); ITXData xccebc = CoreMessenger.Instance.ObjectFactory.CreateTXData(); if (((pNewBuffer.GetSize() > 0) && (this._NeedtoSavePassword != null)) && this._NeedtoSavePassword()) { xccebc.SetBuf("bufSavedPassword", pNewBuffer); } service.SavePassword(xccebc); } }
void ITXIMLoginUIEventExt.OnServerPwd2(ITXData pData, out string pbsEnterCode, out int pbCancel) { pbsEnterCode = string.Empty; pbCancel = 1; DebugLog.Assert(false, "Server要求输入二级密码"); TXLog.TXLog2("Login", "Server要求输入二级密码"); }
void ITXIMLoginUIEventExt.OnMBVerifiedExInfo(ITXData pExData) { DebugLog.Assert(false, "密保返回附带信息"); TXLog.TXLog2("Login", "密保返回附带信息"); }
void ITXIMLoginUIEventExt.OnServerVerifyFailed(ITXData pData, out int pbRetry) { pbRetry = 0; DebugLog.Assert(false, "server验证失败"); TXLog.TXLog2("Login", "server验证失败"); }
void ITXIMLoginUIEventExt.OnServerVerifyCode(ITXData pData, out string pbsEnterCode, out int pbCancel) { pbsEnterCode = string.Empty; pbCancel = 1; ITXBuffer buf = pData.GetBuf(LoginUI.bufVerifyPic); uint size = buf.GetSize(); byte[] destination = new byte[size]; byte[] buffer2 = destination; if (buffer2 != null) { int length = buffer2.Length; } Marshal.Copy(buf.GetNativeBuf(), destination, 0, (int)size); MemoryStream memorystreamPng = new MemoryStream(destination); if (VerifyCodeWindow.ShowVerifyCode(memorystreamPng, this.winHandle, out pbsEnterCode)) { pbCancel = 0; } else { pbCancel = 1; } }
void ITXIMLoginUIEventExt.OnServerPwdGuard(ITXData pAskData, ITXData pReplyData, out byte pbOptType) { pbOptType = 0; DebugLog.Assert(false, "Server要求输入密保因子"); TXLog.TXLog2("Login", "Server要求输入密保因子"); }
void ITXIMLoginUIEventExt.OnMBVerifiedExInfo(ITXData pExData) { DebugLog.Assert(false, "密保返回附带信息"); TXLog.TXLog2("Login", "密保返回附带信息"); }
void ITXIMLoginUIEventExt.OnServerVerifyFailed(ITXData pData, out int pbRetry) { pbRetry = 0; DebugLog.Assert(false, "server验证失败"); TXLog.TXLog2("Login", "server验证失败"); }
void ITXIMLoginUIEventExt.OnServerPwdGuard(ITXData pAskData, ITXData pReplyData, out byte pbOptType) { pbOptType = 0; DebugLog.Assert(false, "Server要求输入密保因子"); TXLog.TXLog2("Login", "Server要求输入密保因子"); }