| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using GSG.NET.Logging;
- using GSG.NET.Utils;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace PLCLogger
- {
- static class Program
- {
- static Logger logger = Logger.GetLogger();
- /// <summary>
- /// 해당 애플리케이션의 주 진입점입니다.
- /// </summary>
- [STAThread]
- static void Main()
- {
- if (!ProcessUtils.IsOnlyOneInstance)
- {
- MessageBox.Show("{PLC Logger is running duplicate");
- return;
- }
- LogUtils.Configure("Config/log4net.xml", true);
- AppUtils.LogGlobalException();
- logger.I("{0} PLC Logger Started {0}", string.Empty.PadRight(40, '+'));
- try
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
- }
- catch (Exception e)
- {
- logger.E(e);
- }
- logger.I("{0} PLC Logger Stopped {0}", string.Empty.PadRight(40, '-'));
- }
- }
- }
|