//判断程序是否在运行
//获取欲启动进程名
string strProcessName;
strProcessName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
获取版本号
//CommonData.VersionNumber = Application.ProductVersion;
//检查进程是否已经启动,已经启动则显示报错信息退出程序。
if (System.Diagnostics.Process.GetProcessesByName(strProcessName).Length > 1)
{
// MessageBox.Show(CommonData.MSG_00009_000, UserMaintenance.LOGIN_TITLE, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
Console.WriteLine("程序已经开始运行");
return;
}