更新项目支持到 .NET 8,优化标签视图功能,修复界面元素绑定

This commit is contained in:
muqing 2025-01-16 15:23:37 +08:00
parent e7be2802a3
commit d37416ce33
5 changed files with 10 additions and 7 deletions

View File

@ -46,6 +46,10 @@ public class EditorTreeView : TreeView
else
{
Debug.WriteLine($"File clicked: {invokedItem.Name}");
EditorWin.TabViewList.Add(new TabViewItem()
{
Header = invokedItem.Name,
});
}
}
}

View File

@ -110,8 +110,7 @@
x:Name="tabview"
Grid.Row="0"
Height="auto"
IsAddTabButtonVisible="False"
TabItemsSource="{x:Bind TabViewList}" />
IsAddTabButtonVisible="False" />
</Grid>
</Grid>

View File

@ -12,7 +12,7 @@ namespace RustTools.Editor;
/// </summary>
public sealed partial class EditorWin : WindowEx
{
private readonly ObservableCollection<TabViewItem> TabViewList = new();
public static ObservableCollection<TabViewItem> TabViewList = new();
//Ŀ¼Áбí
public ObservableCollection<FileItem> DataSource = new();
@ -39,6 +39,8 @@ public sealed partial class EditorWin : WindowEx
DataSource = EditorLoad.GetData(directoryInfo.FullName);
treeView.ItemsSource = DataSource;
Closed += EditorWin_Closed;
tabview.TabItemsSource = TabViewList;
}

View File

@ -1,7 +1,7 @@

## 开始使用
Windows10系统版本以上
net7.0-windows10.0.19041.0的支持
net8.0-windows10.0.19041.0的支持
Visual Studio Code
Visual Studio
JetBrains Rider

View File

@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.19041.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>RustTools</RootNamespace>
<Platform>x64</Platform>
<Platforms>x86;x64;arm64</Platforms>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWinUI>true</UseWinUI>
@ -19,7 +18,6 @@
<ApplicationIcon>Assets\WindowIcon.ico</ApplicationIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<DefaultLanguage>zh-cn</DefaultLanguage>
</PropertyGroup>
<ItemGroup>