添加项目文件。

This commit is contained in:
GG Z
2024-09-22 11:05:41 +08:00
parent fb5d55723a
commit 49ceaae6a8
764 changed files with 78850 additions and 0 deletions

6
WpfApp/App.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

18
WpfApp/App.xaml Normal file
View File

@@ -0,0 +1,18 @@
<Application
x:Class="WpfApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemesDictionary Theme="Dark" />
<ui:ControlsDictionary />
<ResourceDictionary Source="pack://application:,,,/Wpf.Ui.Extend;component/Resources/Wpf.Ui.Extend.xaml" />
<!--<ResourceDictionary Source="pack://application:,,,/ColorPicker;component/Styles/DefaultColorPickerStyle.xaml" />-->
</ResourceDictionary.MergedDictionaries>
<FontFamily x:Key="SegoeFluentIcons">pack://application:,,,/WpfApp;component/Fonts/#Segoe Fluent Icons</FontFamily>
</ResourceDictionary>
</Application.Resources>
</Application>

17
WpfApp/App.xaml.cs Normal file
View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace WpfApp
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
WpfApp/Image/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

196
WpfApp/MainViewModel.cs Normal file
View File

@@ -0,0 +1,196 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Sai.RvKits;
using Wpf.Ui.Controls;
using Wpf.Ui;
using Wpf.Ui.Extend.Controls;
namespace WpfApp
{
partial class MainViewModel : ObservableValidator
{
private ISnackbarService snackbarService;
private ControlAppearance snackbarAppearance = ControlAppearance.Danger;
private int snackbarTimeout = 5;
[ObservableProperty]
private SnackbarPresenter snackbarPresenter;
[RelayCommand]
private void ButtonClick()
{
snackbarService = new SnackbarService();
snackbarService.SetSnackbarPresenter(SnackbarPresenter);
snackbarService.Show(
"消息",
"Test",
snackbarAppearance,
new SymbolIcon(SymbolRegular.Fluent24),
TimeSpan.FromSeconds(snackbarTimeout)
);
}
[RelayCommand]
private void Loaded(object obj)
{
if (obj is SnackbarPresenter snackbarPresenter)
{
this.SnackbarPresenter = snackbarPresenter;
}
}
private ObservableCollection<string> animals =
new()
{
"Cat",
"Dog",
"Bear",
"Lion",
"Mouse",
"Horse",
"Rat",
"Elephant",
"Kangaroo",
"Lizard",
"Snake",
"Frog",
"Fish",
"Butterfly",
"Human",
"Cow",
"Bumble Bee"
};
public ObservableCollection<Grade> Grades { get; set; } = new();
public ObservableCollection<Grade> SelectedItems { get; set; } = new();
public void GenerateTreeViewItem()
{
Grade item = new() { GradeLevel = "Grade1" };
item.Students.Add(new() { Name = "St1" });
item.Students.Add(new() { Name = "St2" });
item.Students.Add(new() { Name = "St3" });
Grade item1 = new() { GradeLevel = "Grade2" };
item1.Students.Add(new() { Name = "StA" });
item1.Students.Add(new() { Name = "StB" });
Grades.Add(item);
Grades.Add(item1);
}
[ObservableProperty]
[NotifyDataErrorInfo]
[MinLength(1)]
[Range(10,1000,ErrorMessage ="请输入大于10小于1000的值")]
[Required(ErrorMessage ="必填")]
private string number;
public ObservableCollection<string> Animals
{
get { return animals; }
}
public MainViewModel()
{
GenerateTreeViewItem();
}
public List<MultiTreeViewItem> Items = new();
private string _selectedAnimal = "Cat";
public string SelectedAnimal
{
get { return _selectedAnimal; }
set
{
_selectedAnimal = value;
OnPropertyChanged("SelectedAnimal");
}
}
private ObservableCollection<string> _selectedAnimals;
public ObservableCollection<string> SelectedAnimals
{
get
{
if (_selectedAnimals == null)
{
_selectedAnimals = new ObservableCollection<string> { "Dog", "Lion", "Lizard" };
SelectedAnimalsText = WriteSelectedAnimalsString(_selectedAnimals);
_selectedAnimals.CollectionChanged += (s, e) =>
{
SelectedAnimalsText = WriteSelectedAnimalsString(_selectedAnimals);
OnPropertyChanged("SelectedAnimals");
};
}
return _selectedAnimals;
}
set { _selectedAnimals = value; }
}
public string SelectedAnimalsText
{
get { return _selectedAnimalsText; }
set
{
_selectedAnimalsText = value;
OnPropertyChanged("SelectedAnimalsText");
}
}
string _selectedAnimalsText;
private static string WriteSelectedAnimalsString(IList<string> list)
{
if (list.Count == 0)
return String.Empty;
var builder = new StringBuilder(list[0]);
for (var i = 1; i < list.Count; i++)
{
builder.Append(", ");
builder.Append(list[i]);
}
return builder.ToString();
}
[RelayCommand()]
private void ShowDialog()
{
MessageExtensions.ShowMessage();
}
}
class Grade
{
public string GradeLevel { get; set; }
public List<Student> Students { get; set; } = new List<Student>();
}
class Student
{
public int ID { get; set; }
public string Name { get; set; }
public string Class { get; set; }
}
//class CustomerValidator : AbstractValidator<Student>
//{
// public CustomerValidator()
// {
// RuleFor(x => x.ID).NotEmpty();
// RuleFor(x => x.Name).NotEmpty().WithMessage("请指定姓名");
// RuleFor(x => x.Class).NotEmpty();
// }
//}
}

164
WpfApp/MainWindow.xaml Normal file
View File

@@ -0,0 +1,164 @@
<ex:FluentWindowEx
x:Class="WpfApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ex="https://github.com/sherlockforrest/Wpf.Ui.Extend"
xmlns:local="clr-namespace:WpfApp"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Title="MainWindow"
Width="1000"
Height="800"
d:DataContext="{d:DesignInstance Type=local:MainViewModel}"
ui:Design.Background="#252525"
ui:Design.Foreground="#252525"
mc:Ignorable="d">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Loaded">
<b:InvokeCommandAction Command="{Binding LoadedCommand}" CommandParameter="{Binding ElementName=SnackbarPresenter}" />
</b:EventTrigger>
</b:Interaction.Triggers>
<!--<ex:FluentWindowEx.TitleIcon>
<ui:FontIcon FontFamily="{StaticResource SegoeFluentIcons}" Glyph="&#xE700;" />
</ex:FluentWindowEx.TitleIcon>-->
<Window.Resources>
<!--<local:EnumSourceExtension x:Key="EnumSource" EnumType="{x:Type local:Sex}" />-->
<ex:ColorToBrushConverter x:Key="ColorToBrushConverter" />
</Window.Resources>
<!--<ui:TitleBar Title="{Binding Title, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" DockPanel.Dock="Top">
<ui:TitleBar.Icon>
<ui:FontIcon FontFamily="{StaticResource SegoeFluentIcons}" Glyph="&#xE700;" />
</ui:TitleBar.Icon>
</ui:TitleBar>-->
<Grid>
<ex:AutoGrid ChildMargin="5" Columns="auto,auto,auto,auto,auto">
<ui:SnackbarPresenter />
<GroupBox Header="标题">
<CheckBox Content="Check" />
</GroupBox>
<!--<ex:ColorZone Background="#FF1C1A1A" CornerRadius="4">
<Button Background="Brown" Content="Button" />
</ex:ColorZone>-->
<TextBox x:Name="DebugTextBox" VerticalAlignment="Center" />
<ui:TextBox
VerticalAlignment="Center"
PlaceholderText="文本框"
Text="" />
<ex:TextBoxEx
Header="Sample:"
HeaderPlacement="Left"
PlaceholderText="文本框"
Prefix="前缀:"
Suffix="后缀"
Text="{Binding Number, UpdateSourceTrigger=PropertyChanged}" />
<ComboBox IsEditable="True">
<ComboBoxItem Content="First" />
<ComboBoxItem Content="第一" />
<ComboBoxItem Content="First" />
<ComboBoxItem Content="第一" />
</ComboBox>
<ex:ComboBoxEx Header="标题" PlaceholderText="请选择选项">
<ComboBoxItem Content="First" />
<ComboBoxItem Content="第一" />
<ComboBoxItem Content="First" />
<ComboBoxItem Content="第一" />
</ex:ComboBoxEx>
<ex:ComboBoxEx ItemsSource="{Binding Animals}" />
<ex:ColorPicker x:Name="ColorPicker" />
<ex:ChooseBox VerticalAlignment="Center" ChooseBoxType="Folder" />
<ui:DropDownButton>
选择剖面框
<ui:DropDownButton.Flyout>
<ContextMenu>
<MenuItem Command="{Binding ShowDialogCommand}" Header="选择剖面框" />
<MenuItem Header="框选剖面框" />
</ContextMenu>
</ui:DropDownButton.Flyout>
</ui:DropDownButton>
<!--<ex:MultiTreeView Width="200">
<ex:MultiTreeViewItem Header="First">
<ex:MultiTreeViewItem Header="First" />
<ex:MultiTreeViewItem Header="Second" />
<ex:MultiTreeViewItem Header="Third" />
</ex:MultiTreeViewItem>
<ui:TreeViewItem Header="Second">
<ui:TreeViewItem Header="First" />
<ui:TreeViewItem Header="Second" />
<ui:TreeViewItem Header="Third" />
</ui:TreeViewItem>
<TreeViewItem Header="First">
<TreeViewItem Header="First" />
<TreeViewItem Header="Second" />
<TreeViewItem Header="Third" />
</TreeViewItem>
</ex:MultiTreeView>-->
<!--<ui:TreeGrid>
<ui:TreeGridHeader Title="First" />
<ui:TreeGridItem />
<ui:TreeGridItem />
<ui:TreeGridItem />
</ui:TreeGrid>-->
<TreeView>
<ui:TreeViewItem Header="ui:TreeViewItem">
<ui:TreeViewItem Header="ui:TreeViewItem">
<ui:TreeViewItem Header="ui:TreeViewItem" />
<ui:TreeViewItem Header="ui:TreeViewItem" />
</ui:TreeViewItem>
<ui:TreeViewItem Header="ui:TreeViewItem" />
</ui:TreeViewItem>
<TreeViewItem Header="TreeViewItem">
<TreeViewItem Header="TreeViewItem">
<TreeViewItem Header="TreeViewItem" />
<TreeViewItem Header="TreeViewItem" />
</TreeViewItem>
<TreeViewItem Header="TreeViewItem" />
</TreeViewItem>
</TreeView>
<ex:MultiTreeView>
<ex:MultiTreeViewItem Header="FirstRoot">
<ex:MultiTreeViewItem Header="First">
<ex:MultiTreeViewItem Header="1" />
<ex:MultiTreeViewItem Header="2" />
</ex:MultiTreeViewItem>
<ex:MultiTreeViewItem Header="Second" />
</ex:MultiTreeViewItem>
<ex:MultiTreeViewItem Header="SecondRoot" />
<!--<b:Interaction.Triggers>
<b:EventTrigger EventName="SelectedItemChanged">
<b:ChangePropertyAction PropertyName="" TargetObject="{Binding}" />
</b:EventTrigger>
</b:Interaction.Triggers>-->
</ex:MultiTreeView>
<ex:MultiTreeView ItemsSource="{Binding Grades}" SelectedItems="{Binding SelectedItems}">
<ex:MultiTreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Students}">
<TextBlock Text="{Binding GradeLevel}" />
<HierarchicalDataTemplate.ItemTemplate>
<HierarchicalDataTemplate>
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
</ex:MultiTreeView.ItemTemplate>
<!--<ex:MultiTreeView.ItemContainerStyle>
<Style BasedOn="{StaticResource DefaultMultiTreeViewItemStyle}" TargetType="ex:MultiTreeViewItem" />
</ex:MultiTreeView.ItemContainerStyle>-->
</ex:MultiTreeView>
<ex:CheckComboBox ItemsSource="{Binding Animals}" />
<Button Command="{Binding ButtonClickCommand}" Content="显示Snackbar" />
<!--<Border Height="8" CornerRadius="4">s
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Offset="0" Color="Transparent" />
<GradientStop Offset="1.0" Color="Red" />
</LinearGradientBrush>
</Border.Background>
</Border>-->
</ex:AutoGrid>
<ui:SnackbarPresenter x:Name="SnackbarPresenter" DockPanel.Dock="Bottom" />
</Grid>
</ex:FluentWindowEx>

85
WpfApp/MainWindow.xaml.cs Normal file
View File

@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wpf.Ui.Extend.Controls;
namespace WpfApp
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : FluentWindowEx
{
public MainWindow()
{
DataContext = new MainViewModel();
InitializeComponent();
// 创建并添加自定义的 TraceListener
var textBoxListener = new TextBoxTraceListener(DebugTextBox);
Debug.Listeners.Add(textBoxListener);
Debug.WriteLine("这是一个调试输出示例。");
}
//public static BitmapSource ToBitmapSource(Bitmap bitmap)
//{
// if (bitmap == null)
// {
// return null;
// }
// return Imaging.CreateBitmapSourceFromHBitmap(bitmap.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
//}
}
public class TextBoxTraceListener : TraceListener
{
private TextBox _textBox;
public TextBoxTraceListener(TextBox textBox)
{
_textBox = textBox;
}
public override void Write(string message)
{
AppendText(message);
}
public override void WriteLine(string message)
{
AppendText(message + Environment.NewLine);
}
private void AppendText(string message)
{
if (_textBox.Dispatcher.CheckAccess())
{
_textBox.AppendText(message);
_textBox.ScrollToEnd();
}
else
{
_textBox.Dispatcher.Invoke(() =>
{
_textBox.AppendText(message);
_textBox.ScrollToEnd();
});
}
}
}
}

View File

@@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("WpfApp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WpfApp")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请设置
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
//在 <PropertyGroup> 中。例如,如果你使用的是美国英语。
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(未在页面中找到资源时使用,
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(未在页面中找到资源时使用,
//、应用程序或任何主题专用资源字典中找到时使用)
)]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

83
WpfApp/Properties/Resources.Designer.cs generated Normal file
View File

@@ -0,0 +1,83 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace WpfApp.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WpfApp.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap background {
get {
object obj = ResourceManager.GetObject("background", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap background__1_ {
get {
object obj = ResourceManager.GetObject("background__1_", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="background" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Image\background.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="background__1_" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Image\background (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

26
WpfApp/Properties/Settings.Designer.cs generated Normal file
View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace WpfApp.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>

53
WpfApp/WpfApp.csproj Normal file
View File

@@ -0,0 +1,53 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<LangVersion>12.0</LangVersion>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<None Remove="Fonts\Segoe Fluent Icons.ttf" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Common" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wpf.Ui.Extend\Wpf.Ui.Extend.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="Fonts\Segoe Fluent Icons.ttf" />
</ItemGroup>
</Project>