mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 21:44:12 +08:00
29 lines
1018 B
C#
29 lines
1018 B
C#
using System;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Platform;
|
|
using Avalonia.ReactiveUI;
|
|
using detect.gui.ViewModels;
|
|
using Avalonia;
|
|
|
|
namespace detect.gui.Classes;
|
|
|
|
public class WindowBase<T> : ReactiveWindow<T> where T : ViewModelBase
|
|
{
|
|
protected WindowBase()
|
|
{
|
|
Icon = new WindowIcon(AssetLoader.Open(new Uri("avares://detect.gui/Assets/logo.ico")));
|
|
Title = "AI智能视频分析平台";
|
|
ExtendClientAreaToDecorationsHint = true;
|
|
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.NoChrome;
|
|
ExtendClientAreaTitleBarHeightHint = -1;
|
|
// WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
|
SystemDecorations = SystemDecorations.None;
|
|
Topmost = false;
|
|
CanResize = false;
|
|
|
|
if (Screens.Primary == null) return;
|
|
Width = Screens.Primary.Bounds.Width / Screens.Primary.Scaling;
|
|
Height = Screens.Primary.Bounds.Height / Screens.Primary.Scaling;
|
|
Position = new PixelPoint(0, 0);
|
|
}
|
|
} |