Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
                }
            }
        }