using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using AR;
using arDev;
using COMM;

namespace vmsnet
{
    public partial class FMain
    {
        private void SM_StateProgress(object sender, StateMachine.StateProgressEventArgs e)
        {

        }

        private void SM_StepCompleted(object sender, EventArgs e)
        {
            PUB.log.Add($"Step Complete({PUB.sm.Step})");

            //초기화가 완료되면 컨트롤 글자를 변경 해준다.
            if (PUB.sm.Step == ESMStep.INIT)
                SM_InitControl(null, null);

        }

        private void SM_StepStarted(object sender, EventArgs e)
        {
            switch (PUB.sm.Step)
            {
                case ESMStep.IDLE:

                    break;
            }

        }

        private void SM_InitControl(object sender, EventArgs e)
        {
            //작업시작전 컨트롤 초기화 코드
            this.Invoke(new Action(() =>
            {

           
            }));
        }

        private void SM_Message(object sender, StateMachine.StateMachineMessageEventArgs e)
        {
            //상태머신에서 발생한 메세지
            PUB.log.Add(e.Header, e.Message);
        }

        private void SM_StepChanged(object sender, StateMachine.StepChangeEventArgs e)
        {
            var o = (ESMStep)e.Old;
            var n = (ESMStep)e.New;
            PUB.log.AddI($"step change ({o} >> {n})");
        }
    }
}
