void clear() { Filename = ""; ReplaceFilename = ""; Location = ""; Rating = 0; Title = ""; Description = ""; Author = ""; Copyright = ""; Creation = null; IsImported = false; Geotag = new GeoTagCoordinatePair(); lock (itemsLock) { DynamicProperties.Clear(); } SelectedMetaDataPreset = noPresetMetaData; lock (tagsLock) { Tags.Clear(); } lock (addTagsLock) { AddTags.Clear(); } lock (removeTagsLock) { RemoveTags.Clear(); } }
/* ----------------------------------------------------------------- */ /// /// TagsPanel_ControlRemoved /// /// <summary> /// コントロールが削除された時に実行されるハンドラです。 /// </summary> /// /* ----------------------------------------------------------------- */ private void TagsPanel_ControlRemoved(object sender, ControlEventArgs e) { var tag = e.Control.Tag as Tag; if (tag == null) { return; } var result = NewTags.FirstOrDefault(x => x.Name == tag.Name); if (result != null) { NewTags.Remove(result); } else { RemoveTags.Add(tag); } }