private void listview1_Click(object sender, EventArgs e) { var path = listView1.SelectedItems[0].Tag.ToString(); var date = _api.GetDateTimeByPath(path); var properties = _api.GetPropertiesByPath(path); var photoId = _api.GetPhotoIdByPath(path); bool removed = false; using (SelectedImgForm form = new SelectedImgForm(path, date, properties)) { if (form.ShowDialog() == DialogResult.OK) { _newProperties = form.GetPropertiesTuples(); _api.AddProperties(_newProperties, photoId); removed = form.Removed(); } } if (removed) { _api.RemoveBtPath(path); RemoveListviewItms(); LoadPhotosOnStart(); } }
public void AddProperties(List <Tuple <string, string> > newProperties, int photoId) { _api.AddProperties(newProperties, photoId); }