@ -0,0 +1 @@ |
|||
.vs/ |
@ -0,0 +1,13 @@ |
|||
# 默认忽略的文件 |
|||
/shelf/ |
|||
/workspace.xml |
|||
# Rider 忽略的文件 |
|||
/modules.xml |
|||
/contentModel.xml |
|||
/projectSettingsUpdater.xml |
|||
/.idea.Bodk.Ava.iml |
|||
# 基于编辑器的 HTTP 客户端请求 |
|||
/httpRequests/ |
|||
# Datasource local storage ignored files |
|||
/dataSources/ |
|||
/dataSources.local.xml |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="AvaloniaProject"> |
|||
<option name="projectPerEditor"> |
|||
<map> |
|||
<entry key="Bodk.Ava.UI/Views/MainWindow.axaml" value="Bodk.Ava.UI/Bodk.Ava.UI.csproj" /> |
|||
</map> |
|||
</option> |
|||
</component> |
|||
</project> |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project version="4"> |
|||
<component name="UserContentModel"> |
|||
<attachedFolders /> |
|||
<explicitIncludes /> |
|||
<explicitExcludes /> |
|||
</component> |
|||
</project> |
@ -0,0 +1,21 @@ |
|||
<Application xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
x:Class="Bodk.Ava.UI.App" |
|||
xmlns:local="using:Bodk.Ava.UI" |
|||
RequestedThemeVariant="Default"> |
|||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. --> |
|||
|
|||
<Application.DataTemplates> |
|||
<local:ViewLocator/> |
|||
</Application.DataTemplates> |
|||
|
|||
<Application.Styles> |
|||
<FluentTheme /> |
|||
<Style Selector="TextBlock"> |
|||
<Setter Property="FontFamily" Value="PingFangSC, PingFang SC"/> |
|||
</Style> |
|||
<Style Selector="TextBox"> |
|||
<Setter Property="FontFamily" Value="PingFangSC, PingFang SC"/> |
|||
</Style> |
|||
</Application.Styles> |
|||
</Application> |
@ -0,0 +1,28 @@ |
|||
using Avalonia; |
|||
using Avalonia.Controls.ApplicationLifetimes; |
|||
using Avalonia.Markup.Xaml; |
|||
using Bodk.Ava.UI.ViewModels; |
|||
using Bodk.Ava.UI.Views; |
|||
|
|||
namespace Bodk.Ava.UI; |
|||
|
|||
public partial class App : Application |
|||
{ |
|||
public override void Initialize() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
|
|||
public override void OnFrameworkInitializationCompleted() |
|||
{ |
|||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) |
|||
{ |
|||
desktop.MainWindow = new MainWindow |
|||
{ |
|||
DataContext = new MainWindowViewModel(), |
|||
}; |
|||
} |
|||
|
|||
base.OnFrameworkInitializationCompleted(); |
|||
} |
|||
} |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 168 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 167 B |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 848 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,62 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<PropertyGroup> |
|||
<OutputType>WinExe</OutputType> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<Nullable>enable</Nullable> |
|||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport> |
|||
<ApplicationManifest>app.manifest</ApplicationManifest> |
|||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<Folder Include="Models\" /> |
|||
<AvaloniaResource Include="Assets\**" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<AvaloniaResource Remove="Assets\bodk-logo.ico" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<None Remove="Assets\bodk-logo.ico" /> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Content Include="Assets\Images\Face_Login_Icon.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_1.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_2.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_3.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_4.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_5.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_6.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_7.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Button_8.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Divider.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Home_4.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Home_5.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Home_Add.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Home_Reset.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Home_Sound_Swith.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\icon_1.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\icon_2.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\icon_3.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\icon_4.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\icon_5.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Indicator.png" /> |
|||
<Content Include="Assets\Images\HomeIcons\Machine.png" /> |
|||
<Content Include="Assets\Images\LoginButtonBackImage.png" /> |
|||
<Content Include="Assets\Images\Logo.png" /> |
|||
<Content Include="Assets\Images\User_Login_Icon.png" /> |
|||
</ItemGroup> |
|||
|
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Avalonia" Version="11.0.6" /> |
|||
<PackageReference Include="Avalonia.Desktop" Version="11.0.6" /> |
|||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.6" /> |
|||
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.6" /> |
|||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> |
|||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.6" /> |
|||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.6" /> |
|||
</ItemGroup> |
|||
</Project> |
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<_LastSelectedProfileId>G:\BODK\Bodk.Ava\Bodk.Ava.UI\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId> |
|||
</PropertyGroup> |
|||
</Project> |
@ -0,0 +1,23 @@ |
|||
using Avalonia; |
|||
using Avalonia.ReactiveUI; |
|||
using System; |
|||
|
|||
namespace Bodk.Ava.UI; |
|||
|
|||
sealed class Program |
|||
{ |
|||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
|||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
|||
// yet and stuff might break.
|
|||
[STAThread] |
|||
public static void Main(string[] args) => BuildAvaloniaApp() |
|||
.StartWithClassicDesktopLifetime(args); |
|||
|
|||
// Avalonia configuration, don't remove; also used by visual designer.
|
|||
public static AppBuilder BuildAvaloniaApp() |
|||
=> AppBuilder.Configure<App>() |
|||
.UsePlatformDetect() |
|||
.WithInterFont() |
|||
.LogToTrace() |
|||
.UseReactiveUI(); |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
https://go.microsoft.com/fwlink/?LinkID=208121. |
|||
--> |
|||
<Project> |
|||
<PropertyGroup> |
|||
<Configuration>Release</Configuration> |
|||
<Platform>Any CPU</Platform> |
|||
<PublishDir>bin\Release\net8.0\publish\linux-arm64\</PublishDir> |
|||
<PublishProtocol>FileSystem</PublishProtocol> |
|||
<_TargetId>Folder</_TargetId> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier> |
|||
<SelfContained>false</SelfContained> |
|||
<PublishSingleFile>false</PublishSingleFile> |
|||
</PropertyGroup> |
|||
</Project> |
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
https://go.microsoft.com/fwlink/?LinkID=208121. |
|||
--> |
|||
<Project> |
|||
<PropertyGroup> |
|||
<History>True|2024-09-12T02:39:21.7621817Z;True|2024-09-12T10:07:44.5587149+08:00;True|2024-09-09T16:34:42.6156445+08:00;True|2024-09-09T16:34:33.5319202+08:00;True|2024-09-09T16:29:33.7285071+08:00;True|2024-09-09T16:25:25.5951465+08:00;</History> |
|||
<LastFailureDetails /> |
|||
</PropertyGroup> |
|||
</Project> |
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Controls.Templates; |
|||
using Bodk.Ava.UI.ViewModels; |
|||
|
|||
namespace Bodk.Ava.UI; |
|||
|
|||
public class ViewLocator : IDataTemplate |
|||
{ |
|||
public Control? Build(object? data) |
|||
{ |
|||
if (data is null) |
|||
return null; |
|||
|
|||
var name = data.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal); |
|||
var type = Type.GetType(name); |
|||
|
|||
if (type != null) |
|||
{ |
|||
var control = (Control)Activator.CreateInstance(type)!; |
|||
control.DataContext = data; |
|||
return control; |
|||
} |
|||
|
|||
return new TextBlock { Text = "Not Found: " + name }; |
|||
} |
|||
|
|||
public bool Match(object? data) |
|||
{ |
|||
return data is ViewModelBase; |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
namespace Bodk.Ava.UI.ViewModels; |
|||
|
|||
public class MainWindowViewModel : ViewModelBase |
|||
{ |
|||
#pragma warning disable CA1822 // Mark members as static
|
|||
public string Greeting => "Welcome to Avalonia!"; |
|||
#pragma warning restore CA1822 // Mark members as static
|
|||
} |
@ -0,0 +1,7 @@ |
|||
using ReactiveUI; |
|||
|
|||
namespace Bodk.Ava.UI.ViewModels; |
|||
|
|||
public class ViewModelBase : ReactiveObject |
|||
{ |
|||
} |
@ -0,0 +1,398 @@ |
|||
<Window xmlns="https://github.com/avaloniaui" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:vm="using:Bodk.Ava.UI.ViewModels" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
|||
x:Class="Bodk.Ava.UI.Views.MainWindow" |
|||
x:DataType="vm:MainWindowViewModel" |
|||
Icon="/Assets/avalonia-logo.ico" |
|||
WindowState="FullScreen" |
|||
ExtendClientAreaChromeHints="NoChrome" |
|||
ExtendClientAreaToDecorationsHint="True" |
|||
ExtendClientAreaTitleBarHeightHint="-1" |
|||
SystemDecorations="None" |
|||
CanResize="False" |
|||
Title="HomePage" Height="768" Width="1366" |
|||
Background="#232323"> |
|||
|
|||
<Design.DataContext> |
|||
<!-- This only sets the DataContext for the previewer in an IDE, |
|||
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) --> |
|||
<vm:MainWindowViewModel /> |
|||
</Design.DataContext> |
|||
|
|||
<Grid> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="*"></ColumnDefinition> |
|||
<ColumnDefinition Width="*"></ColumnDefinition> |
|||
</Grid.ColumnDefinitions> |
|||
<Canvas> |
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Machine.png" |
|||
Width="580" |
|||
Canvas.Left="70" |
|||
Canvas.Top="70" /> |
|||
|
|||
<TextBlock Text="密封腔湿度" |
|||
Width="70" Height="15" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
TextAlignment="Center" |
|||
Canvas.Left="115" |
|||
Canvas.Top="189" /> |
|||
|
|||
<TextBlock Text="5.28" |
|||
Width="70" Height="30" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
TextAlignment="Center" |
|||
Canvas.Left="115" |
|||
Canvas.Top="162" /> |
|||
|
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Indicator.png" |
|||
Canvas.Left="187" |
|||
Canvas.Top="196" /> |
|||
|
|||
<TextBlock Text="液氮上限" |
|||
Width="70" Height="15" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
TextAlignment="Center" |
|||
Canvas.Left="115" |
|||
Canvas.Top="273" /> |
|||
|
|||
<TextBlock Text="-190mm" |
|||
Width="100" Height="30" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
TextAlignment="Center" |
|||
Canvas.Left="115" |
|||
Canvas.Top="246" /> |
|||
|
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Indicator.png" |
|||
Canvas.Left="187" |
|||
Canvas.Top="280" /> |
|||
|
|||
<TextBlock Text="液氮下限" |
|||
Width="70" Height="17" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
TextAlignment="Center" |
|||
Canvas.Left="115" |
|||
Canvas.Top="357" /> |
|||
|
|||
<TextBlock Text="-120mm" |
|||
Width="100" Height="30" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
TextAlignment="Center" |
|||
Canvas.Left="115" |
|||
Canvas.Top="330" /> |
|||
|
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Indicator.png" |
|||
Canvas.Left="187" |
|||
Canvas.Top="364" /> |
|||
|
|||
<TextBlock Text="存储区温度" |
|||
Width="70" Height="17" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
TextAlignment="Center" |
|||
Canvas.Left="597" |
|||
Canvas.Top="161" /> |
|||
|
|||
<TextBlock Text="-193.52℃" |
|||
Width="125" Height="30" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
TextAlignment="Center" |
|||
Canvas.Left="597" |
|||
Canvas.Top="134" /> |
|||
|
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Indicator.png" |
|||
Canvas.Left="475" |
|||
Canvas.Top="168" /> |
|||
|
|||
<TextBlock Text="腔内温度" |
|||
Width="70" Height="17" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
TextAlignment="Center" |
|||
Canvas.Left="597" |
|||
Canvas.Top="273" /> |
|||
|
|||
<TextBlock Text="23.658℃" |
|||
Width="120" Height="30" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
TextAlignment="Center" |
|||
Canvas.Left="597" |
|||
Canvas.Top="246" /> |
|||
|
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Indicator.png" |
|||
Canvas.Left="475" |
|||
Canvas.Top="280" /> |
|||
|
|||
<TextBlock Text="排气口温度℃" |
|||
Width="100" Height="15" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
TextAlignment="Center" |
|||
Canvas.Left="597" |
|||
Canvas.Top="385" /> |
|||
|
|||
<TextBlock Text="20.48℃" |
|||
Width="100" Height="30" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
TextAlignment="Center" |
|||
Canvas.Left="597" |
|||
Canvas.Top="358" /> |
|||
|
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Indicator.png" |
|||
Canvas.Left="475" |
|||
Canvas.Top="392" /> |
|||
|
|||
<Grid Canvas.Top="512" Canvas.Left="50" Width="680" Height="142" HorizontalAlignment="Left" VerticalAlignment="Center"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="*"/> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="40"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<!--<ColumnDefinition Width="25"/>--> |
|||
<ColumnDefinition Width="40"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<!--<ColumnDefinition Width="25"/>--> |
|||
<ColumnDefinition Width="40"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
<ColumnDefinition Width="Auto"/> |
|||
</Grid.ColumnDefinitions> |
|||
|
|||
<Image Height="16" Margin="0 0 20 0" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/icon_1.png"/> |
|||
<TextBlock Grid.Column="1" Grid.Row="0" Text="已用冷冻盒" |
|||
Width="60" Height="16" |
|||
TextWrapping="NoWrap" |
|||
Foreground="White" |
|||
FontSize="12" FontWeight="Normal" |
|||
TextAlignment="Center" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" FontFamily="PingFang SC"/> |
|||
<TextBlock Grid.Column="2" Grid.Row="0" Text="1368" |
|||
Width="90" Height="35" |
|||
TextWrapping="NoWrap" |
|||
Foreground="#FF7C00" |
|||
FontSize="28" FontWeight="Bold" |
|||
TextAlignment="Center" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20"/> |
|||
<!--<Image Grid.Row="0" Grid.Column="3" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Divider.png" |
|||
Height="20"/>--> |
|||
<Image Grid.Row="0" Grid.Column="3" HorizontalAlignment="Center" |
|||
Margin="0 0 20 0" Width="15" Height="16" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/icon_1.png"/> |
|||
<TextBlock Grid.Column="4" Grid.Row="0" Text="总冷冻盒" |
|||
Width="60" Height="16" |
|||
TextWrapping="NoWrap" |
|||
Foreground="White" |
|||
FontSize="12" FontWeight="Normal" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" FontFamily="PingFang SC"/> |
|||
<TextBlock Grid.Column="5" Grid.Row="0" Text="2500" |
|||
Width="110" Height="35" |
|||
TextWrapping="NoWrap" |
|||
Foreground="#FF7C00" |
|||
FontSize="28" FontWeight="Bold" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20"/> |
|||
<!--<Image Grid.Row="0" Grid.Column="7" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Divider.png" |
|||
Height="20" Width="60"/>--> |
|||
<Image Grid.Row="0" Grid.Column="6" HorizontalAlignment="Center" |
|||
Margin="0 0 20 0" Width="15" Height="16" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/icon_2.png"/> |
|||
<TextBlock Grid.Column="7" Grid.Row="0" Text="使用率" |
|||
Width="60" Height="16" |
|||
TextWrapping="NoWrap" |
|||
Foreground="White" |
|||
FontSize="12" FontWeight="Normal" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" FontFamily="PingFang SC"/> |
|||
<TextBlock Grid.Column="8" Grid.Row="0" |
|||
Width="100" Height="35" |
|||
TextWrapping="NoWrap" |
|||
Foreground="#FF7C00" |
|||
FontSize="28" FontWeight="Bold" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" Text="54.7%" /> |
|||
|
|||
<Image Grid.Row="1" Grid.Column="0" Margin="0 0 20 0" Width="15" Height="16" |
|||
Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/icon_3.png"/> |
|||
<TextBlock Grid.Column="1" Grid.Row="1" Text="液氮消耗量" |
|||
Width="60" Height="16" |
|||
TextWrapping="NoWrap" |
|||
Foreground="White" |
|||
FontSize="12" FontWeight="Normal" |
|||
TextAlignment="Center" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" FontFamily="PingFang SC"/> |
|||
<TextBlock Grid.Column="2" Grid.Row="1" Text="8.5L/D" |
|||
Width="110" Height="35" |
|||
TextWrapping="NoWrap" |
|||
Foreground="#FF7C00" |
|||
FontSize="28" FontWeight="Bold" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" Margin="15,0"/> |
|||
<!--<Image Grid.Row="1" Grid.Column="3" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Divider.png" |
|||
Height="20" Width="60"/>--> |
|||
<Image Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center" Margin="0 0 20 0" Width="15" Height="16" |
|||
Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/icon_4.png"/> |
|||
<TextBlock Grid.Column="4" Grid.Row="1" Text="转运区温度" |
|||
Width="60" Height="16" |
|||
TextWrapping="NoWrap" |
|||
Foreground="White" |
|||
FontSize="12" FontWeight="Normal" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" FontFamily="PingFang SC"/> |
|||
<TextBlock Grid.Column="5" Grid.Row="1" Text="28.56℃" |
|||
Width="130" Height="35" |
|||
TextWrapping="NoWrap" |
|||
Foreground="#FF7C00" |
|||
FontSize="28" FontWeight="Bold" |
|||
HorizontalAlignment="Left" |
|||
LineHeight="20" Margin="15,0"/> |
|||
<!--<Image Grid.Row="1" Grid.Column="7" Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/Divider.png" |
|||
Height="20" Width="60"/>--> |
|||
<Image Grid.Row="1" Grid.Column="6" HorizontalAlignment="Center" Margin="0 0 20 0" Width="15" Height="16" |
|||
Source="avares://Bodk.Ava.UI/Assets/Images/HomeIcons/icon_5.png"/> |
|||
<TextBlock Grid.Column="7" Grid.Row="1" Text="转运区" |
|||
Width="60" Height="16" |
|||
TextWrapping="NoWrap" |
|||
Foreground="White" |
|||
FontSize="12" FontWeight="Normal" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20" FontFamily="PingFang SC"/> |
|||
<TextBlock Grid.Column="8" Grid.Row="1" Text="无桶" |
|||
Width="90" Height="35" |
|||
TextWrapping="NoWrap" |
|||
Foreground="#FF7C00" |
|||
FontSize="28" FontWeight="Bold" |
|||
HorizontalAlignment="Center" |
|||
LineHeight="20"/> |
|||
</Grid> |
|||
|
|||
</Canvas> |
|||
|
|||
<Border Grid.Column="1" BorderThickness="1" |
|||
BorderBrush="Black" |
|||
Background="#1D1D1D" |
|||
CornerRadius="8" |
|||
Margin="80,30,30,30" |
|||
Padding="4" BoxShadow="0 0 0 0 Black "> |
|||
|
|||
<StackPanel> |
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/Logo.png" |
|||
Width="150" |
|||
Margin="0,70,0,0" |
|||
HorizontalAlignment="Center" VerticalAlignment="Top"/> |
|||
<TextBlock Text="欢迎使用" |
|||
Width="262" Height="25" |
|||
Foreground="#C5C5C5" |
|||
FontSize="18" |
|||
TextAlignment="Center" |
|||
Margin="0,40,0,0" |
|||
HorizontalAlignment="Center" VerticalAlignment="Top" FontFamily="SimHei"/> |
|||
<TextBlock Text="博工科技样本深低温智能存储系统" |
|||
Width="280" Height="25" |
|||
Foreground="#C5C5C5" |
|||
FontSize="18" |
|||
TextAlignment="Center" |
|||
Margin="0,10,0,0" |
|||
HorizontalAlignment="Center" VerticalAlignment="Top" FontFamily="SimHei"/> |
|||
|
|||
<Border BorderThickness="1" |
|||
Background="#111111" |
|||
CornerRadius="8" |
|||
Width="400" Height="272" |
|||
Margin="0,47,0,0" |
|||
HorizontalAlignment="Center" |
|||
VerticalAlignment="Center"> |
|||
<Border.BorderBrush> |
|||
<LinearGradientBrush StartPoint="0,0" EndPoint="0.5,0.5"> |
|||
<GradientStop Color="#26C9CB" Offset="0"/> |
|||
<GradientStop Color="#323232" Offset="0.5"/> |
|||
</LinearGradientBrush> |
|||
</Border.BorderBrush> |
|||
|
|||
<Grid Margin="7,11,7,0"> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="*"/> |
|||
<RowDefinition Height="*"/> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<Button Width="375" Height="125" |
|||
RenderTransformOrigin="0.5,0.5"> |
|||
<Button.Background> |
|||
<ImageBrush Source="avares://Bodk.Ava.UI/Assets/Images/LoginButtonBackImage.png" Stretch="Fill"/> |
|||
</Button.Background> |
|||
|
|||
<Button.Content> |
|||
<StackPanel Width="375" Height="124" Orientation="Horizontal" |
|||
VerticalAlignment="Center" HorizontalAlignment="Left"> |
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/User_Login_Icon.png" |
|||
Width="30" Height="30" |
|||
Margin="47,38,55,46" |
|||
VerticalAlignment="Center" HorizontalAlignment="Left"/> |
|||
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center"> |
|||
<TextBlock Text="账户登录" |
|||
Width="95" Height="28" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
HorizontalAlignment="Left" FontFamily="SimHei"/> |
|||
<TextBlock Text="Account login" |
|||
Width="95" Height="28" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Button.Content> |
|||
</Button> |
|||
|
|||
<Button Width="375" Height="125" Grid.Row="1" |
|||
RenderTransformOrigin="0.5,0.5"> |
|||
<Button.Background> |
|||
<ImageBrush Source="avares://Bodk.Ava.UI/Assets/Images/LoginButtonBackImage.png" Stretch="Fill"/> |
|||
</Button.Background> |
|||
|
|||
<Button.Content> |
|||
<StackPanel Width="375" Height="124" Orientation="Horizontal" |
|||
VerticalAlignment="Center" HorizontalAlignment="Left"> |
|||
<Image Source="avares://Bodk.Ava.UI/Assets/Images/Face_Login_Icon.png" |
|||
Width="30" Height="30" |
|||
Margin="47,38,55,46" |
|||
VerticalAlignment="Center" HorizontalAlignment="Left"/> |
|||
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center"> |
|||
<TextBlock Text="人脸登录" |
|||
Width="95" Height="28" |
|||
Foreground="White" |
|||
FontSize="22" |
|||
HorizontalAlignment="Left" FontFamily="SimHei"/> |
|||
<TextBlock Text="Face login" |
|||
Width="95" Height="28" |
|||
Foreground="White" |
|||
FontSize="13" |
|||
HorizontalAlignment="Left"/> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</Button.Content> |
|||
</Button> |
|||
</Grid> |
|||
</Border> |
|||
</StackPanel> |
|||
</Border> |
|||
|
|||
|
|||
</Grid> |
|||
|
|||
</Window> |
@ -0,0 +1,47 @@ |
|||
using Avalonia; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Input; |
|||
using Avalonia.Interactivity; |
|||
using Avalonia.Markup.Xaml; |
|||
using Avalonia.Media.Imaging; |
|||
using Avalonia.Threading; |
|||
using System; |
|||
|
|||
namespace Bodk.Ava.UI.Views; |
|||
|
|||
public partial class MainWindow : Window |
|||
{ |
|||
private DispatcherTimer _hideMouseTimer; |
|||
public MainWindow() |
|||
{ |
|||
InitializeComponent(); |
|||
this.Loaded += MainWindow_Loaded; |
|||
// 初始化定时器,设定2秒后隐藏鼠标
|
|||
_hideMouseTimer = new DispatcherTimer |
|||
{ |
|||
Interval = TimeSpan.FromSeconds(2) |
|||
}; |
|||
_hideMouseTimer.Tick += (sender, e) => HideMouse(); |
|||
|
|||
// 订阅鼠标移动事件
|
|||
this.PointerMoved += OnPointerMoved; |
|||
} |
|||
private void MainWindow_Loaded(object sender, RoutedEventArgs e) |
|||
{ |
|||
this.Cursor = new Cursor(StandardCursorType.None); |
|||
} |
|||
|
|||
private void OnPointerMoved(object sender, PointerEventArgs e) |
|||
{ |
|||
this.Cursor = new Cursor(StandardCursorType.Arrow); |
|||
|
|||
_hideMouseTimer.Stop(); |
|||
_hideMouseTimer.Start(); |
|||
} |
|||
|
|||
private void HideMouse() |
|||
{ |
|||
this.Cursor = new Cursor(StandardCursorType.None); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> |
|||
<!-- This manifest is used on Windows only. |
|||
Don't remove it as it might cause problems with window transparency and embedded controls. |
|||
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests --> |
|||
<assemblyIdentity version="1.0.0.0" name="Bodk.Ava.UI.Desktop"/> |
|||
|
|||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> |
|||
<application> |
|||
<!-- A list of the Windows versions that this application has been tested on |
|||
and is designed to work with. Uncomment the appropriate elements |
|||
and Windows will automatically select the most compatible environment. --> |
|||
|
|||
<!-- Windows 10 --> |
|||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> |
|||
</application> |
|||
</compatibility> |
|||
</assembly> |
@ -0,0 +1,13 @@ |
|||
{ |
|||
"runtimeOptions": { |
|||
"tfm": "net8.0", |
|||
"framework": { |
|||
"name": "Microsoft.NETCore.App", |
|||
"version": "8.0.0" |
|||
}, |
|||
"configProperties": { |
|||
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": true, |
|||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false |
|||
} |
|||
} |
|||
} |