コード例 #1
0
        private void ReloadTable(IEvent ievent)
        {
            var v = ievent as ReloadTableEvent;

            if (v == null)
            {
                return;
            }
            if (v.tableName == "ServerName")
            {
                Table.ForeachServerName(record =>
                {
                    if (record.Id == record.LogicID && record.IsClientDisplay == 1 && ServerBlackStoreManager.Servers.ContainsKey(record.LogicID) == false)
                    {
                        BlackStoreManager temp = new BlackStoreManager();
                        temp.Init(record.LogicID);
                        ServerBlackStoreManager.Servers.Add(record.LogicID, temp);
                    }
                    return(true);
                });
            }
            if (v.tableName == "Store")
            {
                ResetStore();
            }
        }
コード例 #2
0
 public void Init()
 {
     Table.ForeachServerName(record =>
     {
         if (record.Id == record.LogicID && record.IsClientDisplay == 1 && ServerBlackStoreManager.Servers.ContainsKey(record.LogicID) == false)
         {
             BlackStoreManager temp = new BlackStoreManager();
             temp.Init(record.LogicID);
             ServerBlackStoreManager.Servers.Add(record.LogicID, temp);
         }
         return(true);
     });
     SetTrigger();
     EventDispatcher.Instance.AddEventListener(ReloadTableEvent.EVENT_TYPE, ReloadTable);
 }