mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Remove unnecessary async/await in MessageBoxManager invocations in ImageConvertViewModel
This commit is contained in:
@@ -418,7 +418,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
foreach(MediaTagType mediaTag in _inputFormat.Info.ReadableMediaTags.Where(mediaTag =>
|
||||
!outputFormat.SupportedMediaTags.Contains(mediaTag) && !ForceChecked))
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -445,7 +445,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
continue;
|
||||
}
|
||||
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -507,10 +507,11 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
0,
|
||||
_inputFormat.Info.SectorSize))
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI.Error_0_creating_output_image,
|
||||
.Format(UI
|
||||
.Error_0_creating_output_image,
|
||||
outputFormat.ErrorMessage),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
@@ -554,13 +555,12 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
{
|
||||
if(!ForceChecked)
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
.Error_0_setting_metadata_not_continuing,
|
||||
outputFormat
|
||||
.ErrorMessage),
|
||||
outputFormat.ErrorMessage),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
|
||||
@@ -586,13 +586,12 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
|
||||
if(!outputOptical.SetTracks(tracks))
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
.Error_0_sending_tracks_list_to_output_image,
|
||||
outputFormat
|
||||
.ErrorMessage),
|
||||
outputFormat.ErrorMessage),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
|
||||
@@ -633,13 +632,12 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
{
|
||||
if(errno == ErrorNumber.NoError)
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
.Error_0_writing_media_tag_not_continuing,
|
||||
outputFormat
|
||||
.ErrorMessage),
|
||||
outputFormat.ErrorMessage),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
|
||||
@@ -647,7 +645,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -759,7 +757,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -807,7 +805,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -836,13 +834,12 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
.Error_0_writing_sector_1_not_continuing,
|
||||
outputFormat
|
||||
.ErrorMessage,
|
||||
outputFormat.ErrorMessage,
|
||||
doneSectors),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
@@ -1016,7 +1013,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1082,7 +1079,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1111,13 +1108,12 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
.Error_0_writing_sector_1_not_continuing,
|
||||
outputFormat
|
||||
.ErrorMessage,
|
||||
outputFormat.ErrorMessage,
|
||||
doneSectors),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
@@ -1243,7 +1239,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1295,7 +1291,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1322,13 +1318,12 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
.Error_0_writing_sector_1_not_continuing,
|
||||
outputFormat
|
||||
.ErrorMessage,
|
||||
outputFormat.ErrorMessage,
|
||||
doneSectors),
|
||||
icon: Icon.Error)
|
||||
.ShowWindowDialogAsync(_view));
|
||||
@@ -1408,7 +1403,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1433,7 +1428,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1512,7 +1507,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1538,7 +1533,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
}
|
||||
else
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
@@ -1622,7 +1617,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
||||
|
||||
if(!outputFormat.Close())
|
||||
{
|
||||
await Dispatcher.UIThread.InvokeAsync(async () => await MessageBoxManager
|
||||
await Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
|
||||
.GetMessageBoxStandard(UI.Title_Error,
|
||||
string
|
||||
.Format(UI
|
||||
|
||||
Reference in New Issue
Block a user