File tree Expand file tree Collapse file tree 6 files changed +80
-3
lines changed
Expand file tree Collapse file tree 6 files changed +80
-3
lines changed Original file line number Diff line number Diff line change 1212
1313 <Application .Styles>
1414 <semi : SemiTheme Locale =" zh-CN" />
15+ <semi : SemiPopupAnimations />
16+ <StyleInclude Source =" /Styles/MainStyle.axaml" />
1517 </Application .Styles>
18+
19+ <Application .Resources>
20+ <FontFamily x : Key =" Phosphor" >/Assets/Fonts/Phosphor.ttf#Phosphor</FontFamily >
21+ <FontFamily x : Key =" PhosphorFill" >/Assets/Fonts/Phosphor.ttf#Phosphor-Fill</FontFamily >
22+ </Application .Resources>
1623</Application >
Original file line number Diff line number Diff line change 1010 </PropertyGroup >
1111
1212 <ItemGroup >
13+ <Folder Include =" Assets\Images\" />
1314 <Folder Include =" Models\" />
1415 <AvaloniaResource Include =" Assets\**" />
1516 </ItemGroup >
2526 <PackageReference Include =" Avalonia.Fonts.Inter" Version =" 11.2.5" />
2627 <!-- Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
2728 <PackageReference Condition =" '$(Configuration)' == 'Debug'" Include =" Avalonia.Diagnostics" Version =" 11.2.5" />
29+ <PackageReference Include =" Avalonia.Svg.Skia" Version =" 11.2.0.2" />
2830 <PackageReference Include =" CommunityToolkit.Mvvm" Version =" 8.4.0" />
2931 <PackageReference Include =" Microsoft.Extensions.DependencyInjection" Version =" 9.0.3" />
3032 <PackageReference Include =" NLua" Version =" 1.7.4" />
Original file line number Diff line number Diff line change 1+ <Styles xmlns =" https://github.com/avaloniaui" xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml" >
2+ <Design .PreviewWith>
3+ <StackPanel >
4+ <Button Classes =" IconButton" Content ="  " />
5+ <Button Classes =" IconButtonActivated" Content ="  " />
6+ </StackPanel >
7+ </Design .PreviewWith>
8+
9+ <!-- Add Styles Here -->
10+
11+ <Style Selector =" Button.IconButton" >
12+ <Setter Property =" FontFamily" Value =" {DynamicResource Phosphor}" />
13+ <Setter Property =" Padding" Value =" 0" />
14+ <Setter Property =" Theme" Value =" {DynamicResource BorderlessButton}" />
15+ <Setter Property =" Height" Value =" 40" />
16+ <Setter Property =" Width" Value =" 40" />
17+ <Setter Property =" FontSize" Value =" 20" />
18+ </Style >
19+ <Style Selector =" Button.IconButtonActivated" >
20+ <Setter Property =" FontFamily" Value =" {DynamicResource PhosphorFill}" />
21+ <Setter Property =" Padding" Value =" 0" />
22+ <Setter Property =" Theme" Value =" {DynamicResource SolidButton}" />
23+ <Setter Property =" Height" Value =" 40" />
24+ <Setter Property =" Width" Value =" 40" />
25+ <Setter Property =" FontSize" Value =" 20" />
26+ </Style >
27+ </Styles >
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Collections . ObjectModel ;
34using System . Linq ;
45using System . Text ;
56using System . Threading . Tasks ;
7+ using CommunityToolkit . Mvvm . ComponentModel ;
8+ using CommunityToolkit . Mvvm . Input ;
69
710namespace LLCOM . ViewModels ;
811
9- public partial class MainViewModel ( Func < Type , ViewModelBase ? > getService ) : ViewModelBase
12+ public partial class MainViewModel : ViewModelBase
1013{
14+ private Func < Type , ViewModelBase ? > GetService ;
15+
16+
17+
18+ public MainViewModel ( Func < Type , ViewModelBase ? > getService )
19+ {
20+ GetService = getService ;
21+ }
1122
1223}
Original file line number Diff line number Diff line change 11<UserControl
2+ Background =" {DynamicResource SemiColorBackground0}"
23 d : DesignHeight =" 800"
34 d : DesignWidth =" 1200"
45 mc : Ignorable =" d"
910 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
1011 xmlns : vm =" using:LLCOM.ViewModels"
1112 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml" >
12- <Grid >
13- <Button Content =" test" />
13+ <Grid ColumnDefinitions =" auto,*" >
14+ <Border
15+ Background =" {DynamicResource SemiColorBackground4}"
16+ BorderBrush =" {DynamicResource SemiColorBorder}"
17+ BorderThickness =" 0,0,1,0" >
18+ <Panel Margin =" 5" >
19+ <StackPanel Spacing =" 5" >
20+ <Button
21+ Classes =" IconButtonActivated"
22+ Content ="  "
23+ ToolTip.Tip=" 数据收发" />
24+ <Button
25+ Classes =" IconButton"
26+ Content ="  "
27+ ToolTip.Tip=" 调试工具" />
28+ <Button
29+ Classes =" IconButton"
30+ Content ="  "
31+ ToolTip.Tip=" 自动脚本" />
32+ <Button
33+ Classes =" IconButton"
34+ Content ="  "
35+ ToolTip.Tip=" 在线功能" />
36+ </StackPanel >
37+ <Button
38+ Classes =" IconButton"
39+ Content ="  "
40+ ToolTip.Tip=" 软件设置"
41+ VerticalAlignment =" Bottom" />
42+ </Panel >
43+ </Border >
1444 </Grid >
1545</UserControl >
You can’t perform that action at this time.
0 commit comments