private void OnBtnComplete(CUIEvent ciEvent) { if ((this.m_urlAction != null) && this.m_urlAction.Execute()) { this.OnCloseIDIPForm(null); } else if ((this.m_bGoto && this.m_bShow) && (this.m_btnUrl != string.Empty)) { BTN_DOSOMTHING btnDoSth = this.m_btnDoSth; string btnUrl = this.m_btnUrl; this.OnCloseIDIPForm(null); switch (btnDoSth) { case BTN_DOSOMTHING.BTN_DOSOMTHING_URL: CUICommonSystem.OpenUrl(btnUrl, true); break; case BTN_DOSOMTHING.BTN_DOSOMTHING_GAME: { int result = 0; int.TryParse(btnUrl, out result); if (result > 0) { CUICommonSystem.JumpForm((RES_GAME_ENTRANCE_TYPE)result); } break; } } btnUrl = string.Empty; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; } }
private bool CheckIsBtnUrl(string msgUrl, ref bool bTitle, ref string sTitle, ref BTN_DOSOMTHING btnDoSth, ref string url) { if (msgUrl == null) { url = string.Empty; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; bTitle = false; return(false); } string str = "#"; string str2 = "&end"; string str3 = "&"; string str4 = msgUrl; int index = str4.IndexOf(str); if (index >= 0) { int num2 = str4.IndexOf(str2); if (num2 < 0) { url = string.Empty; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; bTitle = false; return(false); } int num3 = str4.IndexOf(str3); if (num3 < 0) { url = string.Empty; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; bTitle = false; return(false); } string str5 = str4.Substring(index + str.Length, (num3 - index) - str.Length); if (str5.Contains("title=")) { string stringToUnescape = str5.Substring("title=".Length); sTitle = Uri.UnescapeDataString(stringToUnescape); bTitle = true; } else if (str5.Contains("button=0")) { btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_URL; } else if (str5.Contains("button=1")) { btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_GAME; } else if (str5.Contains("button=2")) { btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NOTSHOW; } string str7 = string.Empty; if (((num2 - num3) - str3.Length) > 0) { str7 = str4.Substring(num3 + str3.Length, (num2 - num3) - str3.Length); } if (bTitle) { url = str7; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; return(true); } if (str7.Contains("url=")) { url = str7.Substring("url=".Length); return(true); } url = string.Empty; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; bTitle = false; return(false); } url = string.Empty; btnDoSth = BTN_DOSOMTHING.BTN_DOSOMTHING_NONE; bTitle = false; return(false); }