Beispiel #1
0
        protected virtual void OnDeckDataChangedEvent(DataChangedEventArgs e)
        {
            DeckData = e.Data;
            NavalFleet.Clear();
            for (int i = 0; i < DeckData.Count(); i++)
            {
                for (int j = 0; j < DeckData[i]["api_ship"].Count(); j++)
                {
                    string key = DeckData[i]["api_ship"][j].ToString();
                    if (ShipDataMap.ContainsKey(key))
                    {
                        NavalFleet[key] = (i + 1) + "-" + (j + 1);
                        JObject jo = ShipDataMap[key] as JObject;
                        if (jo["fleet_info"] == null)
                        {
                            jo.Add("fleet_info", (i + 1) + "-" + (j + 1));
                        }
                    }
                }
            }
            DeckDataChangedEventHandler handler = DeckDataChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }