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