private void OnLoaded(MagickErrorException exception) { if (Loaded == null) { return; } _Dispatcher.Invoke((Action) delegate() { Loaded(this, new LoadedEventArgs(exception)); Monitor.Exit(_Semaphore); }); }
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); }
public LoadedEventArgs(MagickErrorException exception) { Exception = exception; }
private void ShowError(MagickErrorException exception) { ShowError(exception.Message); }
private void ShowError(MagickErrorException exception) { ShowError(exception != null ? exception.Message : "An unknown error occurred."); }