public void Add(ExternalModule module) { if (Items.Any(m => m.ArtifactId == module.ArtifactId && m.GroupId == module.GroupId && m.Version == module.Version)) { return; } Changed = true; Items.Add(module); }
private void ButtonAddMavenExternalClick(object sender, EventArgs e) { ExternalModule externalModule = new ExternalModule(); _externalModules.Add(externalModule); BindingSource bs = dataGridViewMavenExternal.DataSource as BindingSource; if (bs != null) { bs.ResetBindings(true); } }
private void ButtonDeleteMavenExternalClick(object sender, EventArgs e) { BindingSource bs = dataGridViewMavenExternal.DataSource as BindingSource; if (bs != null) { ExternalModule externalModule = bs.Current as ExternalModule; if (externalModule != null) { _externalModules.Remove(externalModule); bs.ResetBindings(true); } } }
public void Remove(ExternalModule module) { Changed = true; Items.Remove(module); }