From 92fe9486ff281808f0ec681c4c70a0640f9e070f Mon Sep 17 00:00:00 2001 From: Wen JY Date: Thu, 18 Jan 2024 15:33:13 +0800 Subject: [PATCH] =?UTF-8?q?Init=20-=20=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BB=93?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.idea.SlnMesnac/.idea/.gitignore | 13 + .idea/.idea.SlnMesnac/.idea/encodings.xml | 4 + .idea/.idea.SlnMesnac/.idea/indexLayout.xml | 8 + .idea/.idea.SlnMesnac/.idea/vcs.xml | 6 + SlnMesnac.WPF/App.xaml | 14 - SlnMesnac.WPF/App.xaml.cs | 78 ---- SlnMesnac.WPF/AssemblyInfo.cs | 10 - SlnMesnac.WPF/MainWindow.xaml | 267 ----------- SlnMesnac.WPF/MainWindow.xaml.cs | 31 -- SlnMesnac.WPF/SlnMesnac.WPF.csproj | 47 -- SlnMesnac.WPF/Startup.cs | 92 ---- SlnMesnac.WPF/Templates/icon/Icon.png | Bin 1153 -> 0 bytes SlnMesnac.WPF/Templates/image/background.jpg | Bin 48856 -> 0 bytes .../Templates/style/resourceStyle.xaml | 424 ------------------ .../ViewModel/MainWindowViewModel.cs | 157 ------- SlnMesnac.WPF/appsettings.json | 15 - SlnMesnac.sln | 6 - 17 files changed, 31 insertions(+), 1141 deletions(-) create mode 100644 .idea/.idea.SlnMesnac/.idea/.gitignore create mode 100644 .idea/.idea.SlnMesnac/.idea/encodings.xml create mode 100644 .idea/.idea.SlnMesnac/.idea/indexLayout.xml create mode 100644 .idea/.idea.SlnMesnac/.idea/vcs.xml delete mode 100644 SlnMesnac.WPF/App.xaml delete mode 100644 SlnMesnac.WPF/App.xaml.cs delete mode 100644 SlnMesnac.WPF/AssemblyInfo.cs delete mode 100644 SlnMesnac.WPF/MainWindow.xaml delete mode 100644 SlnMesnac.WPF/MainWindow.xaml.cs delete mode 100644 SlnMesnac.WPF/SlnMesnac.WPF.csproj delete mode 100644 SlnMesnac.WPF/Startup.cs delete mode 100644 SlnMesnac.WPF/Templates/icon/Icon.png delete mode 100644 SlnMesnac.WPF/Templates/image/background.jpg delete mode 100644 SlnMesnac.WPF/Templates/style/resourceStyle.xaml delete mode 100644 SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs delete mode 100644 SlnMesnac.WPF/appsettings.json diff --git a/.idea/.idea.SlnMesnac/.idea/.gitignore b/.idea/.idea.SlnMesnac/.idea/.gitignore new file mode 100644 index 0000000..b18145b --- /dev/null +++ b/.idea/.idea.SlnMesnac/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/.idea.SlnMesnac.iml +/modules.xml +/projectSettingsUpdater.xml +/contentModel.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.SlnMesnac/.idea/encodings.xml b/.idea/.idea.SlnMesnac/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.SlnMesnac/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.SlnMesnac/.idea/indexLayout.xml b/.idea/.idea.SlnMesnac/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.SlnMesnac/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.SlnMesnac/.idea/vcs.xml b/.idea/.idea.SlnMesnac/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/.idea.SlnMesnac/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SlnMesnac.WPF/App.xaml b/SlnMesnac.WPF/App.xaml deleted file mode 100644 index 48f0a12..0000000 --- a/SlnMesnac.WPF/App.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/SlnMesnac.WPF/App.xaml.cs b/SlnMesnac.WPF/App.xaml.cs deleted file mode 100644 index 78c0506..0000000 --- a/SlnMesnac.WPF/App.xaml.cs +++ /dev/null @@ -1,78 +0,0 @@ -using Lierda.WPFHelper; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using SlnMesnac.Config; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using System.Windows; - -namespace SlnMesnac.WPF -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - private System.Threading.Mutex mutex; - private LierdaCracker cracker = new LierdaCracker(); - public static IServiceProvider ServiceProvider; - - // Startup事件 - protected override async void OnStartup(StartupEventArgs e) - { - bool ret; - mutex = new System.Threading.Mutex(true, System.Diagnostics.Process.GetCurrentProcess().ProcessName, out ret); - if (!ret) - { - MessageBox.Show("应用程序已开启,禁止重复运行"); - Environment.Exit(0); - } - - cracker.Cracker(100); //设置GC回收间隔 - - base.OnStartup(e); - var host = CreateHostBuilder(e.Args).Build();//生成宿主。 - - ServiceProvider = host.Services; - await host.StartAsync(); - - var appConfig = host.Services.GetService(); - var logPath = $"{appConfig.logPath}/Logs/{DateTime.UtcNow:yyyy-MM-dd}/"; - Log.Information($"系统初始化完成,日志存放路径:{appConfig.logPath}"); - - - } - - /// - /// CreateHostBuilder - /// - /// - /// - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .UseSerilog() - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); - - // Exit事件 - protected override void OnExit(ExitEventArgs e) - { - base.OnExit(e); - - Log.Information($"系统退出,当前时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); - // 释放资源 - // ... - } - - - } -} diff --git a/SlnMesnac.WPF/AssemblyInfo.cs b/SlnMesnac.WPF/AssemblyInfo.cs deleted file mode 100644 index 8b5504e..0000000 --- a/SlnMesnac.WPF/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -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/SlnMesnac.WPF/MainWindow.xaml b/SlnMesnac.WPF/MainWindow.xaml deleted file mode 100644 index 6c6a0a4..0000000 --- a/SlnMesnac.WPF/MainWindow.xaml +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -