private async void ProcessArguments() { if (OptionLiteModeSupported) { Visibility = Visibility.Hidden; } var cancelled = true; foreach (var arg in AppArguments.Values) { Logging.Write("Input: " + arg); var result = await _argumentsHandler.ProcessArgument(arg); if (result == ArgumentHandleResult.FailedShow) { NonfatalError.Notify(AppStrings.Main_CannotProcessArgument, AppStrings.Main_CannotProcessArgument_Commentary); } if (result == ArgumentHandleResult.SuccessfulShow || result == ArgumentHandleResult.FailedShow) { Visibility = Visibility.Visible; cancelled = false; } } if (OptionLiteModeSupported && cancelled) { Close(); } }