public void RemoveDependency() { _iswixDependencies.Remove(new IsWiXDependency(SelectedDependency.RequiredId, SelectedDependency.RequiredLanguage, SelectedDependency.RequiredVersion)); Dependencies.Remove(SelectedDependency); if (Dependencies.Count == 0) { RemoveEnabled = false; } }
public void Dependencies_RowAddRemove(object sender, DataRowChangeEventArgs e) { var dependency = new IsWiXDependency( e.Row["RequiredId"].ToString(), e.Row["RequiredLanguage"].ToString(), e.Row["RequiredVersion"].ToString() ); switch (e.Action) { case DataRowAction.Add: _dependencies.Add(dependency); break; case DataRowAction.Delete: _dependencies.Remove(dependency); break; } }