Пример #1
0
        private void OnLoaded(MagickErrorException exception)
        {
            if (Loaded == null)
            {
                return;
            }

            _Dispatcher.Invoke((Action) delegate()
            {
                Loaded(this, new LoadedEventArgs(exception));
                Monitor.Exit(_Semaphore);
            });
        }
Пример #2
0
        private void ReadImage(FileInfo file)
        {
            ConstructImages();

            MagickErrorException exception = null;

            try
            {
                MagickReadSettings settings = new MagickReadSettings();
                if (_GhostscriptFormats.Contains(file.Extension.ToUpperInvariant()))
                {
                    settings.Density = new PointD(300);
                }

                _Images.Read(file, settings);
            }
            catch (MagickErrorException ex)
            {
                exception = ex;
            }

            OnLoaded(exception);
        }
Пример #3
0
 public LoadedEventArgs(MagickErrorException exception)
 {
     Exception = exception;
 }
Пример #4
0
 private void ShowError(MagickErrorException exception)
 {
     ShowError(exception.Message);
 }
Пример #5
0
 private void ShowError(MagickErrorException exception)
 {
     ShowError(exception != null ? exception.Message : "An unknown error occurred.");
 }