private void RemoveImage(object obj) { var image = obj as Image; if (image == null) { return; } OmniImages.Remove(image); Context.Images.Remove(image); RemovedImages.Add(image); ChangesMade = true; }
private void ShowAssociatedImages() { var vm = new OmniImageViewModel(CurrentOmni, Context); var view = ViewFactory.CreateViewWithDataContext <OmniImageView>(vm); view.ShowDialog(); ChangesMade = ChangesMade || vm.ChangesMade; foreach (var img in vm.RemovedImages) { if (OmniImages.Remove(img)) { ChangesMade = true; } } }