Пример #1
0
 private void OnClickTab(GameObject go)
 {
     if (go == this.guildInfoBtn.get_gameObject())
     {
         this.SetBtnLightAndDim(go, "y_fenye3", true);
         this.SetBtnLightAndDim(this.guildMemberBtn.get_gameObject(), "y_fenye4", false);
         this.SetBtnLightAndDim(this.otherGuildBtn.get_gameObject(), "y_fenye4", false);
         this.currentState = GuildUIState.GuildLog;
         this.OnSendGetGuildLogListReq();
     }
     else if (go == this.guildMemberBtn.get_gameObject())
     {
         this.SetBtnLightAndDim(go, "y_fenye3", true);
         this.SetBtnLightAndDim(this.guildInfoBtn.get_gameObject(), "y_fenye4", false);
         this.SetBtnLightAndDim(this.otherGuildBtn.get_gameObject(), "y_fenye4", false);
         this.currentState = GuildUIState.GuildMember;
         this.OnSendGetGuildMemberListReq();
     }
     else if (go == this.otherGuildBtn.get_gameObject())
     {
         this.SetBtnLightAndDim(go, "y_fenye3", true);
         this.SetBtnLightAndDim(this.guildInfoBtn.get_gameObject(), "y_fenye4", false);
         this.SetBtnLightAndDim(this.guildMemberBtn.get_gameObject(), "y_fenye4", false);
         this.currentState = GuildUIState.OtherGuild;
         base.FindTransform("ListViewOtherGuildInfo").GetComponent <ScrollRectCustom>().verticalNormalizedPosition = 1f;
         this.currentPage = 1;
         this.OnSendGetOtherGuildsListReq();
     }
 }
Пример #2
0
 protected override void OnEnable()
 {
     base.OnEnable();
     this.currentState = GuildUIState.GuildLog;
     this.OnClickTab(this.guildInfoBtn.get_gameObject());
     this.RefreshUI();
 }
Пример #3
0
 private void ResetUI()
 {
     if (GuildManager.Instance.MyGuildnfo == null)
     {
         this.currentState = GuildUIState.GuildJoin;
         base.FindTransform("HaveGuildPanel").get_gameObject().SetActive(false);
         base.FindTransform("NoGuildPanel").get_gameObject().SetActive(true);
         using (Dictionary <GuildUIState, Transform> .Enumerator enumerator = this.GuildTransformDic.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 KeyValuePair <GuildUIState, Transform> current = enumerator.get_Current();
                 if (current.get_Value().get_gameObject().get_activeSelf())
                 {
                     current.get_Value().get_gameObject().SetActive(false);
                 }
             }
         }
         using (Dictionary <GuildUIState, ButtonCustom> .Enumerator enumerator2 = this.BtnGuildUIDic.GetEnumerator())
         {
             while (enumerator2.MoveNext())
             {
                 KeyValuePair <GuildUIState, ButtonCustom> current2 = enumerator2.get_Current();
                 this.SetBtnLightAndDim(current2.get_Value().get_gameObject(), "fenleianniu_2", false);
             }
         }
         if (this.BtnGuildUIDic.ContainsKey(this.currentState))
         {
             this.SetBtnLightAndDim(this.BtnGuildUIDic.get_Item(this.currentState).get_gameObject(), "fenleianniu_1", true);
         }
         this.lastState = this.currentState;
         this.RefreshUIState(this.currentState);
     }
     else
     {
         this.currentState = GuildUIState.GuildInfo;
         base.FindTransform("NoGuildPanel").get_gameObject().SetActive(false);
         base.FindTransform("HaveGuildPanel").get_gameObject().SetActive(true);
         this.OnReqGuildInfo();
     }
 }
Пример #4
0
    private void OnClickTabBtn(GameObject go)
    {
        string name = go.get_name();

        if (name != null)
        {
            if (GuildUI.< > f__switch$map16 == null)
            {
                Dictionary <string, int> dictionary = new Dictionary <string, int>(2);
                dictionary.Add("JoinBtn", 0);
                dictionary.Add("CreateBtn", 1);
                GuildUI.< > f__switch$map16 = dictionary;
            }
            int num;
            if (GuildUI.< > f__switch$map16.TryGetValue(name, ref num))
            {
                if (num != 0)
                {
                    if (num == 1)
                    {
                        this.currentState = GuildUIState.GuildCreate;
                    }
                }
                else
                {
                    this.currentState = GuildUIState.GuildJoin;
                }
            }
        }
        if (this.currentState == this.lastState)
        {
            return;
        }
        this.SetBtnLightAndDim(go, "fenleianniu_1", true);
        if (this.BtnGuildUIDic.ContainsKey(this.lastState))
        {
            this.SetBtnLightAndDim(this.BtnGuildUIDic.get_Item(this.lastState).get_gameObject(), "fenleianniu_2", false);
        }
        this.RefreshUIState(this.currentState);
        this.lastState = this.currentState;
    }
Пример #5
0
 private void RefreshUIState(GuildUIState state)
 {
     this.isSearch = false;
     if (this.GuildTransformDic.ContainsKey(this.lastState))
     {
         this.GuildTransformDic.get_Item(this.lastState).get_gameObject().SetActive(false);
     }
     if (this.GuildTransformDic.ContainsKey(state))
     {
         this.GuildTransformDic.get_Item(state).get_gameObject().SetActive(true);
     }
     if (state != GuildUIState.GuildCreate)
     {
         if (state == GuildUIState.GuildJoin)
         {
             this.OnGetGuildInfoListReq();
         }
     }
     else
     {
         this.RefreshCreateGuildPanel();
     }
 }