mirror of
				https://github.com/snltty/linker.git
				synced 2025-11-01 04:53:15 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			786 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			786 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Threading;
 | |
| using System.Threading.Tasks;
 | |
| using System.Windows.Forms;
 | |
| 
 | |
| namespace cmonitor.win
 | |
| {
 | |
|     internal static class Program
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// 应用程序的主入口点。
 | |
|         /// </summary>
 | |
|         [STAThread]
 | |
|         static void Main(string[] args)
 | |
|         {
 | |
|             Mutex mutex = new Mutex(true, System.Diagnostics.Process.GetCurrentProcess().ProcessName, out bool isAppRunning);
 | |
|             if (isAppRunning == false)
 | |
|             {
 | |
|                 Environment.Exit(1);
 | |
|             }
 | |
| 
 | |
|             Application.EnableVisualStyles();
 | |
|             Application.SetCompatibleTextRenderingDefault(false);
 | |
|             Application.Run(new MainForm(args));
 | |
|         }
 | |
|     }
 | |
| }
 | 
