internal static bool ShouldSkip(SkipConfirmationConfiguration stg) { if (stg.SkipAlways) { return(true); } if (stg.AllowSkip) { ModifierKeys toUse = // ModifierKeys.Shift; Keyboard.Modifiers; if (KeyAllowsSkip(toUse, ModifierKeys.Alt, stg.Alt) && KeyAllowsSkip(toUse, ModifierKeys.Control, stg.Control) && KeyAllowsSkip(toUse, ModifierKeys.Shift, stg.Shift) && KeyAllowsSkip(toUse, ModifierKeys.Windows, stg.Windows)) { return(true); } } return(false); }
// ReSharper disable once MethodOverloadWithOptionalParameter Confirm(ConfirmationWindowConfiguration windowOverride = null, SkipConfirmationConfiguration skipOverride = null) => ShouldSkip(skipOverride ?? SkipConfiguration) || (windowOverride ?? WindowConfiguration).Confirm();