mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
More pattern matching.
This commit is contained in:
@@ -522,9 +522,7 @@ public sealed class MainWindowViewModel : ViewModelBase
|
||||
|
||||
try
|
||||
{
|
||||
var imageFormat = ImageFormat.Detect(inputFilter) as IMediaImage;
|
||||
|
||||
if(imageFormat == null)
|
||||
if(ImageFormat.Detect(inputFilter) is not IMediaImage imageFormat)
|
||||
{
|
||||
MessageBoxManager.GetMessageBoxStandardWindow("Error", "Image format not identified.", ButtonEnum.Ok,
|
||||
Icon.Error);
|
||||
|
||||
Reference in New Issue
Block a user