52a237172ce33818a8d1809c51235995f186beef.svn-base 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Windows.Forms;
  5. using System.Threading;
  6. namespace IControls_FireManager
  7. {
  8. static class Program
  9. {
  10. /// <summary>
  11. /// 해당 응용 프로그램의 주 진입점입니다.
  12. /// </summary>
  13. [STAThread]
  14. static void Main()
  15. {
  16. //try
  17. //{
  18. //// 수신기 UI 혹은 통신데몬이 사용중이라면 사용불가
  19. //if (_Diagnostics.Process_Excute("FPER") == true || _Diagnostics.Process_Excute("CommDaemon") == true)
  20. //{
  21. // _Popup.MessageBoxPopup(0, _Text.ProgramEtcNot, _Text.OK);
  22. //}
  23. //// IB Console 실행중에는 사용불가
  24. //else if(_Diagnostics.Process_Excute("IBConsole") == true)
  25. //{
  26. // _Popup.MessageBoxPopup(0, _Text.IBConsoleNot, _Text.OK);
  27. //}
  28. //// Fire Bird 가 실행하지 못하면 사용불가
  29. if (_Diagnostics.Process_Excute("fbserver") == false || _Diagnostics.Process_Excute("fbguard") == false)
  30. {
  31. _Popup.MessageBoxPopup(0, _Text.FirebirdNot, _Text.OK);
  32. }
  33. else
  34. {
  35. // 파일 엑세스
  36. if (_File.Read_ProgramConfiguration() == true)
  37. {
  38. bool createdNew;
  39. Mutex dup = new Mutex(true, "IControls_FireManager_Ver3", out createdNew);
  40. // 프로그램 뮤텍스
  41. if (createdNew)
  42. {
  43. Application.EnableVisualStyles();
  44. Application.SetCompatibleTextRenderingDefault(false);
  45. Application.Run(new IControls_FireManager());
  46. dup.ReleaseMutex();
  47. }
  48. else
  49. _Popup.MessageBoxPopup(0, _Text.ProgramCloseSame, _Text.OK);
  50. }
  51. else
  52. _Popup.MessageBoxPopup(0, _Text.GetDamagedConfigFile, _Text.OK);
  53. }
  54. //}
  55. //catch
  56. //{
  57. //}
  58. }
  59. }
  60. }