| 1234567891011121314151617181920212223242526272829303132333435363738 |
- using DeviceCenter.model;
- using Newtonsoft.Json;
- using System;
- using System.Windows;
- namespace DeviceCenter
- {
- /// <summary>
- /// App.xaml 的交互逻辑
- /// </summary>
- public partial class App : Application
- {
- System.Threading.Mutex mutex;
- public App()
- {
- this.Startup += new StartupEventHandler(App_Startup);
- }
- void App_Startup(object sender, StartupEventArgs e)
- {
- bool ret;
- mutex = new System.Threading.Mutex(true, "ElectronicNeedleTherapySystem", out ret);
- if (!ret)
- {
- Environment.Exit(0);
- }
- Config config = new Config();
- string json = JsonConvert.SerializeObject(config, Formatting.Indented);
- Console.WriteLine(json);
- }
- }
- }
|