private void OnMsg_runesviewInitToggle(MobaMessage msg)
 {
     if (msg.Param != null)
     {
         string value = string.Empty;
         value        = (string)msg.Param;
         this.heroNpc = value;
         RunesFunctionType runesFunctionType;
         if (string.IsNullOrEmpty(value))
         {
             runesFunctionType = RunesFunctionType.Storage;
         }
         else
         {
             runesFunctionType = RunesFunctionType.Inlay;
         }
         if (this.dicToggle != null && this.dicToggle.ContainsKey(runesFunctionType))
         {
             this.currType = runesFunctionType;
             this.dicToggle[runesFunctionType].value = true;
             if (this.currType == RunesFunctionType.Storage)
             {
                 this.toggleType = RunesOverView.RuneToggleState.DisableInlay;
             }
             else
             {
                 this.toggleType = RunesOverView.RuneToggleState.EnableInlay;
             }
         }
         this.bottomAnchor.gameObject.SetActive(this.currType == RunesFunctionType.Storage);
         MobaMessageManagerTools.SendClientMsg(ClientV2C.runesviewChangeToggle, runesFunctionType, false);
     }
 }
 public override void Init()
 {
     this.leftAnchor       = this.transform.Find("LeftAnchor");
     this.upperAnchor      = this.transform.Find("UpperAnchor");
     this.bottomAnchor     = this.transform.Find("BottomAnchor");
     this.btnClose         = this.upperAnchor.Find("CloseFrame");
     this.runesInlayView   = this.leftAnchor.Find("RunesInlay").GetComponent <UIToggle>();
     this.runesStorageView = this.leftAnchor.Find("RunesStorage").GetComponent <UIToggle>();
     this.dicToggle        = new Dictionary <RunesFunctionType, UIToggle>();
     this.dicToggle[RunesFunctionType.Inlay]   = this.runesInlayView;
     this.dicToggle[RunesFunctionType.Storage] = this.runesStorageView;
     EventDelegate.Add(this.runesInlayView.onChange, new EventDelegate.Callback(this.ClickBtn));
     EventDelegate.Add(this.runesStorageView.onChange, new EventDelegate.Callback(this.ClickBtn));
     UIEventListener.Get(this.btnClose.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickCloseRuneView);
     this.toggleType = RunesOverView.RuneToggleState.EnableInlay;
     this.mgs        = new object[]
     {
         ClientV2C.runesviewInitToggle,
         ClientC2C.GateDisconnected,
         ClientC2C.GateConnected,
         ClientC2C.WaitServerResponseTimeOut
     };
 }