Ejemplo n.º 1
0
        private void readTGameplayDamageResistanceContainer(NdfObject obj)
        {
            var armourFamilies = obj.PropertyValues[1].Value as NdfCollection;
            var damageFamilies = obj.PropertyValues[0].Value as NdfCollection;
            var values         = obj.PropertyValues[2].Value as NdfCollection;

            TableData.Clear();
            TableData.TableName = "table";
            foreach (var armourFamily in armourFamilies)
            {
                TableData.Columns.Add(armourFamily.Value.ToString());
            }
            int k = 0;

            for (var i = 0; i < damageFamilies.Count; i++)
            {
                RowHeaders.Add(damageFamilies[i].Value.ToString());
                var row = TableData.NewRow();
                TableData.Rows.Add(row);
                var damageFamily = new ObservableCollection <NdfPropertyValue>();
                for (var j = 0; j < armourFamilies.Count; j++)
                {
                    row[j] = values[k++].Value;
                }
            }
            TableData.AcceptChanges();
        }
Ejemplo n.º 2
0
        private void readTGameplayArmeArmureContainer(NdfObject obj)
        {
            var maps = obj.PropertyValues[0].Value as NdfCollection;

            for (var i = 0; i < 42; i++)
            {
                TableData.Columns.Add(i.ToString());
            }
            for (var i = 0; i < 70; i++)
            {
                var map = maps.FirstOrDefault(x => ((NdfMap)x.Value).Key.Value.ToString().Equals(i.ToString()));
                if (map != null)
                {
                    var collection = ((MapValueHolder)((NdfMap)map.Value).Value).Value as NdfCollection;
                    var row        = TableData.NewRow();
                    TableData.Rows.Add(row);
                    for (var j = 0; j < collection.Count; j++)
                    {
                        row[j] = collection[j].Value;
                    }
                }
            }
            TableData.AcceptChanges();
        }