初始化上传

This commit is contained in:
2025-08-26 08:37:44 +08:00
commit 31d81b91b6
448 changed files with 80981 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
using Avalonia.Controls;
using Avalonia.Controls.Notifications;
using Avalonia.Input.Platform;
using Avalonia.Platform.Storage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace .Base
{
internal class GlobalValues
{
public static Ursa.Controls.WindowNotificationManager? NotificationManager { get; set; }
public static Window MainWindow { get; internal set; }
public static IStorageProvider StorageProvider { get; internal set; }
public static IClipboard Clipboard { get; internal set; }
public static void ShowNotification(string title, string message, NotificationType type)
{
if (NotificationManager != null)
{
NotificationManager?.Show(new Notification(title, message), showIcon: true, showClose: false, type: type);
}
}
public static void Error(string message)
{
if (NotificationManager != null)
{
NotificationManager?.Show(message, NotificationType.Error, TimeSpan.FromSeconds(1), true, false);
}
}
public static void Warning(string message)
{
if (NotificationManager != null)
{
NotificationManager?.Show(message, NotificationType.Warning, TimeSpan.FromSeconds(1), true, false);
}
}
public static void Success(string message)
{
if (NotificationManager != null)
{
NotificationManager?.Show(message, NotificationType.Success, TimeSpan.FromSeconds(1), true, false);
}
}
}
}