Пример #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            var server = new MainServer();

            server.InitConfig();
            server.CreateServer();

            var IsResult = server.Start();

            if (IsResult)
            {
                DevLog.Write(string.Format("서버 네트워크 시작"), LOG_LEVEL.INFO);
            }
            else
            {
                DevLog.Write(string.Format("[ERROR] 서버 네트워크 시작 실패"), LOG_LEVEL.ERROR);
                return;
            }

            workProcessTimer.Tick    += new EventHandler(OnProcessTimedEvent);
            workProcessTimer.Interval = new TimeSpan(0, 0, 0, 0, 32);
            workProcessTimer.Start();
        }
Пример #2
0
        public void Start()
        {
            var server = new MainServer();

            server.InitConfig();
            server.CreateServer();

            var IsResult = server.Start();

            if (IsResult)
            {
                DevLog.Write(string.Format("서버 네트워크 시작"), LOG_LEVEL.INFO);
            }
            else
            {
                DevLog.Write(string.Format("[ERROR] 서버 네트워크 시작 실패"), LOG_LEVEL.ERROR);
                return;
            }

            workProcessTimer           = new System.Timers.Timer(32);
            workProcessTimer.Elapsed  += OnProcessTimedEvent;
            workProcessTimer.AutoReset = true;
            workProcessTimer.Enabled   = true;
        }