private void AddGridRow([NotNull] IMitigation mitigation, [NotNull] GridPanel panel) { var row = new GridRow( mitigation.Name, mitigation.ControlType); ((INotifyPropertyChanged)mitigation).PropertyChanged += OnEntityPropertyChanged; row.Tag = mitigation; row.Cells[0].CellStyles.Default.Image = mitigation.GetImage(ImageSize.Small); for (int i = 0; i < row.Cells.Count; i++) { row.Cells[i].PropertyChanged += OnPropertyChanged; } panel.Rows.Add(row); var subPanel = CreateThreatTypesPanel(mitigation); if (subPanel != null) { row.Rows.Add(subPanel); } }
private void AddGridRow([NotNull] IMitigation mitigation, [NotNull] IList <IThreatEventMitigation> threatEventMitigations, [NotNull] GridPanel panel) { var row = new GridRow( mitigation.Name, mitigation.ControlType.ToString()); ((INotifyPropertyChanged)mitigation).PropertyChanged += OnMitigationPropertyChanged; row.Tag = mitigation; row.Cells[0].CellStyles.Default.Image = mitigation.GetImage(ImageSize.Small); panel.Rows.Add(row); for (int i = 0; i < row.Cells.Count; i++) { row.Cells[i].PropertyChanged += OnMitigationCellChanged; } var subPanel = CreateThreatEventsPanel(mitigation, threatEventMitigations); if (subPanel != null) { row.Rows.Add(subPanel); } }