using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Windows.Forms; namespace IOM_cs { static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { #region 检测当前程序是否重复运行 System.Diagnostics.Process[] myprocess = System.Diagnostics.Process.GetProcessesByName("IrisCollect"); if (myprocess.Length > 1) { MessageBox.Show("虹膜离线采集系统正在运行!"); return; } #endregion try { // Process p = new Process(); // p.StartInfo.FileName = @"E:/work/虹膜采集对接/collectHT/ICS/bin/Debug/ICS.exe"; // p.StartInfo.Arguments = "code id name c:\\casic";//参数以空格分隔,如果某个参数为空,可以传入"" // p.Start(); // while (!p.HasExited) // { // p.WaitForExit(); // } // //正常运行结束放回代码为0 // //if (p.ExitCode != 0) // { // MessageBox.Show("result = " + p.ExitCode); // return; // } // //else // { // //output = p.StandardOutput.ReadToEnd(); // } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new FormLogin()); } catch(Exception e) { MessageBox.Show(e.Message); } } } }