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 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -