This commit is contained in:
ShrlAlgo
2025-07-11 09:20:23 +08:00
parent c7b104f44f
commit 4d35cadb56
840 changed files with 102347 additions and 11595 deletions

View File

@@ -1,14 +1,15 @@
using WPFluent.Controls;
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
using WPFluent.Controls;
using MessageBoxButton = System.Windows.MessageBoxButton;
using MessageBoxResult = System.Windows.MessageBoxResult;
@@ -16,60 +17,8 @@ namespace WPFluent.Controls;
public static partial class MessageBox
{
public static System.Windows.MessageBoxResult Show(string messageBoxText) =>
Show(messageBoxText, null!);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption) =>
Show(null!, messageBoxText, caption);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button) =>
Show(null!, messageBoxText, caption, button);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon) =>
Show(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxSymbolGlyph icon) =>
Show(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, string icon) =>
Show(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, IconSource icon) =>
Show(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult) =>
Show(null!, messageBoxText, caption, button, icon, defaultResult);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxSymbolGlyph icon, System.Windows.MessageBoxResult defaultResult) =>
Show(null!, messageBoxText, caption, button, icon, defaultResult);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, string icon, System.Windows.MessageBoxResult defaultResult) =>
Show(null!, messageBoxText, caption, button, icon, defaultResult);
public static System.Windows.MessageBoxResult Show(string messageBoxText, string caption, System.Windows.MessageBoxButton button, IconSource icon, System.Windows.MessageBoxResult defaultResult) =>
Show(null!, messageBoxText, caption, button, icon, defaultResult);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText) =>
Show(owner, messageBoxText, null!);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption) =>
Show(owner, messageBoxText, caption, System.Windows.MessageBoxButton.OK);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button) =>
Show(owner, messageBoxText, caption, button, default(IconSource)!);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon) =>
Show(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxSymbolGlyph icon) =>
Show(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, string icon) =>
Show(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, IconSource icon) =>
Show(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static System.Windows.MessageBoxResult Show(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult) =>
Show(owner, messageBoxText, caption, button, icon.ToSymbol(), defaultResult);
@@ -108,60 +57,9 @@ public static partial class MessageBox
}));
}
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText) =>
ShowAsync(messageBoxText, null!);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption) =>
ShowAsync(null!, messageBoxText, caption);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText) =>
ShowAsync(owner, messageBoxText, null!);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button) =>
ShowAsync(null!, messageBoxText, caption, button);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption) =>
ShowAsync(owner, messageBoxText, caption, System.Windows.MessageBoxButton.OK);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon) =>
ShowAsync(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxSymbolGlyph icon) =>
ShowAsync(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, string icon) =>
ShowAsync(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, IconSource icon) =>
ShowAsync(messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button) =>
ShowAsync(owner, messageBoxText, caption, button, default(IconSource)!);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult) =>
ShowAsync(null!, messageBoxText, caption, button, icon, defaultResult);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxSymbolGlyph icon, System.Windows.MessageBoxResult defaultResult) =>
ShowAsync(null!, messageBoxText, caption, button, icon, defaultResult);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, string icon, System.Windows.MessageBoxResult defaultResult) =>
ShowAsync(null!, messageBoxText, caption, button, icon, defaultResult);
public static Task<System.Windows.MessageBoxResult> ShowAsync(string messageBoxText, string caption, System.Windows.MessageBoxButton button, IconSource icon, System.Windows.MessageBoxResult defaultResult) =>
ShowAsync(null!, messageBoxText, caption, button, icon, defaultResult);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon) =>
ShowAsync(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxSymbolGlyph icon) =>
ShowAsync(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, string icon) =>
ShowAsync(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, IconSource icon) =>
ShowAsync(owner, messageBoxText, caption, button, icon, System.Windows.MessageBoxResult.None);
public static Task<System.Windows.MessageBoxResult> ShowAsync(Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, MessageBoxImage icon, System.Windows.MessageBoxResult defaultResult) =>
ShowAsync(owner, messageBoxText, caption, button, icon.ToSymbol(), defaultResult);