private void BindDwellerProperties(Inhabitants inhabitants) { dwellerList.BindProperties(inhabitants); }
// TODO: Plan is to allow basic editing in the gridview // And more detailed editing using a different dashboard control public void BindProperties(Inhabitants inhabitants) { dwellers.DataSource = inhabitants.dwellers; gridDwellers.AutoGenerateColumns = false; gridDwellers.DataSource = dwellers; FirstName.DataPropertyName = "name"; LastName.DataPropertyName = "lastName"; Gender.DataPropertyName = "gender"; Level.DataPropertyName = "experience.currentLevel"; Strength.DataPropertyName = "stats.stats[1].value"; vscrRow.Maximum = gridDwellers.RowCount - gridDwellers.Rows.GetRowCount(DataGridViewElementStates.Displayed); }