コード例 #1
0
        private void SlideImage_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            var command = new ReadImageToPresentationCommand();

            Action <IImageReader> action = (imageReader) => {
                quastionSlide.Image = imageReader.ImageName;
                SlideImage.Source   = imageReader.Image;
            };

            command.Execute(Presentation, action);

            SlideUpdated?.Invoke(this, EventArgs.Empty);
        }
コード例 #2
0
        private void SlideImage_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            var command = new ReadImageToPresentationCommand();

            void action(IImageReader imageReader)
            {
                slide.Image       = imageReader.ImageName;
                SlideImage.Source = imageReader.Image;
            }

            command.Execute(presentation, action);

            SlideUpdated?.Invoke(this, EventArgs.Empty);
        }