public void On_Drop_ListElement_Enable(CUIEvent uievent)
        {
            int            srcWidgetIndexInBelongedList = uievent.m_srcWidgetIndexInBelongedList;
            CUIEventScript component         = uievent.m_srcWidgetScript.GetComponent <CUIEventScript>();
            CUIComponent   component2        = component.m_widgets[0].GetComponent <CUIComponent>();
            CUIEventScript component3        = component2.m_widgets[7].GetComponent <CUIEventScript>();
            ulong          commonUInt64Param = component3.m_onClickEventParams.commonUInt64Param1;
            uint           tagUInt           = component3.m_onClickEventParams.tagUInt;

            if (Singleton <CFriendContoller> .instance.model.FRData.GetCfr(commonUInt64Param, tagUInt) == null)
            {
                return;
            }
            Text component4 = uievent.m_srcWidget.transform.Find("Text").GetComponent <Text>();

            if (component4 != null)
            {
                CFriendRelationship.FRConfig cFGByIndex = Singleton <CFriendContoller> .instance.model.FRData.GetCFGByIndex(srcWidgetIndexInBelongedList);

                if (cFGByIndex != null)
                {
                    component4.set_text(cFGByIndex.cfgRelaStr);
                }
            }
        }
        private void On_IntimacyRela_OK(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            COM_INTIMACY_STATE tag  = uievent.m_eventParams.tag;
            int tag2 = uievent.m_eventParams.tag2;

            if (tag == 24 && tag2 != -1)
            {
                CFriendRelationship fRData = Singleton <CFriendContoller> .get_instance().model.FRData;

                CFriendRelationship.FRConfig cFGByIndex = fRData.GetCFGByIndex(tag2);
                if (cFGByIndex.state == 1)
                {
                    if (fRData.FindFrist(1) == null)
                    {
                        FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, 1, 1);
                        Singleton <CFriendContoller> .get_instance().model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt);
                    }
                    else
                    {
                        Singleton <CUIManager> .get_instance().OpenTips(UT.FRData().IntimRela_Tips_AlreadyHasGay, true, 1.5f, null, new object[0]);
                    }
                }
                if (cFGByIndex.state == 2)
                {
                    if (fRData.FindFrist(2) == null)
                    {
                        FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, 2, 1);
                        Singleton <CFriendContoller> .get_instance().model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt);
                    }
                    else
                    {
                        Singleton <CUIManager> .get_instance().OpenTips(UT.FRData().IntimRela_Tips_AlreadyHasLover, true, 1.5f, null, new object[0]);
                    }
                }
            }
            else if (tag == 20)
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 1, 1);
            }
            else if (tag == 22)
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 2, 1);
            }
            else if (tag == 21)
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 1, 2);
            }
            else if (tag == 23)
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, 2, 2);
            }
        }
 public CFriendRelationship.FRConfig GetCFGByIndex(int index)
 {
     for (int i = 0; i < this.frConfig_list.Count; i++)
     {
         CFriendRelationship.FRConfig fRConfig = this.frConfig_list[i];
         if (fRConfig != null && fRConfig.piority == index)
         {
             return(fRConfig);
         }
     }
     return(null);
 }
		public static void Set_Drop_Text(CUIComponent com, bool bShow, CFR frData)
		{
			com.m_widgets[9].CustomSetActive(bShow);
			string text = string.Empty;
			CFriendRelationship.FRConfig cFGByIndex = Singleton<CFriendContoller>.instance.model.FRData.GetCFGByIndex(frData.choiseRelation);
			if (cFGByIndex != null)
			{
				text = cFGByIndex.cfgRelaStr;
			}
			else
			{
				text = UT.FRData().IntimRela_Tips_SelectRelation;
			}
			com.m_widgets[9].GetComponent<Text>().set_text(text);
		}
        private void On_IntimacyRela_OK(CUIEvent uievent)
        {
            ulong commonUInt64Param = uievent.m_eventParams.commonUInt64Param1;
            uint  tagUInt           = uievent.m_eventParams.tagUInt;
            COM_INTIMACY_STATE tag  = (COM_INTIMACY_STATE)uievent.m_eventParams.tag;
            int tag2 = uievent.m_eventParams.tag2;

            if (tag == COM_INTIMACY_STATE.COM_INTIMACY_STATE_VALUE_FULL && tag2 != -1)
            {
                CFriendRelationship          fRData     = Singleton <CFriendContoller> .instance.model.FRData;
                CFriendRelationship.FRConfig cFGByIndex = fRData.GetCFGByIndex(tag2);
                if (cFGByIndex == null)
                {
                    return;
                }
                if (IntimacyRelationViewUT.IsRelaState(cFGByIndex.state))
                {
                    if (fRData.FindFrist(cFGByIndex.state) == null)
                    {
                        FriendRelationNetCore.Send_INTIMACY_RELATION_REQUEST(commonUInt64Param, tagUInt, cFGByIndex.state, COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_ADD);
                        Singleton <CFriendContoller> .instance.model.FRData.ResetChoiseRelaState(commonUInt64Param, tagUInt);
                    }
                    else
                    {
                        RelationConfig relaTextCfg = Singleton <CFriendContoller> .instance.model.FRData.GetRelaTextCfg(cFGByIndex.state);

                        if (relaTextCfg != null)
                        {
                            Singleton <CUIManager> .instance.OpenTips(relaTextCfg.IntimRela_Tips_AlreadyHas, true, 1.5f, null, new object[0]);
                        }
                    }
                }
            }
            else if (IntimacyRelationViewUT.IsRelaStateConfirm(tag))
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, IntimacyRelationViewUT.GetStateByConfirmState(tag), COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_ADD);
            }
            else if (IntimacyRelationViewUT.IsRelaStateDeny(tag))
            {
                FriendRelationNetCore.Send_CHG_INTIMACY_CONFIRM(commonUInt64Param, tagUInt, IntimacyRelationViewUT.GetStateByDenyState(tag), COM_INTIMACY_RELATION_CHG_TYPE.COM_INTIMACY_RELATION_DEL);
            }
        }