/// <summary> /// 点击消息对话框的取消按钮 /// </summary> private void ClickMessageBoxCancel() { if (MessageBoxLogic.Instance() != null) { MessageBoxLogic.Instance().SendMessage("MessageBoxCancel", SendMessageOptions.DontRequireReceiver); } }
public void ConnectLost() { if (!GameManager.gameManager.OnLineState) { return; } if (LoginUILogic.Instance() != null) { LoginUILogic.Instance().EnterServerChoose(); // 连接丢失,请重新登录 #if !UNITY_WP8 MessageBoxLogic.OpenOKBox(1292, 1000); #else if (!m_DeviceLost) { MessageBoxLogic.OpenOKBox(1292, 1000); } #endif return; } else if (MainUILogic.Instance() != null) { if (!m_bAskConnecting || null != MessageBoxLogic.Instance()) { LogModule.DebugLog("reconnecting...."); // 连接丢失,正在重新连接。。。 #if UNITY_WP8 if (!m_DeviceLost) { MessageBoxLogic.OpenOKBox(1293, 1000, OnReconnect); } else { WP8ConnectingLostLogic(); } #else MessageBoxLogic.OpenOKBox(1293, 1000, OnReconnect); #endif m_bAskConnecting = true; m_IsAskConnecting = true; if (BackCamerControll.Instance() != null && BackCamerControll.Instance().gameObject.activeInHierarchy) { BackCamerControll.Instance().gameObject.SetActive(false); } WorldMapWindow.OnDisConnect(); HuaShanPVPData.OnDisconnect(); } } else { // 有可能在loading不处理,等UI起来后检测 } }
public static void Handler(GC_RET_MARRAGE packet) { if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_ASKMARRY && packet.Id != GlobeVar.INVALID_GUID) { string strTarget = ""; if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID == GlobeVar.INVALID_ID) { return; } for (int i = 0; i < GlobeVar.MAX_TEAM_MEMBER; ++i) { TeamMember tm = GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMember(i); if (null != tm && true == tm.IsValid() && tm.Guid == packet.Id) { strTarget = tm.MemberName; } } MarryRootLogic.m_SavedGUID = packet.Id; //MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1415}", strTarget),"求婚", MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1415}", strTarget), StrDictionary.GetClientDictionaryString("#{2864}"), ConfirmPromise, CancelNone); } else if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_CONFIRM && packet.Id != GlobeVar.INVALID_GUID) { string strTarget = ""; if (GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID == GlobeVar.INVALID_ID) { return; } for (int i = 0; i < GlobeVar.MAX_TEAM_MEMBER; ++i) { TeamMember tm = GameManager.gameManager.PlayerDataPool.TeamInfo.GetTeamMember(i); if (null != tm && true == tm.IsValid() && tm.Guid == packet.Id) { strTarget = tm.MemberName; } } MarryRootLogic.m_SavedGUID = packet.Id; MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{1416}", strTarget), StrDictionary.GetClientDictionaryString("#{2864}"), RetPromiseOK, RetPromiseCancel, GlobeVar.INVALID_ID, MessageBoxLogic.PASSWORD.MARRYROOT); } else if (packet.Type == (int)MARRY_PACKET_TYPE.MARRY_PACKET_CANCEL && packet.Id != GlobeVar.INVALID_GUID) { if (MarryRootLogic.m_SavedGUID == packet.Id) { MarryRootLogic.m_SavedGUID = GlobeVar.INVALID_GUID; if (MessageBoxLogic.Instance() != null && MessageBoxLogic.Instance().EPassword == MessageBoxLogic.PASSWORD.MARRYROOT) { MessageBoxLogic.CloseBox(); } } } }