Ejemplo n.º 1
0
 void m_mapData_ValueUpdateEvent(object sender, ValueUpdateEventArgs e)
 {
     if (e.key == MapDispatchEnum.RefreshLineInfo.ToString())
     {
         InitLineScroll();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Dispatch Value Update Event
 /// </summary>
 protected void DispatchValueUpdateEvent(ValueUpdateEventArgs args)
 {
     EventHandler<ValueUpdateEventArgs> handler = ValueUpdateEvent;
     if(handler != null){
         handler(this, args);
     }
 }
Ejemplo n.º 3
0
 void OnValueUpdateEventArgs(object obj, ValueUpdateEventArgs v)
 {
     if (v.key == HomeDispatchEvent.ChangeTreeState.ToString())
     {
         RefreshTreeState();
     }
 }
Ejemplo n.º 4
0
 //  public bool
 public void Initialize()
 {
     m_valueUpdateEventArgs = new ValueUpdateEventArgs();
     m_CampCombatResultInfo = new CampCombatResultInfo();
     m_dicLocalCampInfos    = new Dictionary <uint, LocalCampSignInfo>();
     RegisterGlobalEvent(true);
 }
Ejemplo n.º 5
0
 void OnValueUpdateEventArgs(object obj, ValueUpdateEventArgs v)
 {
     if ("updateFriendLevel" == v.key && m_ePeopletype == TeamDataManager.PeopleType.Firend)
     {
         CreateGrids();
     }
 }
Ejemplo n.º 6
0
 void OnUpdateAreifact(object obj, ValueUpdateEventArgs value)
 {
     if (value.key.Equals("OnUpdateArticfact"))
     {
         RefreshUI();
     }
 }
Ejemplo n.º 7
0
 void OnValueUpdateMailEventArgs(object obj, ValueUpdateEventArgs v)
 {
     if (v.key.Equals("OnUpdateMailList"))
     {
         RefreshMailListUI();
     }
 }
Ejemplo n.º 8
0
 void OnUpdateList(object obj, ValueUpdateEventArgs value)
 {
     if (value.key.Equals("OnUpdateOpenPackage"))
     {
         RefreshUI();
     }
 }
Ejemplo n.º 9
0
    public void RemoveRelationByType(RelationType type, uint uid)
    {
        List <RoleRelation> lst = null;

        if (m_dicRelation.TryGetValue(type, out lst))
        {
            for (int i = 0; i < lst.Count; i++)
            {
                if (lst[i].uid == uid)
                {
                    lst.RemoveAt(i);
                    ValueUpdateEventArgs arg = new ValueUpdateEventArgs(type.ToString(), 0, lst);
                    DispatchValueUpdateEvent(arg);
                    if (type == RelationType.Relation_Friend)
                    {
                        TipsManager.Instance.ShowTipsById(504);
                    }
                    else if (type == RelationType.Relation_Black)
                    {
                        TipsManager.Instance.ShowTipsById(507);
                    }
                    else if (type == RelationType.Relation_Contact)
                    {
                        TipsManager.Instance.ShowTipsById(509);
                    }
                }
            }
        }
        else
        {
            Log.Error(" m_dicRelation no contain type :{0}", type);
        }
    }
Ejemplo n.º 10
0
    void skilldataManager_ValueUpdateEvent(object sender, ValueUpdateEventArgs e)
    {
        if (e != null)
        {
            if (e.key == LearnSkillDispatchEvents.SkillLevelUP.ToString())
            {
                SkillInfo newInfo = (SkillInfo)e.newValue;
                SortedDictionary <uint, LeftSkillItem> .Enumerator itemIter = m_dicLeftItem.GetEnumerator();
                while (itemIter.MoveNext())
                {
                    if (itemIter.Current.Key == newInfo.skillID)
                    {
                        LeftSkillItem skillItem = itemIter.Current.Value;
                        SkillDatabase db        = GameTableManager.Instance.GetTableItem <SkillDatabase>(newInfo.skillID, (int)newInfo.level);
                        if (db != null)
                        {
                            skillItem.InitItem(db);
                            skillItem.AddEffectInSkillPanel();
                        }
                    }
                }

                //页签红点提示
                UpdateRedPoint();
            }
        }
    }
Ejemplo n.º 11
0
    void OnUpdateList(object obj, ValueUpdateEventArgs value)
    {
        if (value.key.Equals("OnGetRechargeRewRet"))
        {
            ulong id = (ulong)value.oldValue;

            if (cur_rewData.rewardid == id)
            {
                uint ret = (uint)value.newValue;
                cur_rewData.state = ret;
                bool canGet = cur_rewData.state == 0;
                m_btn_lingquBtn.gameObject.SetActive(canGet);
                m_sprite_Status_Received.gameObject.SetActive(!canGet);
            }

//             if (value.newValue != null)
//             {
//                 uint id = (uint)value.newValue;
//                 if (m_lst_dailyGiftIDs.Contains(id))
//                 {
//                     m_ctor_DailyGiftRoot.UpdateData(m_lst_dailyGiftIDs.IndexOf(id));
//                 }
//             }
        }
    }
Ejemplo n.º 12
0
 void value_ValueUpdated(object sender, ValueUpdateEventArgs e)
 {
     if (ValueChanged != null)
     {
         ValueChanged(this, new EventArgs());
     }
 }
Ejemplo n.º 13
0
 void OnValueUpdateEventArgs(object obj, ValueUpdateEventArgs v)
 {
     if (v != null)
     {
         if (v.key == PetDispatchEventString.ChangePet.ToString())
         {
             ResetData();
             InitItem();
             SetFirstHigh();
         }
         else if (v.key == PetDispatchEventString.PetSkillInit.ToString())
         {
             InitItem();
         }
         else if (v.key == PetDispatchEventString.LockSkill.ToString())
         {
             stLockSkillPetUserCmd_CS cmd = (stLockSkillPetUserCmd_CS)v.newValue;
             if (cmd != null)
             {
                 RefreshLockInfo(cmd);
             }
         }
         else if (v.key == PetDispatchEventString.PetRefreshProp.ToString())
         {
             InitItem();
         }
     }
 }
Ejemplo n.º 14
0
 void m_petData_ValueUpdateEvent(object sender, ValueUpdateEventArgs e)
 {
     if (e.key == PetDispatchEventString.ChangeFight.ToString())
     {
         RefreshStatus();
     }
 }
Ejemplo n.º 15
0
 void DataProviderMarketData_DataUpdate(object sender, ValueUpdateEventArgs e)
 {
     if (uiControl != null)
     {
         uiControl.Value = e.UpdatedValue;
     }
 }
Ejemplo n.º 16
0
    public bool CheckRecommendList()
    {
        if (m_lstRecommend.Count > 0)
        {
            List <RoleRelation> lstdata = new List <RoleRelation>();
            m_lstRecommendCache.Clear();
            for (int i = 0; i < 5 && m_lstRecommend.Count > 0; i++)
            {
                lstdata.Add(m_lstRecommend[0]);
                m_lstRecommendCache.Add(m_lstRecommend[0]);
                m_lstRecommend.RemoveAt(0);
            }

            ValueUpdateEventArgs arg = new ValueUpdateEventArgs("SEARCH", 0, lstdata);
            DispatchValueUpdateEvent(arg);

            return(true);
        }
        else
        {
            ValueUpdateEventArgs arg = new ValueUpdateEventArgs("SEARCH", 0, m_lstRecommendCache);
            DispatchValueUpdateEvent(arg);
        }

        return(false);
    }
Ejemplo n.º 17
0
    public void TransExp()
    {
        UpdateRideList();
        ValueUpdateEventArgs arg = new ValueUpdateEventArgs("ResetAdoration", null, null);

        DispatchValueUpdateEvent(arg);
    }
Ejemplo n.º 18
0
    public void OnGetRechargeRewRet(ulong rewardid, uint ret)
    {
        bool changed = false;
        int  count   = 0;

        for (int i = 0; i < rewRetReward.Count; i++)
        {
            if (rewRetReward[i].rewardid == rewardid)
            {
                rewRetReward[i].state = ret;
                changed = true;
            }
            if (rewRetReward[i].state == 1)
            {
                count++;;
            }
        }
        RechargeRewRetClose = count == rewRetReward.Count;
        if (RechargeRewRetClose)
        {
            Engine.Utility.EventEngine.Instance().DispatchEvent((int)GameEventID.RETREWARDSTATUS, RechargeRewRetClose);
        }
        if (changed)
        {
            ValueUpdateEventArgs args = new ValueUpdateEventArgs("OnGetRechargeRewRet", rewardid, ret);
            DispatchValueUpdateEvent(args);
        }
    }
Ejemplo n.º 19
0
 void DataProviderTradeDetail_DataUpdate(object sender, ValueUpdateEventArgs e)
 {
     if (uiControl != null)
     {
         uiControl.Value = e.UpdatedValue;
     }
 }
Ejemplo n.º 20
0
    const uint m_shenMoCopyId2 = 4003; //神魔大战(无boss)

    void OnValueUpdateEventArgs(object obj, ValueUpdateEventArgs value)
    {
        if (value.key.Equals("CampKillInfo") || value.key.Equals("RefreshBattleData"))
        {
            RefreshBattleList();
        }
    }
Ejemplo n.º 21
0
 void OnUpdateList(object obj, ValueUpdateEventArgs value)
 {
     if (value.key.Equals("OnUpdateList"))
     {
         if (selectTargetTypeGrid)
         {
             return;
         }
         m_lstCurrWelfare.Sort();
         if (m_ctor_LevelAndTimeScrollView != null)
         {
             m_ctor_LevelAndTimeScrollView.CreateGrids(m_lstCurrWelfare.Count);
             m_ctor_ToggleScrollView.CreateGrids((int)m_dataManager.ServerOpenMaxDay);
         }
         activedType.OnSevenDaySelect(true);
         OnToggleValueChange(curSelectDay);
     }
     else if (value.key.Equals("OnUpdateDisCount"))
     {
         ResreshDiscountUI();
     }
     else if (value.key.Equals("OnUpdateFinalTargetData"))
     {
         StructData();
         m_ctor_RewardRoot.UpdateActiveGridData();
     }
 }
Ejemplo n.º 22
0
    public void CallBackRide(uint id)
    {
        m_auto_ride = 0;
        ValueUpdateEventArgs arg = new ValueUpdateEventArgs("RideFightState", id, id);

        DispatchValueUpdateEvent(arg);
        TipsManager.Instance.ShowLocalFormatTips(LocalTextType.Ride_Commond_Xhuiquxiuxile, m_lstRides.Find(C => C.id == id).name);
    }
Ejemplo n.º 23
0
 void OnUpdateList(object obj, ValueUpdateEventArgs value)
 {
     if (value.key.Equals("FeedbackGM"))
     {
         List <GameCmd.FeedbackData> msg = DataManager.Manager <Client.SettingManager>().FeedBackMsgs;
         OnFeedback(msg);
     }
 }
Ejemplo n.º 24
0
    public void OnInhertPet(stInheritPetUserCmd_CS cmd)
    {
        ResetInheritData();
        ValueUpdateEventArgs eventArgs = new ValueUpdateEventArgs();

        eventArgs.key = PetDispatchEventString.ResetInheritPanel.ToString();
        DispatchValueUpdateEvent(eventArgs);
    }
Ejemplo n.º 25
0
 void OnUpdateList(object obj, ValueUpdateEventArgs value)
 {
     if (value.key.Equals("OnUpdateTime"))
     {
         long lefttime = (long)value.newValue;
         OnUpdateTime(lefttime);
     }
 }
Ejemplo n.º 26
0
    public void ExpandeMaxNum(int num)
    {
        m_maxRideNum = num;
        ValueUpdateEventArgs arg = new ValueUpdateEventArgs("ExpandeMaxNum", null, null);

        DispatchValueUpdateEvent(arg);
        TipsManager.Instance.ShowTips(LocalTextType.Ride_Commond_kuochongchenggong);
    }
Ejemplo n.º 27
0
    /// <summary> 属性事件触发 </summary>
    protected void DispatchValueUpdateEvent(ValueUpdateEventArgs args)
    {
        EventHandler <ValueUpdateEventArgs> handler = ValueUpdateEvent;

        if (handler != null)
        {
            handler(this, args);
        }
    }
Ejemplo n.º 28
0
 void OnUpdateList(object obj, ValueUpdateEventArgs value)
 {
     if (value.key.Equals("RideUsePanelRefresh"))
     {
         int   curr = (int)value.newValue;
         float max  = m_currUserItem.MaxValue;
         m_slider_Slider.value = curr / max;
         m_label_process.text  = string.Format("{0}/{1}", curr, max);
     }
 }
Ejemplo n.º 29
0
 void SaleDataManager_ValueUpdateEvent(object sender, ValueUpdateEventArgs e)
 {
     if (e != null)
     {
         if (e.key == SaleDispatchEvents.RefreshRecordInfo.ToString())
         {
             UpdateRecordInfo();
         }
     }
 }
Ejemplo n.º 30
0
 void PetDataManager_ValueUpdateEvent(object sender, ValueUpdateEventArgs e)
 {
     if (e != null)
     {
         if (e.key == PetDispatchEventString.PetRefreshProp.ToString())
         {
             RefreshPetSliderData();
         }
     }
 }
Ejemplo n.º 31
0
 public void OnBugDailyGift(uint id)
 {
     if (!dailyGiftList.Contains(id))
     {
         dailyGiftList.Add(id);
         UpdateActivityData();
         ValueUpdateEventArgs args = new ValueUpdateEventArgs("OnBuyDailyGift", null, id);
         DispatchValueUpdateEvent(args);
     }
 }