Ejemplo n.º 1
0
        public MainWindowVM(IShellService shellService)
        {
            _shellService    = shellService;
            _openFileCommand = new RelayCommand(o =>
            {
                ImagePath = _shellService.OpenFileDialog();

                if (string.IsNullOrEmpty(ImagePath))
                {
                    return;
                }

                Source      = new Bitmap(ImagePath);
                BlackPixels = ImageProcessor.GetBlackPixels(Source);
                GetLines();
            });

            MouseMoveOverAccumulator = MoveOverAccumulatorHandler;
            MouseClickAccumulator    = MoveClickHandler;
        }