public void Excute() { var count = FileUris.Count; Task.Run(() => { for (int i = 0; i < count && FileUris.Count > 0; i++) { int size = GetKernelSize(); var kernel = new SpatialFilterKernel(SourceToKernel(), size); kernel.IsNormalized = _IsNormalized; var images = ImageManager.Filter(FileUris[0], kernel); images.Freeze(); var viewmodel = new ImageWindowViewModel(images); Messenger.Raise(new TransitionMessage(viewmodel, "ImageWindow")); App.Current.Dispatcher.Invoke(() => Delete(i)); } }); }
public void Excute() { var count = FileUris.Count; Task.Run(() => { for (int i = 0; i < count && FileUris.Count > 0; i++) { int size = GetKernelSize(); var kernel = new SpatialFilterKernel(SourceToKernel(), size); var images = ImageManager.Filter(FileUris[0], kernel); images.Freeze(); var viewmodel = new ImageWindowViewModel(images); Messenger.Raise(new TransitionMessage(viewmodel, "ImageWindow")); App.Current.Dispatcher.Invoke(() => Delete(i)); } }); }