/// <summary> /// 氏族信息tab事件委托 /// </summary> /// <param name="type"></param> /// <param name="data"></param> /// <param name="param"></param> private void OnInfoGridUIDlg(UIEventType type, object data, object param) { switch (type) { case UIEventType.Click: { if (data is UITabGrid) { UITabGrid tabGrid = (UITabGrid)data; ClanInfoMode mode = (ClanInfoMode)tabGrid.Data; if (mode != ClanInfoMode.None) { SetInfoMode(mode); } } else if (data is UIClanDeclareWarGrid) { UIClanDeclareWarGrid g = data as UIClanDeclareWarGrid; if (preDeclareWarGrid != null) { preDeclareWarGrid.SetSelect(false); } g.SetSelect(true); preDeclareWarGrid = g; } } break; } }
/// <summary> /// 格子UI点击响应事件 /// </summary> /// <param name="eventType"></param> /// <param name="data"></param> /// <param name="param"></param> private void OnUIGridEventDlg(UIEventType eventType, object data, object param) { if (eventType == UIEventType.Click) { if (data is UIClanTaskGrid) { UIClanTaskGrid taskGrid = data as UIClanTaskGrid; } else if (data is UIClanApplyGrid) { UIClanApplyGrid aGrid = data as UIClanApplyGrid; if (null != param && param is bool) { bool agree = (bool)param; DealClanApplyInfo(aGrid.UserId, agree); } else { GameCmd.stRequestListClanUserCmd_S.Data member = m_mgr.GetClanApplyUserInfo(aGrid.UserId); DataManager.Instance.Sender.RequestPlayerInfoForOprate(aGrid.UserId, PlayerOpreatePanel.ViewType.Normal); } } else if (data is UIClanDonateGrid) { } else if (data is UIClanDeclareWarGrid) { UIClanDeclareWarGrid dwg = data as UIClanDeclareWarGrid; dwg.SetSelect(true); if (previousDeclareGrid == null) { previousDeclareGrid = dwg; } else { if (previousDeclareGrid.Id == dwg.Id) { return; } else { previousDeclareGrid.SetSelect(false); previousDeclareGrid = dwg; } } } else if (data is UIClanMemberGrid) { UIClanMemberGrid mGrid = data as UIClanMemberGrid; GameCmd.stClanMemberInfo member = (null != ClanInfo) ? ClanInfo.GetMemberInfo(mGrid.UserId) : null; if (null != member) { if (member.id != DataManager.Instance.UserId) { SetSelectMemberId(member); DataManager.Instance.Sender.RequestPlayerInfoForOprate(mGrid.UserId, PlayerOpreatePanel.ViewType.Clan); } } else { Engine.Utility.Log.Error("GetClanMemberInfo null userid={0}", mGrid.UserId); } } else if (data is UIClanSkillGrid) { UIClanSkillGrid skillGrid = data as UIClanSkillGrid; SetSelectSkillId(skillGrid.Id); } else if (data is UITabGrid) { UITabGrid tabGrid = data as UITabGrid; if (tabGrid.Data is ClanPanelMode) { SetMode((ClanPanelMode)tabGrid.Data); } } else if (data is UIClanTabGrid) { UIClanTabGrid tab = data as UIClanTabGrid; SetInfoMode((ClanInfoMode)tab.Data + 1); } } }