From 509b0db31e91fc0f1125805da4210a933305bffc Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 11 Oct 2020 23:10:20 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84=EF=BC=88=E4=B8=BA=E4=B9=8B=E5=90=8E=E7=94=BB?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=BC=82=E4=BA=AE=E7=9A=84=20UI=20=E5=81=9A?= =?UTF-8?q?=E5=87=86=E5=A4=87=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App.config" | 0 .../AppConfig.cs" | 0 .../File.cs" | 0 .../FileDropAdmin.cs" | 0 .../Form.Designer.cs" | 0 .../Form.cs" | 0 .../Form.resx" | 0 .../Icon.ico" | Bin .../LICENSE" | 0 .../Other.cs" | 0 .../Program.cs" | 0 .../Properties/Resources.Designer.cs" | 0 .../Properties/Resources.resx" | 0 .../Properties/Settings.Designer.cs" | 0 .../Properties/Settings.settings" | 0 .../Registry.cs" | 0 .../WebClient.cs" | 0 .../app.manifest" | 0 .../syspin.dll" | Bin ...\226\345\260\217\345\267\245\345\205\267.csproj" | 0 ...214\226\345\260\217\345\267\245\345\205\267.sln" | 2 +- 21 files changed, 1 insertion(+), 1 deletion(-) rename App.config => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/App.config" (100%) rename AppConfig.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/AppConfig.cs" (100%) rename File.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/File.cs" (100%) rename FileDropAdmin.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/FileDropAdmin.cs" (100%) rename Form.Designer.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.Designer.cs" (100%) rename Form.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.cs" (100%) rename Form.resx => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.resx" (100%) rename Icon.ico => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Icon.ico" (100%) rename LICENSE => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/LICENSE" (100%) rename Other.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Other.cs" (100%) rename Program.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Program.cs" (100%) rename Properties/Resources.Designer.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Resources.Designer.cs" (100%) rename Properties/Resources.resx => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Resources.resx" (100%) rename Properties/Settings.Designer.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Settings.Designer.cs" (100%) rename Properties/Settings.settings => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Settings.settings" (100%) rename Registry.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Registry.cs" (100%) rename WebClient.cs => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/WebClient.cs" (100%) rename app.manifest => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/app.manifest" (100%) rename syspin.dll => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/syspin.dll" (100%) rename "\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.csproj" => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.csproj" (100%) diff --git a/App.config "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/App.config" similarity index 100% rename from App.config rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/App.config" diff --git a/AppConfig.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/AppConfig.cs" similarity index 100% rename from AppConfig.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/AppConfig.cs" diff --git a/File.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/File.cs" similarity index 100% rename from File.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/File.cs" diff --git a/FileDropAdmin.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/FileDropAdmin.cs" similarity index 100% rename from FileDropAdmin.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/FileDropAdmin.cs" diff --git a/Form.Designer.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.Designer.cs" similarity index 100% rename from Form.Designer.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.Designer.cs" diff --git a/Form.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.cs" similarity index 100% rename from Form.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.cs" diff --git a/Form.resx "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.resx" similarity index 100% rename from Form.resx rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Form.resx" diff --git a/Icon.ico "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Icon.ico" similarity index 100% rename from Icon.ico rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Icon.ico" diff --git a/LICENSE "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/LICENSE" similarity index 100% rename from LICENSE rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/LICENSE" diff --git a/Other.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Other.cs" similarity index 100% rename from Other.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Other.cs" diff --git a/Program.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Program.cs" similarity index 100% rename from Program.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Program.cs" diff --git a/Properties/Resources.Designer.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Resources.Designer.cs" similarity index 100% rename from Properties/Resources.Designer.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Resources.Designer.cs" diff --git a/Properties/Resources.resx "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Resources.resx" similarity index 100% rename from Properties/Resources.resx rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Resources.resx" diff --git a/Properties/Settings.Designer.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Settings.Designer.cs" similarity index 100% rename from Properties/Settings.Designer.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Settings.Designer.cs" diff --git a/Properties/Settings.settings "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Settings.settings" similarity index 100% rename from Properties/Settings.settings rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Properties/Settings.settings" diff --git a/Registry.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Registry.cs" similarity index 100% rename from Registry.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/Registry.cs" diff --git a/WebClient.cs "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/WebClient.cs" similarity index 100% rename from WebClient.cs rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/WebClient.cs" diff --git a/app.manifest "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/app.manifest" similarity index 100% rename from app.manifest rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/app.manifest" diff --git a/syspin.dll "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/syspin.dll" similarity index 100% rename from syspin.dll rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/syspin.dll" diff --git "a/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.csproj" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.csproj" similarity index 100% rename from "\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.csproj" rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.WindowsForms/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.csproj" diff --git "a/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" "b/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" index fddd089..effa759 100644 --- "a/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" +++ "b/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30503.244 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "磁贴美化小工具", "磁贴美化小工具.csproj", "{A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "磁贴美化小工具", "src\磁贴美化小工具.WindowsForms\磁贴美化小工具.csproj", "{A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From f16e9d314314d9fd60f14bd45cc8c5a083a4a983 Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 11 Oct 2020 23:40:47 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20WPF=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E7=95=8C=E9=9D=A2=EF=BC=88=E7=A9=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App.xaml" | 9 +++++++ .../App.xaml.cs" | 14 +++++++++++ .../MainWindow.xaml" | 12 +++++++++ .../MainWindow.xaml.cs" | 25 +++++++++++++++++++ .../Properties/AssemblyInfo.cs" | 10 ++++++++ ...60\217\345\267\245\345\205\267.Wpf.csproj" | 12 +++++++++ ...6\345\260\217\345\267\245\345\205\267.sln" | 12 ++++++++- 7 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Properties/AssemblyInfo.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" new file mode 100644 index 0000000..32fd5e0 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" @@ -0,0 +1,9 @@ + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" new file mode 100644 index 0000000..b2d5612 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Xiu2.TileTool +{ + public partial class App : Application + { + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" new file mode 100644 index 0000000..72a8caa --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" @@ -0,0 +1,12 @@ + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" new file mode 100644 index 0000000..0bfc7de --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +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.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Xiu2.TileTool +{ + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Properties/AssemblyInfo.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000..8b5504e --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Properties/AssemblyInfo.cs" @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" new file mode 100644 index 0000000..144330d --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" @@ -0,0 +1,12 @@ + + + + WinExe + netcoreapp3.1;net46 + latest + enable + true + Xiu2.TileTool + + + \ No newline at end of file diff --git "a/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" "b/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" index effa759..05eb956 100644 --- "a/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" +++ "b/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.sln" @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30503.244 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "磁贴美化小工具", "src\磁贴美化小工具.WindowsForms\磁贴美化小工具.csproj", "{A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "磁贴美化小工具", "src\磁贴美化小工具.WindowsForms\磁贴美化小工具.csproj", "{A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "磁贴美化小工具.Wpf", "src\磁贴美化小工具.Wpf\磁贴美化小工具.Wpf.csproj", "{8479DAB2-DF35-4941-A515-A2B9AB64A905}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,6 +23,14 @@ Global {A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}.Release|Any CPU.Build.0 = Release|Any CPU {A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}.Release|x64.ActiveCfg = Release|x64 {A8851F5E-CBB5-4466-BD72-D95C9BEA4DEA}.Release|x64.Build.0 = Release|x64 + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Debug|x64.ActiveCfg = Debug|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Debug|x64.Build.0 = Debug|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Release|Any CPU.Build.0 = Release|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Release|x64.ActiveCfg = Release|Any CPU + {8479DAB2-DF35-4941-A515-A2B9AB64A905}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 48c9a9194682ee4df05f6cd67e51e2ec2241f143 Mon Sep 17 00:00:00 2001 From: walterlv Date: Mon, 12 Oct 2020 00:32:34 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E5=B0=86=E5=90=AF=E5=8A=A8=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E7=9A=84=E4=BB=A3=E7=A0=81=E6=8A=BD=E7=A6=BB=E6=8B=86?= =?UTF-8?q?=E5=88=86=E5=88=B0=20WPF=20=E9=A1=B9=E7=9B=AE=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App.config" | 9 ++ .../App.manifest" | 73 ++++++++++++++++ .../App.xaml.cs" | 11 +++ .../AppInfo.cs" | 34 ++++++++ .../MainWindow.xaml" | 2 +- .../MainWindow.xaml.cs" | 4 + .../Program.cs" | 83 +++++++++++++++++++ ...60\217\345\267\245\345\205\267.Wpf.csproj" | 8 ++ 8 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.config" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.manifest" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Program.cs" diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.config" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.config" new file mode 100644 index 0000000..10b1fb1 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.config" @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.manifest" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.manifest" new file mode 100644 index 0000000..75fadaf --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.manifest" @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PerMonitorV2 + true + + + + + + + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" index b2d5612..0fc9150 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" @@ -10,5 +10,16 @@ namespace Xiu2.TileTool { public partial class App : Application { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + // 判断系统版本 + if (Environment.OSVersion.Version.Major != 10) + { + _ = MessageBox.Show($"{AppInfo.Main.AppName}仅支持 Windows10 系统!", "错误", MessageBoxButton.OK); + Shutdown(); + } + } } } diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" new file mode 100644 index 0000000..3771e96 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; + +namespace Xiu2.TileTool +{ + /// + /// 包含应用程序的一般信息。 + /// + internal class AppInfo + { + /// + /// 获取当前应用程序的一般信息。 + /// + public static AppInfo Main { get; } = new AppInfo(Assembly.GetEntryAssembly()!); + + public AppInfo(Assembly assembly) + { + AppName = assembly.GetCustomAttribute()!.Title; + Version = assembly.GetCustomAttribute()!.InformationalVersion; + } + + /// + /// 获取应用名称。 + /// + public string AppName { get; } + + /// + /// 获取版本号(可能带预览标签)。 + /// + public string Version { get; } + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" index 72a8caa..a0e9c52 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Xiu2.TileTool" mc:Ignorable="d" - Title="MainWindow" Height="450" Width="800"> + Height="450" Width="800"> diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" index 0bfc7de..5f80968 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows; @@ -20,6 +21,9 @@ public partial class MainWindow : Window public MainWindow() { InitializeComponent(); + + // 初始化动态的界面项。 + Title = $"{AppInfo.Main.AppName} v{AppInfo.Main.Version}"; } } } diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Program.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Program.cs" new file mode 100644 index 0000000..f9f4a8f --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Program.cs" @@ -0,0 +1,83 @@ +using System; +using System.Diagnostics; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Xiu2.TileTool +{ + internal static class Program + { + [STAThread] + static void Main(string[] args) + { + // 启动前一个进程实例。 + Mutex? newMutex = null; + try + { +#pragma warning disable IDE0067 // 丢失范围之前释放对象 + newMutex = new Mutex(true, "a8851f5e-cbb5-4466-bd72-d95c9bea4dea", out bool createdNew); +#pragma warning restore IDE0067 // 丢失范围之前释放对象 + if (!createdNew) + { + if (args.Length > 0 && args[0] != "") + { + // 右键菜单启动:杀掉已存在的进程。 + KillSameNameProcess(); + } + else + { + // 用户双击启动,打开之前已打开的窗口。 + var current = Process.GetCurrentProcess(); + var process = Process.GetProcessesByName(current.ProcessName).FirstOrDefault(x => x.Id != current.Id); + if (process != null) + { + var hwnd = process.MainWindowHandle; + ShowWindow(hwnd, 9); + SetForegroundWindow(hwnd); + return; + } + } + } + } + catch (Exception) + { + // 忽略任何多实例处理相关的异常。 + } + + // 启动自己。 + var app = new App(); + app.InitializeComponent(); + app.Run(); + } + + /// + /// 结束同名进程。 + /// + private static void KillSameNameProcess() + { + // 获取当前进程信息。 + Process currentProcess = Process.GetCurrentProcess(); + // 获取同名进程信息。 + Process[] processes = Process.GetProcesses(); + foreach (Process process in processes) + { + // 判断该进程主窗口标题是否含有 XXX 字符串。 + if (process.MainWindowTitle.Contains("磁贴美化小工具 v")) + { + // 如果不是当前进程,就结束它。 + if (process.Id != currentProcess.Id) + { + process.Kill(); + } + } + } + } + + [DllImport("user32.dll")] + private static extern int ShowWindow(IntPtr hwnd, uint nCmdShow); + + [DllImport("USER32.DLL")] + public static extern bool SetForegroundWindow(IntPtr hWnd); + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" index 144330d..2a70f13 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" @@ -7,6 +7,14 @@ enable true Xiu2.TileTool + 4.2.0-alpha01 + Xiu2.TileTool.Program + 磁贴美化小工具 + App.manifest + + + + \ No newline at end of file From f65d2931487fe8d99f436d4e4bcac6042e83c024 Mon Sep 17 00:00:00 2001 From: walterlv Date: Sat, 17 Oct 2020 09:19:54 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=89=B2=E5=92=8C=E7=AA=97=E5=8F=A3=E8=BE=B9=E6=A1=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App.xaml" | 7 +++- .../MainWindow.xaml" | 5 +-- .../Themes/Core.xaml" | 33 +++++++++++++++++++ .../Themes/FDS/Window.xaml" | 23 +++++++++++++ 4 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/Window.xaml" diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" index 32fd5e0..86d757c 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" @@ -4,6 +4,11 @@ xmlns:local="clr-namespace:Xiu2.TileTool" StartupUri="MainWindow.xaml"> - + + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" index a0e9c52..a3c7272 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" @@ -4,8 +4,9 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Xiu2.TileTool" - mc:Ignorable="d" - Height="450" Width="800"> + mc:Ignorable="d" Height="450" Width="800" + Style="{StaticResource Style.Window}" + Topmost="True" Background="{StaticResource Brush.Theme.Background}"> diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" new file mode 100644 index 0000000..bfc9832 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" @@ -0,0 +1,33 @@ + + + #0B6AB4 + #2286CC + #014696 + White + #999999 + #2B2B2B + White + #999999 + #2B2B2B + #353536 + #353536 + #353536 + #353536 + #353536 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/Window.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/Window.xaml" new file mode 100644 index 0000000..fe5e94b --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/Window.xaml" @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file From f7a0b71b25d29686013544d655569595dab0a027 Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 18 Oct 2020 11:00:50 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App.xaml" | 2 +- .../App.xaml.cs" | 2 ++ .../Core/AppInfo.cs" | 2 +- .../Views/MainWindow.xaml" | 4 ++-- .../Views/MainWindow.xaml.cs" | 4 +++- ...45\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" | 4 ++++ 6 files changed, 13 insertions(+), 5 deletions(-) rename "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Core/AppInfo.cs" (96%) rename "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" (82%) rename "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" => "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml.cs" (92%) diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" index 86d757c..5e42c43 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Xiu2.TileTool" - StartupUri="MainWindow.xaml"> + StartupUri="Views/MainWindow.xaml"> diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" index 0fc9150..05dd157 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml.cs" @@ -6,6 +6,8 @@ using System.Threading.Tasks; using System.Windows; +using Xiu2.TileTool.Core; + namespace Xiu2.TileTool { public partial class App : Application diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Core/AppInfo.cs" similarity index 96% rename from "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Core/AppInfo.cs" index 3771e96..56287c1 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/AppInfo.cs" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Core/AppInfo.cs" @@ -3,7 +3,7 @@ using System.Reflection; using System.Text; -namespace Xiu2.TileTool +namespace Xiu2.TileTool.Core { /// /// 包含应用程序的一般信息。 diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" similarity index 82% rename from "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" index a3c7272..7332d66 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" @@ -1,9 +1,9 @@ - diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml.cs" similarity index 92% rename from "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" rename to "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml.cs" index 5f80968..086aa0f 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/MainWindow.xaml.cs" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml.cs" @@ -14,7 +14,9 @@ using System.Windows.Navigation; using System.Windows.Shapes; -namespace Xiu2.TileTool +using Xiu2.TileTool.Core; + +namespace Xiu2.TileTool.Views { public partial class MainWindow : Window { diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" index 2a70f13..96c9e16 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf.csproj" @@ -17,4 +17,8 @@ + + + + \ No newline at end of file From 48c1b0c40beb63cecb6c807865d87505362c5f81 Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 18 Oct 2020 11:11:34 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20MVVM=20=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E6=9E=81=E7=AE=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UIFramework/BindableObject.cs" | 51 ++++++++ .../UIFramework/NavigationItem.cs" | 121 ++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/BindableObject.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/NavigationItem.cs" diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/BindableObject.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/BindableObject.cs" new file mode 100644 index 0000000..06fbbc6 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/BindableObject.cs" @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.Runtime.CompilerServices; + +// 来源:https://github.com/walterlv/Walterlv.Packages/blob/master/src/Frameworks/Walterlv.Windows.Framework/ComponentModel/BindableObject.cs + +namespace Xiu2.TileTool.UIFramework +{ + /// + /// 表示可绑定的对象,在此类型的派生类中按约定定义的属性支持绑定。 + /// + public abstract class BindableObject : INotifyPropertyChanged + { + /// + /// 当此实例中的任何一个具有更改通知的属性值改变时发生。 + /// 派生类可以通过调用 来引发此事件。 + /// + public event PropertyChangedEventHandler? PropertyChanged; + + /// + /// 当具有更改通知的属性值改变时发生。 + /// + /// 属性名称。不需要手动传入,会自动根据所在属性的方法名设置此参数值。 + protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + /// + /// 修改一个具有更改通知的属性值,并对外报告值的改变。 + /// + /// 值的类型。 + /// 要修改的字段引用。 + /// 要修改的字段的新值。 + /// 属性名称。不需要手动传入,会自动根据所在属性的方法名设置此参数值。 + /// 如果值发生了更改,则返回 true;否则返回 false。 + protected bool SetValue(ref T field, T value, [CallerMemberName] string? propertyName = null) + { + if (!Equals(field, value)) + { + field = value; + OnPropertyChanged(propertyName); + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/NavigationItem.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/NavigationItem.cs" new file mode 100644 index 0000000..7f49782 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/UIFramework/NavigationItem.cs" @@ -0,0 +1,121 @@ +using System; +using System.Diagnostics.Contracts; +using System.Windows; + +// 来源:https://github.com/walterlv/Walterlv.Packages/blob/master/src/Frameworks/Walterlv.Windows.Framework/Windows/Navigating/NavigationItem.cs + +namespace Xiu2.TileTool.UIFramework +{ + /// + /// 为 Master-Detail 布局型导航提供通用的 ViewModel。 + /// + public class NavigationItem : BindableObject + { + private readonly Func _viewCreator; + private readonly Func _viewModelCreator; + private UIElement? _view; + private object? _viewModel; + + /// + /// 创建 的新实例。 + /// + /// 创建 View 的方法。 + /// 创建 ViewModel 的方法。 + /// 导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航的描述导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航对象的额外属性(为避免额外编写继承自 的类,这里提供一个通用的属性,用于在导航的 ViewModel 上下文中绑定使用)。 + public NavigationItem(Func viewCreator, Func viewModelCreator, + string? title = null, string? description = null, object? data = null) + { + _viewCreator = viewCreator ?? throw new ArgumentNullException(nameof(viewCreator)); + _viewModelCreator = viewModelCreator ?? throw new ArgumentNullException(nameof(viewModelCreator)); + Title = title ?? ""; + Description = description; + Data = data; + } + + /// + /// 导航上下文中的 View。 + /// + public UIElement View => _view ??= _viewCreator(); + + /// + /// 导航上下文中的 ViewModel。 + /// + public object ViewModel => _viewModel ??= _viewModelCreator(); + + /// + /// 导航标题。 + /// + public string? Title { get; } + + /// + /// 导航描述。 + /// + public string? Description { get; } + + /// + /// 导航中附带的额外数据。 + /// + public object? Data { get; } + + /// + /// 将一个 View 和一个 ViewModel 连接起来,组成一个适用于 Master-Detail 布局的通用导航 ViewModel。 + /// + /// View 的类型。 + /// ViewModel 的类型。 + /// 导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航的描述导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航对象的额外属性(为避免额外编写继承自 的类,这里提供一个通用的属性,用于在导航的 ViewModel 上下文中绑定使用)。 + /// 适用于 Master-Detail 布局的通用导航 ViewModel。 + [Pure] + public static NavigationItem Combine( + string? title = null, string? description = null, object? data = null) + where TView : UIElement, new() + where TViewModel : class, new() + => new NavigationItem(() => new TView(), () => new TViewModel(), title, description, data); + } + + /// + /// 为 Master-Detail 布局型导航提供通用的 ViewModel。 + /// + public class NavigationItem : NavigationItem + where TView : UIElement, new() + where TViewModel : class, new() + { + /// + /// 创建 的新实例。 + /// + /// 创建 View 的方法。 + /// 创建 ViewModel 的方法。 + /// 导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航的描述导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航对象的额外属性(为避免额外编写继承自 的类,这里提供一个通用的属性,用于在导航的 ViewModel 上下文中绑定使用)。 + public NavigationItem(Func viewCreator, Func viewModelCreator, + string? title = null, string? description = null, object? data = null) + : base(viewCreator, viewModelCreator, title, description, data) + { + } + + /// + /// 导航上下文中的 View。 + /// + public new TView View => (TView)base.View; + + /// + /// 导航上下文中的 ViewModel。 + /// + public new TViewModel ViewModel => (TViewModel)base.ViewModel; + + /// + /// 将一个 View 和一个 ViewModel 连接起来,组成一个适用于 Master-Detail 布局的通用导航 ViewModel。 + /// + /// 导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航的描述导航的标题(仅提供通用属性,具体使用需在 MVVM 模式中自行绑定 Title 属性)。 + /// 导航对象的额外属性(为避免额外编写继承自 的类,这里提供一个通用的属性,用于在导航的 ViewModel 上下文中绑定使用)。 + /// 适用于 Master-Detail 布局的通用导航 ViewModel。 + [Pure] + public static NavigationItem Combine(string? title = null, string? description = null, object? data = null) + => new NavigationItem(() => new TView(), () => new TViewModel(), title, description, data); + } +} From 46395d27aa0e54c7b16b3b2601eaaeed5ee89059 Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 18 Oct 2020 12:00:50 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/AboutPage.xaml" | 12 +++++ .../Views/AboutPage.xaml.cs" | 26 ++++++++++ .../Views/AboutViewModel.cs" | 13 +++++ .../Views/EditTilePage.xaml" | 12 +++++ .../Views/EditTilePage.xaml.cs" | 26 ++++++++++ .../Views/EditTileViewModel.cs" | 13 +++++ .../Views/MainViewModel.cs" | 21 ++++++++ .../Views/MainWindow.xaml" | 50 ++++++++++++++++++- .../Views/SettingsPage.xaml" | 12 +++++ .../Views/SettingsPage.xaml.cs" | 26 ++++++++++ .../Views/SettingsViewModel.cs" | 13 +++++ 11 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutViewModel.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTileViewModel.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainViewModel.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml.cs" create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsViewModel.cs" diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml" new file mode 100644 index 0000000..5dafda3 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml" @@ -0,0 +1,12 @@ + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml.cs" new file mode 100644 index 0000000..2a7ee7c --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutPage.xaml.cs" @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Xiu2.TileTool.Views +{ + /// + /// AboutPage.xaml 的交互逻辑 + /// + public partial class AboutPage : UserControl + { + public AboutPage() + { + InitializeComponent(); + } + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutViewModel.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutViewModel.cs" new file mode 100644 index 0000000..e31da68 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/AboutViewModel.cs" @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xiu2.TileTool.Views +{ + public class AboutViewModel + { + + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" new file mode 100644 index 0000000..1a92b7c --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" @@ -0,0 +1,12 @@ + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml.cs" new file mode 100644 index 0000000..5b2072f --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml.cs" @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Xiu2.TileTool.Views +{ + /// + /// EditTilePage.xaml 的交互逻辑 + /// + public partial class EditTilePage : UserControl + { + public EditTilePage() + { + InitializeComponent(); + } + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTileViewModel.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTileViewModel.cs" new file mode 100644 index 0000000..d5f9c81 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTileViewModel.cs" @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xiu2.TileTool.Views +{ + public class EditTileViewModel + { + + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainViewModel.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainViewModel.cs" new file mode 100644 index 0000000..e0de7f4 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainViewModel.cs" @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Xiu2.TileTool.UIFramework; + +namespace Xiu2.TileTool.Views +{ + public class MainViewModel : BindableObject + { + public ObservableCollection NavigationItems { get; } = new ObservableCollection + { + NavigationItem.Combine("新建/编辑磁贴", null, ""), + NavigationItem.Combine("关于", null, ""), + NavigationItem.Combine("设置", null, ""), + }; + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" index 7332d66..d725277 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/MainWindow.xaml" @@ -4,10 +4,58 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Xiu2.TileTool.Views" + xmlns:uf="clr-namespace:Xiu2.TileTool.UIFramework" mc:Ignorable="d" Height="450" Width="800" Style="{StaticResource Style.Window}" Topmost="True" Background="{StaticResource Brush.Theme.Background}"> + + + + + + + + + + + - + + + + + + + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml" new file mode 100644 index 0000000..a52ff03 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml" @@ -0,0 +1,12 @@ + + + + + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml.cs" new file mode 100644 index 0000000..0faaf6a --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsPage.xaml.cs" @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Xiu2.TileTool.Views +{ + /// + /// SettingsPage.xaml 的交互逻辑 + /// + public partial class SettingsPage : UserControl + { + public SettingsPage() + { + InitializeComponent(); + } + } +} diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsViewModel.cs" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsViewModel.cs" new file mode 100644 index 0000000..c72b257 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/SettingsViewModel.cs" @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Xiu2.TileTool.Views +{ + public class SettingsViewModel + { + + } +} From 42a05c23c6b1631873d7faf2a754538db24bc238 Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 18 Oct 2020 14:59:28 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App.xaml" | 1 + .../Themes/FDS/ListBox.xaml" | 48 +++++++++++++++++ .../Views/MainWindow.xaml" | 52 +++++++++++++------ 3 files changed, 86 insertions(+), 15 deletions(-) create mode 100644 "src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/ListBox.xaml" diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" index 5e42c43..8dd85d5 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/App.xaml" @@ -8,6 +8,7 @@ + diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/ListBox.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/ListBox.xaml" new file mode 100644 index 0000000..5bc4ab9 --- /dev/null +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/FDS/ListBox.xaml" @@ -0,0 +1,48 @@ + + + + + + + + + + + Text="{Binding Data, Mode=OneTime}" + HorizontalAlignment="Center" VerticalAlignment="Center" /> @@ -49,13 +66,18 @@ - + - - - + + + + + + From aca6301506afe17f37893b49be1a39812689d57c Mon Sep 17 00:00:00 2001 From: walterlv Date: Sun, 18 Oct 2020 15:44:08 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A3=81=E8=B4=B4?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Themes/Core.xaml" | 10 ++++ .../Views/EditTilePage.xaml" | 58 ++++++++++++++++++- .../Views/MainWindow.xaml" | 11 ++-- 3 files changed, 72 insertions(+), 7 deletions(-) diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" index bfc9832..e95ae8a 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Themes/Core.xaml" @@ -30,4 +30,14 @@ + + \ No newline at end of file diff --git "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" index 1a92b7c..1fa84f2 100644 --- "a/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" +++ "b/src/\347\243\201\350\264\264\347\276\216\345\214\226\345\260\217\345\267\245\345\205\267.Wpf/Views/EditTilePage.xaml" @@ -4,9 +4,61 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Xiu2.TileTool.Views" - mc:Ignorable="d" - d:DesignHeight="450" d:DesignWidth="800"> + xmlns:ef="clr-namespace:Walterlv.Windows.Effects" + mc:Ignorable="d"> - + + + + + + + + + + + @@ -73,17 +79,59 @@ FontSize="32" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" /> + Margin="0 16" HorizontalAlignment="Center" VerticalAlignment="Bottom" />