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();
        }
Exemplo n.º 2
0
 private void UpdateRowHeaders()
 {
     RowHeaders.Clear();
     foreach (var rowHeaderViewModel in GenRows(SelectedMcu))
     {
         RowHeaders.Add(rowHeaderViewModel);
     }
 }
Exemplo n.º 3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var random = new Random();
            var row    = random.Next(50, 100);
            var col    = random.Next(50, 100);

            RowHeaders.Clear();
            Enumerable.Range(0, row).ToList()
            .ForEach(r => RowHeaders.Add($"R{r}"));

            ColumnHeaders.Clear();
            Enumerable.Range(0, col).ToList()
            .ForEach(c => ColumnHeaders.Add($"C{c}"));

            Items.Clear();
            RowHeaders.ToList()
            .ForEach(r => Items.Add(new ObservableCollection <string>(ColumnHeaders.Select(c => $"{c}-{r}"))));
        }
 public ITable <TItem> WithRows <TKey>(string name, Func <TItem, TKey> selector)
 {
     RowHeaders.Add(CreateIdenttiyAxis(name, selector));
     return(this);
 }
 public ITable <TItem> WithExplicitRow(string name, params Expression <Func <TItem, bool> >[] selectors)
 {
     RowHeaders.Add(CreateExplicitAxis(name, selectors));
     return(this);
 }