初始化上传

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,29 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Ursa.Controls;
using .Base;
using .ViewModels;
namespace .Views;
public partial class MainView : UserControl
{
public MainView()
{
InitializeComponent();
}
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
base.OnAttachedToVisualTree(e);
var topLevel = TopLevel.GetTopLevel(this);
if (topLevel is null)
return;
GlobalValues.StorageProvider = topLevel?.StorageProvider;
GlobalValues.Clipboard = topLevel.Clipboard;
GlobalValues.NotificationManager = WindowNotificationManager.TryGetNotificationManager(topLevel, out var manager) ? manager : new WindowNotificationManager(topLevel);
GlobalValues.NotificationManager.Position = Avalonia.Controls.Notifications.NotificationPosition.BottomRight;
GlobalValues.NotificationManager.MaxItems = 5;
}
}