日期:2014-05-18 浏览次数:21628 次
bool isAppRunning = false;
            System.Threading.Mutex mutex = new System.Threading.Mutex(
                true,
                System.Diagnostics.Process.GetCurrentProcess().ProcessName,
                out isAppRunning);
            if (!isAppRunning)
            {
                MessageBox.Show("本程序已经在运行了,请不要重复运行!");
                
                Environment.Exit(1);
            }