public TankNodeVM(NationNodeVM parent, Tank tank, LocalGameClient client)
     : base(parent, tank.Name, LoadChildenStrategy.LazyStatic)
 {
     _client = client;
     _tank   = tank;
     _unikey = new TankUnikey(_client, _tank);
 }
Exemple #2
0
        protected override IEnumerable <TreeNodeVM> LoadChildren()
        {
            var tankElements = _client.TankDatabase.QueryMany("tank[nation/@key = '{0}']", this.Nation);

            foreach (var tank in NationNodeVM.Sort(tankElements.Select(t => Tank.Create(t))))
            {
                yield return(new TankNodeVM(this, tank, _client));
            }
        }