Update to 11.2
This commit is contained in:
Родитель
b8dbe3c62e
Коммит
7614bd161d
|
@ -1,5 +1,5 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AvaloniaVersion>11.0.0-preview3</AvaloniaVersion>
|
<AvaloniaVersion>11.2.0</AvaloniaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "7.0.100",
|
"version": "8.0.100",
|
||||||
"rollForward": "latestMinor",
|
"rollForward": "latestMinor",
|
||||||
"allowPrerelease": true
|
"allowPrerelease": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RootNamespace>TraceCli</RootNamespace>
|
<RootNamespace>TraceCli</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:TraceGui"
|
xmlns:local="using:TraceGui"
|
||||||
Name="Trace"
|
Name="Trace"
|
||||||
|
RequestedThemeVariant="Dark"
|
||||||
x:Class="TraceGui.App">
|
x:Class="TraceGui.App">
|
||||||
<Application.DataTemplates>
|
<Application.DataTemplates>
|
||||||
<local:ViewLocator />
|
<local:ViewLocator />
|
||||||
</Application.DataTemplates>
|
</Application.DataTemplates>
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<FluentTheme Mode="Dark" />
|
<FluentTheme />
|
||||||
<Style Selector="TextBlock">
|
<Style Selector="TextBlock">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<RootNamespace>TraceGui</RootNamespace>
|
<RootNamespace>TraceGui</RootNamespace>
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
<PackageReference Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="$(AvaloniaVersion)" />
|
||||||
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)" />
|
||||||
<PackageReference Include="BitmapToVector" Version="1.16.3" />
|
<PackageReference Include="BitmapToVector" Version="1.16.3" />
|
||||||
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace TraceGui;
|
||||||
|
|
||||||
public class ViewLocator : IDataTemplate
|
public class ViewLocator : IDataTemplate
|
||||||
{
|
{
|
||||||
public IControl Build(object? data)
|
public Control Build(object? data)
|
||||||
{
|
{
|
||||||
var name = data?.GetType().FullName?.Replace("ViewModel", "View");
|
var name = data?.GetType().FullName?.Replace("ViewModel", "View");
|
||||||
var type = name is null ? null : Type.GetType(name);
|
var type = name is null ? null : Type.GetType(name);
|
||||||
|
|
|
@ -103,7 +103,7 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||||
|
|
||||||
var file = result.FirstOrDefault();
|
var file = result.FirstOrDefault();
|
||||||
|
|
||||||
if (file is not null && file.CanOpenRead)
|
if (file is not null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||||
ShowOverwritePrompt = true
|
ShowOverwritePrompt = true
|
||||||
});
|
});
|
||||||
|
|
||||||
if (file is not null && file.CanOpenWrite)
|
if (file is not null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
mc:Ignorable="d" d:DesignWidth="850" d:DesignHeight="650"
|
mc:Ignorable="d" d:DesignWidth="850" d:DesignHeight="650"
|
||||||
x:Class="TraceGui.Views.MainView"
|
x:Class="TraceGui.Views.MainView"
|
||||||
x:CompileBindings="True" x:DataType="vm:MainWindowViewModel"
|
x:CompileBindings="True" x:DataType="vm:MainWindowViewModel"
|
||||||
DragDrop.AllowDrop="True"
|
DragDrop.AllowDrop="True">
|
||||||
FontFamily="avares://Avalonia.Themes.Fluent/Assets#Inter">
|
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<vm:MainWindowViewModel />
|
<vm:MainWindowViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
|
|
|
@ -7,7 +7,7 @@ using TraceGui.ViewModels;
|
||||||
|
|
||||||
namespace TraceGui.Views;
|
namespace TraceGui.Views;
|
||||||
|
|
||||||
public class MainView : UserControl
|
public partial class MainView : UserControl
|
||||||
{
|
{
|
||||||
public MainView()
|
public MainView()
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:views="clr-namespace:TraceGui.Views"
|
xmlns:views="clr-namespace:TraceGui.Views"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="TraceGui.Views.MainWindow"
|
x:Class="TraceGui.Views.MainWindow"
|
||||||
x:Name="MainWindow"
|
x:Name="Window"
|
||||||
WindowState="Normal"
|
WindowState="Normal"
|
||||||
MinWidth="400"
|
MinWidth="400"
|
||||||
MinHeight="300"
|
MinHeight="300"
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
UseLayoutRounding="True"
|
UseLayoutRounding="True"
|
||||||
Icon="/Assets/avalonia-logo.ico"
|
Icon="/Assets/avalonia-logo.ico"
|
||||||
Title="Trace">
|
Title="Trace">
|
||||||
<Panel Margin="{Binding #MainWindow.OffScreenMargin}">
|
<Panel Margin="{Binding #Window.OffScreenMargin}">
|
||||||
<views:MainView />
|
<views:MainView />
|
||||||
</Panel>
|
</Panel>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
|
@ -4,7 +4,7 @@ using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace TraceGui.Views;
|
namespace TraceGui.Views;
|
||||||
|
|
||||||
public class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
|
@ -18,4 +18,4 @@ public class MainWindow : Window
|
||||||
{
|
{
|
||||||
AvaloniaXamlLoader.Load(this);
|
AvaloniaXamlLoader.Load(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace TraceGui.Views;
|
namespace TraceGui.Views;
|
||||||
|
|
||||||
public class OptionsView : UserControl
|
public partial class OptionsView : UserControl
|
||||||
{
|
{
|
||||||
public OptionsView()
|
public OptionsView()
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
namespace TraceGui.Views;
|
namespace TraceGui.Views;
|
||||||
|
|
||||||
public class TraceResultView : UserControl
|
public partial class TraceResultView : UserControl
|
||||||
{
|
{
|
||||||
public TraceResultView()
|
public TraceResultView()
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,19 +12,6 @@ class Program
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
=> AppBuilder.Configure<App>()
|
=> AppBuilder.Configure<App>()
|
||||||
.UsePlatformDetect()
|
.UsePlatformDetect()
|
||||||
.With(new Win32PlatformOptions()
|
.WithInterFont()
|
||||||
{
|
|
||||||
UseDeferredRendering = true,
|
|
||||||
AllowEglInitialization = true,
|
|
||||||
UseWindowsUIComposition = true
|
|
||||||
})
|
|
||||||
.With(new X11PlatformOptions()
|
|
||||||
{
|
|
||||||
UseDeferredRendering = true
|
|
||||||
})
|
|
||||||
.With(new AvaloniaNativePlatformOptions()
|
|
||||||
{
|
|
||||||
UseDeferredRendering = true
|
|
||||||
})
|
|
||||||
.LogToTrace();
|
.LogToTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<RootNamespace>TraceGui.Desktop</RootNamespace>
|
<RootNamespace>TraceGui.Desktop</RootNamespace>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
||||||
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
|
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Web" Version="$(AvaloniaVersion)" />
|
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче