using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; using System.Windows.Forms; using SystemX.Net.Platform.SystemX.Net.XEFCore; using SystemX.Net.Platform.SystemX.Net.XEFCore.DBContext.CPXV2Log; using SystemX.Net.Platform.SystemX.Net.XEFCore.DBContext.CPXV2LogJson; namespace SystemX.Net.MiddlewareUI { static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { bool bCreateProgram = false; Mutex SetMutex = new Mutex(true, "SystemX.Net.Middleware.UI.Log CPXV2-JSON", out bCreateProgram); if (bCreateProgram) { //종속성 주입 /* ServiceCollection collection = new ServiceCollection(); collection.AddSingleton>(); collection.AddSingleton(); ServiceProvider provider = collection.BuildServiceProvider(); var shortTermJson = provider.GetService>(); shortTermJson.SetConnectionString("Server=127.0.0.1;Database=CPXV2ShortTermLogJson;User Id=Alis;Password=Kefico!@34;"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(provider.GetService()); */ Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); SetMutex.ReleaseMutex(); } else { MessageBox.Show("[SystemX.Net.Middleware.UI.Log CPXV2] Already this program excute now. Check the process.", "SystemX.Net.Middleware.UI.Log", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } }