using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace MeasureThread
{
    class ArgSend
    {
        private Measure m_measure;
        private SmartSEMControl.ISEMControl m_sem;
        ThreadStatusEventArgs mArg ;
        public ArgSend(Measure ms,SmartSEMControl.ISEMControl sem)
        {
            m_measure = ms;
            m_sem = sem;
            mArg = ms.GetArgs();
        }
        public void SendArgumentToScreen(string stepCode,string msg,string filepath="")
        {
            mArg.Picture_Information.Picture_FullPath = filepath;
            mArg.Picture_Information.Work_Status = "SEM";
            mArg.Picture_Information.Work_Voltage = m_sem.GetSEMVoltage();
            Thread.Sleep(200);
            mArg.Picture_Information.Magnification = m_sem.GetMagnification();
            Thread.Sleep(200);
            mArg.Picture_Information.Work_Distance = m_sem.GetWorkingDistance();
            Thread.Sleep(200);
            mArg.State = true;
            //mArg.Step_Code = stepCode;
            //mArg.Time = DateTime.Now;
            m_measure.SendMsg(stepCode);
           
        }

    }
}
