/*void OnEnable() * { * ShowNewEmailBigRed (); * } */ static void OnShowRelationWindow(bool bSuccess, object param) { if (null != RelationLogic.Instance()) { RelationLogic.Instance().ShowMailWindow(); } }
public BeneficiaryController() { _logic = new BeneficiaryLogic(); _employeeLogic = new EmployeeLogic(); _relationLogic = new RelationLogic(); _stateLogic = new StateLogic(); }
static void OnShowTeamWindow(bool bSuccess, object param) { RelationTeamWindow.TeamTab teamtab = (RelationTeamWindow.TeamTab)param; if (null != RelationLogic.Instance()) { RelationLogic.Instance().ShowTeamWindow(teamtab); } }
void OnItemClick() { if (null != m_mailRecvWindow) { m_mailRecvWindow.ShowMailItem(this); } if (RelationLogic.Instance() != null) { RelationLogic.Instance().ShowNewEmailBigRed(); } }
void OpenTeamWindow() { if (false == GameManager.gameManager.PlayerDataPool.IsHaveTeam() && null != Singleton <ObjManager> .GetInstance().MainPlayer) { Singleton <ObjManager> .GetInstance().MainPlayer.ReqInviteTeam(GlobeVar.INVALID_GUID); } RelationLogic.m_OpenWay = RelationLogic.OPEN_WAY.MISSION_TEAM; RelationLogic.OpenTeamWindow(RelationTeamWindow.TeamTab.TeamTab_TeamInfo); }
void UpdateMailItems() { if (null == m_curItemResObj) { return; } // 记录上次正在操作的邮件,重新加载时直接选中 string lastKey = null; if (null != m_curSelectItem) { lastKey = m_curSelectItem.gameObject.name; } m_curSelectItem = null; Utils.CleanGrid(MailListGrid); for (int i = 0; i < m_sortMailList.Count; i++) { System.UInt64 curKey = m_sortMailList[i]; if (!MailData.UserMailMap.ContainsKey(curKey)) { continue; } MailListItem curItem = MailListItem.CreateItem(MailListGrid, m_curItemResObj, curKey.ToString(), this, MailData.UserMailMap[curKey]); if (null == curItem) { continue; } if (null == m_curSelectItem && curKey.ToString() == lastKey) { ShowMailItem(curItem); } } MailListGrid.GetComponent <UIGrid>().Reposition(); //MailListGrid.GetComponent<UITopGrid>().Recenter(m_bFirstUpdate); m_bFirstUpdate = false; if (null == m_curSelectItem && MailListGrid.transform.childCount > 0) { ShowMailItem(MailListGrid.transform.GetChild(0).GetComponent <MailListItem>()); } CurMailGroup.SetActive(null != m_curSelectItem); if (RelationLogic.Instance() != null) { RelationLogic.Instance().ShowNewEmailBigRed(); } // 邮件上限提示 // LabelRecvTips.text = StrDictionary.GetClientDictionaryString("#{1252}", MailData.UserMailMap.Count); }
void OnTeamTransOK() { if (RelationLogic.Instance() != null) { RelationLogic.Instance().IsTeamTransClose = true; } UIManager.CloseUI(UIInfo.RelationRoot); CG_TEAM_TRANS pak = (CG_TEAM_TRANS)PacketDistributed.CreatePacket(MessageID.PACKET_CG_TEAM_TRANS); pak.MemberGuid = m_Guid; pak.SendPacket(); gameObject.SetActive(false); }
void TrailOK() { if (RelationLogic.Instance() != null) { RelationLogic.Instance().IsTeamTransClose = true; } UIManager.CloseUI(UIInfo.RelationRoot); SceneData.RequestChangeScene((int)CG_REQ_CHANGE_SCENE.CHANGETYPE.TRAIL, 0, m_TrailSceneClass, m_TrailSceneInst, m_TrailPosX, m_TrailPosZ); // if (PlayerFrameLogic.Instance() != null) // { // PlayerFrameLogic.Instance().PlayerFrameHeadOnClick(); // } }
void ShowOtherPlayers() { //Open RelationLogic Window and switch to NearByPlayer Frame if (null == RelationLogic.Instance()) { UIManager.ShowUI(UIInfo.RelationRoot); //If Show UI Success if (null != RelationLogic.Instance()) { RelationLogic.Instance().OpenNearByPlayerFrame(); CloseWindow(); } } }
public void OnTabClicked(TabButton curTab) { if (!m_bEnableClick) { return; } if (curHighLightTab == curTab) { #region //策划需求双击主界面上任务界面的任务按钮和组队按钮,分别打开任务界面和组队界面。 if (curTab != null) { switch (curTab.name) { case "Tab1-Mission": MissionLogLogic.IsOpenFromMissionDialog = true; if (PlayerFrameLogic.Instance() != null) { PlayerFrameLogic.Instance().PlayerFrameHeadOnClick(); } UIManager.ShowUI(UIInfo.MissionLogRoot); break; case "Tab2-Team": RelationLogic.m_OpenWay = RelationLogic.OPEN_WAY.MISSION_TEAM; if (GameManager.gameManager.PlayerDataPool.TeamInfo != null && Games.GlobeDefine.GlobeVar.INVALID_ID != GameManager.gameManager.PlayerDataPool.TeamInfo.TeamID) { RelationLogic.OpenTeamWindow(RelationTeamWindow.TeamTab.TeamTab_TeamInfo); } else { RelationLogic.OpenTeamWindow(RelationTeamWindow.TeamTab.TeamTab_NearTeam); } break; default: break; } } #endregion return; } if (RelationFriendWindow.Instance() != null && RelationFriendWindow.Instance().m_OtherWindows.activeSelf) { RelationFriendWindow.Instance().m_OtherWindows.SetActive(false); } DoChangeTab(curTab); }
public void OpenNearPlayerWindow() { RelationLogic.m_OpenWay = RelationLogic.OPEN_WAY.MISSION_TEAM; RelationLogic.OpenTeamWindow(RelationTeamWindow.TeamTab.TeamTab_NearPlayer); }
void OnDestroy() { m_Instance = null; OnTryCloseMenuBarRoot(); }
void Awake() { m_Instance = this; ShowNewEmailBigRed(); }
public static void UpdateMailData(GC_MAIL_UPDATE data) { MailUpdateType curUpdateType = MailUpdateType.UPDATE; if (m_curPlayGuid != PlayerPreferenceData.LastRoleGUID) { UserMailMap.Clear(); } m_curPlayGuid = PlayerPreferenceData.LastRoleGUID; UserMail curMail = null; if (UserMailMap.ContainsKey(data.MailGuid)) { curMail = UserMailMap[data.MailGuid]; curUpdateType = MailUpdateType.UPDATE; } else { curMail = new UserMail(); UserMailMap.Add(data.MailGuid, curMail); curUpdateType = MailUpdateType.ADD; } if (RelationLogic.Instance()) { RelationLogic.Instance().ShowNewEmailBigRed(); } if (null == curMail) { return; } curMail.key = data.MailGuid; curMail.senderType = (GC_MAIL_UPDATE.MailSender)data.SenderType; curMail.SenderID = data.SenderGuid; if (curMail.senderType == GC_MAIL_UPDATE.MailSender.MAILSENDER_SYS) { if (data.HasOrigin && data.Origin == GlobeVar.MAIL_GUILDMAIL_ORIGIN) { curMail.SenderName = Utils.GetDicByID(4017); } else { curMail.SenderName = Utils.GetDicByID(1363); } if (!string.IsNullOrEmpty(data.TextContent)) { char firstChar = data.TextContent[0]; if (firstChar != '#') { curMail.text = data.TextContent; } else { curMail.text = StrDictionary.GetServerDictionaryFormatString(data.TextContent); } } else { curMail.text = ""; } } else { curMail.SenderName = data.SenderName; curMail.text = data.TextContent; } if (!string.IsNullOrEmpty(curMail.text)) { curMail.text = Utils.StrFilter_Mail(curMail.text); curMail.text = Utils.StrFilter_Abuse(curMail.text); } DateTime startTime = new DateTime(1970, 1, 1); DateTime sendDate = new DateTime((long)data.SendTime * 10000000L + startTime.Ticks, DateTimeKind.Unspecified); sendDate = sendDate.ToLocalTime(); curMail.time = sendDate.ToString("yyyy-MM-dd"); curMail.bReaded = data.ReadTime > 0; curMail.itemID = data.HasItemID ? data.ItemID : -1; curMail.itemCount = data.HasItemCount ? data.ItemCount : 0; curMail.moneyType = data.HasMoneyType ? data.MoneyType : -1; curMail.moneyCount = data.HasMoneyCount ? data.MoneyCount : 0; curMail.sortTime = data.SendTime; if (null != delMailUpdate) { delMailUpdate(curUpdateType, data.MailGuid); } }