using System;
using System.Collections;
using System.Drawing;
using System.Windows.Forms;

using Cosmos.BaseFrame;
using Cosmos.UserFrame;
using Cosmos.ServiceProvider;
using Cosmos.Common;
using Cosmos.CommonManager;

namespace Cosmos.Win
{
    public partial class frmBizMain : Form
    {
        #region 변수 선언
        private SManager sManager = new SManager();                                 // 이 객체를 통해 업무 Service 호출
        private StateServer StateObject = (StateServer)StateServer.GetInstance();   // StateObject : StateServer Object (객체)
        private PosStatus m_cPosStatus = new PosStatus();                           // 기본정보 참조
        private TranStatus m_cTrnStatus = new TranStatus();                         // 거래정보 참조
        private DeviceStatus m_cDevStatus = new DeviceStatus();                     // 디바이스 관리

        private Hashtable m_htTitleControls;                                        // 메뉴버튼 컨트롤 정보
        private Hashtable m_htMenuControls;                                         // 메뉴버튼 컨트롤 정보
        private ArrayList m_alMenuHead = new ArrayList();                           // 메뉴타이틀정의 배열
        private ArrayList m_alMenuProc = new ArrayList();                           // 메뉴정의 배열

        private string m_sPosMenuKeyIn;
        public string PosMenuKeyIn { set { m_sPosMenuKeyIn = value; } get { return m_sPosMenuKeyIn; } }
        private string m_sPosMenuKeyOut;
        public string PosMenuKeyOut { set { m_sPosMenuKeyOut = value; } get { return m_sPosMenuKeyOut; } }

        /// <summary>
        /// 메뉴상단표시위치
        /// </summary>
        private int m_nTopPos = 0;


        //private readonly Color m_clrSelectFont = Color.FromArgb(255, 255, 255);
        //private readonly Color m_clrSelectback = Color.FromArgb(109, 110, 113);

        //private readonly Color m_clrNonSelectFont = Color.FromArgb(109, 110, 113);
        //private readonly Color m_clrNonSelectback = Color.FromArgb(255, 255, 255);

        private string m_TagImgFileName = "TagImg_{0}_0{1}.png";                    // 이미지 파일 이름

        #endregion

        #region 폼 초기화 처리

        public frmBizMain()
        {
            InitializeComponent();

            base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw, true);
            //this.UpdateStyles();

            m_cPosStatus = (PosStatus)StateObject.POS;
            m_cTrnStatus = (TranStatus)StateObject.TRAN;
            m_cDevStatus = (DeviceStatus)StateObject.DEVICE;

            LoadMenuList();
            GetBtnImg();    //버튼 이미지 로드!

        }

        private void frmBizMain_Load(object sender, EventArgs e)
        {
            UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "");
        
            // 콘트롤 초기화 처리
            InitControl();
        }

        private void frmBizMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", lblTitle.Text);
        }

        /// <summary>
        /// 폼 컨트롤 초기화
        /// </summary>
        private void InitControl()
        {
            try
            {
                //this.SuspendLayout();

                if (m_cPosStatus.Sale.ScreenSizeUser == 1024)
                {
                    // 이미지 로딩 처리
                    picBack.Image = ImageManager.GetImage(BaseCom.NxImgPath, ImageManager.POP_FULL_SIZE);
                    //this.Size = new Size(1024, 696);
                    //this.Location = new Point(0, 50);
                    FormManager.SetControlSize(picBack, 0, 0, 1024, 696);
                    FormManager.SetControlSize(this, 0, 50, picBack.Size.Width, picBack.Size.Height);

                    FormManager.SetControlSize(this.lblTitle, 16, 1, 950, 50);
                    FormManager.SetControlSize(this.btnExit, 965, 1, 58, 50);
                    FormManager.SetControlSize(this.btnMenu15, 735, 575, 240, 60);
                    FormManager.SetControlSize(this.btnMenu10, 393, 575, 240, 60);
                    FormManager.SetControlSize(this.btnMenu05, 50, 575, 240, 60);
                    FormManager.SetControlSize(this.btnMenu14, 735, 508, 240, 60);
                    FormManager.SetControlSize(this.btnMenu09, 393, 508, 240, 60);
                    FormManager.SetControlSize(this.btnMenu04, 50, 508, 240, 60);
                    FormManager.SetControlSize(this.btnMenu13, 735, 441, 240, 60);
                    FormManager.SetControlSize(this.btnMenu08, 393, 441, 240, 60);
                    FormManager.SetControlSize(this.btnMenu03, 50, 441, 240, 60);
                    FormManager.SetControlSize(this.btnMenu12, 735, 374, 240, 60);
                    FormManager.SetControlSize(this.btnMenu07, 393, 374, 240, 60);
                    FormManager.SetControlSize(this.btnMenu02, 50, 374, 240, 60);
                    FormManager.SetControlSize(this.btnMenu11, 735, 307, 240, 60);
                    FormManager.SetControlSize(this.btnMenu06, 393, 307, 240, 60);
                    FormManager.SetControlSize(this.btnMenu01, 50, 307, 240, 60);
                    FormManager.SetControlSize(this.picTabImg1, 128, 89, 84, 86);
                    FormManager.SetControlSize(this.picTabImg2, 471, 89, 84, 86);
                    FormManager.SetControlSize(this.picTabImg3, 813, 89, 84, 86);
                    FormManager.SetControlSize(this.lblTitletxt1, 51, 206, 239, 27);
                    FormManager.SetControlSize(this.lblTitletxt2, 394, 206, 239, 27);
                    FormManager.SetControlSize(this.lblTitletxt3, 736, 206, 239, 27);
                    FormManager.SetControlSize(this.lblTitletxtDtl1, 51, 233, 239, 63);
                    FormManager.SetControlSize(this.lblTitletxtDtl2, 392, 233, 242, 63);
                    FormManager.SetControlSize(this.lblTitletxtDtl3, 734, 233, 243, 63);
                    FormManager.SetControlSize(this.lblLine1, 339, 51, 4, 645);
                    FormManager.SetControlSize(this.lblLine2, 682, 51, 4, 645);
                }
                else
                {
                    // 이미지 로딩 처리
                    picBack.Image = ImageManager.GetImage(BaseCom.NxImgPath, ImageManager.POP_SIZE_800X600);
                    FormManager.SetControlSize(picBack, 0, 0, 800, 600);
                    FormManager.SetControlSize(this, 0, 0, picBack.Size.Width, picBack.Size.Height);

                    FormManager.SetControlSize(this.lblTitle, 16, 1, 728, 50);
                    FormManager.SetControlSize(this.btnExit, 741, 1, 58, 50);
                    FormManager.SetControlSize(this.btnMenu15, 545, 528, 240, 60);
                    FormManager.SetControlSize(this.btnMenu10, 280, 528, 240, 60);
                    FormManager.SetControlSize(this.btnMenu05, 15, 528, 240, 60);
                    FormManager.SetControlSize(this.btnMenu14, 545, 463, 240, 60);
                    FormManager.SetControlSize(this.btnMenu09, 280, 463, 240, 60);
                    FormManager.SetControlSize(this.btnMenu04, 15, 463, 240, 60);
                    FormManager.SetControlSize(this.btnMenu13, 545, 398, 240, 60);
                    FormManager.SetControlSize(this.btnMenu08, 280, 398, 240, 60);
                    FormManager.SetControlSize(this.btnMenu03, 15, 398, 240, 60);
                    FormManager.SetControlSize(this.btnMenu12, 545, 333, 240, 60);
                    FormManager.SetControlSize(this.btnMenu07, 280, 333, 240, 60);
                    FormManager.SetControlSize(this.btnMenu02, 15, 333, 240, 60);
                    FormManager.SetControlSize(this.btnMenu11, 545, 268, 240, 60);
                    FormManager.SetControlSize(this.btnMenu06, 280, 268, 240, 60);
                    FormManager.SetControlSize(this.btnMenu01, 15, 268, 240, 60);
                    FormManager.SetControlSize(this.picTabImg1, 93, 63, 84, 86);
                    FormManager.SetControlSize(this.picTabImg2, 358, 63, 84, 86);
                    FormManager.SetControlSize(this.picTabImg3, 623, 63, 84, 86);
                    FormManager.SetControlSize(this.lblTitletxt1, 16, 170, 239, 27);
                    FormManager.SetControlSize(this.lblTitletxt2, 281, 170, 239, 27);
                    FormManager.SetControlSize(this.lblTitletxt3, 546, 170, 239, 27);
                    FormManager.SetControlSize(this.lblTitletxtDtl1, 16, 197, 239, 63);
                    FormManager.SetControlSize(this.lblTitletxtDtl2, 279, 197, 242, 63);
                    FormManager.SetControlSize(this.lblTitletxtDtl3, 544, 197, 243, 63);
                    FormManager.SetControlSize(this.lblLine1, 266, 51, 4, 543);
                    FormManager.SetControlSize(this.lblLine2, 529, 51, 4, 543);
                }

                //picBack.Image = ImageManager.GetImage(BaseCom.NxImgPath, ImageManager.POP_FULL_SIZE);

                FormManager.MovePopUpForm(this, false, m_cPosStatus.Sale.ScreenSizeUser);
                FormManager.SetFormAllControlFont(this, m_cPosStatus.Base.FONT);

                GetTagImg();    //태그 이미지 로드!

                if (m_sPosMenuKeyIn == PosKey.MENU_KEY.POS_CLOSE)       //입출금
                {
                    lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0003);
                    lblTitletxt1.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0085);
                    lblTitletxt2.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0798);
                    lblTitletxt3.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0089);

                    lblTitletxtDtl1.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0466);
                    lblTitletxtDtl2.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0467);
                    lblTitletxtDtl3.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0468);

                }
                else if (m_sPosMenuKeyIn == PosKey.MENU_KEY.POS_SETTING) //관리
                {
                    lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0005);
                    lblTitletxt1.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0799);
                    lblTitletxt2.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0800);
                    lblTitletxt3.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0801);

                    lblTitletxtDtl1.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0469);
                    lblTitletxtDtl2.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0470);
                    lblTitletxtDtl3.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0471);
                }
                else if (m_sPosMenuKeyIn == PosKey.MENU_KEY.POS_SEARCH)  //조회
                {
                    lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0004);
                    lblTitletxt1.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0802);
                    lblTitletxt2.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0803);
                    lblTitletxt3.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0804);

                    lblTitletxtDtl1.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0472);
                    lblTitletxtDtl2.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0473);
                    lblTitletxtDtl3.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0474);
                }
                else if (m_sPosMenuKeyIn == PosKey.MENU_KEY.POS_ETC)     //기타
                {
                    lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0007);
                    lblTitletxt1.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0805);
                    lblTitletxt2.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0806);
                    lblTitletxt3.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0321);

                    lblTitletxtDtl1.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0475);
                    lblTitletxtDtl2.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0476);
                    lblTitletxtDtl3.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0477);
                }
                else if (m_sPosMenuKeyIn == PosKey.MENU_KEY.POS_EDU)     //교육
                {
                    lblTitle.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0458);
                    lblTitletxt1.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0006);
                    lblTitletxt2.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0808); 
                    lblTitletxt3.Text = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0458);

                    lblTitletxtDtl1.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0479);
                    lblTitletxtDtl2.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0478);
                    lblTitletxtDtl3.Text = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0480);
                }

                m_nTopPos = 0;
                MenuDisplay();      //화면에 메뉴 표시
            }
            catch (Exception ex)
            {
                WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
            }
            finally
            {
                //this.ResumeLayout(false);
            }
        }

        /// <summary>
        /// 태크 이미지 로드
        /// </summary>
        private void GetTagImg()
        {
            try
            {
                string sTmpImg = "";
                //bool bImg = false;

                for (int iRow = 1; iRow <= 3; iRow++)
                {
                    sTmpImg = string.Format(m_TagImgFileName, m_sPosMenuKeyIn, iRow);

                    string sPicName = "picTabImg" + iRow.ToString();

                    #region (주석)
                    //if (sTmpImg == "" || System.IO.File.Exists(BaseCom.NxImgPath + sTmpImg) == false)
                    //{
                    //    bImg = false;
                    //}
                    //else
                    //{
                    //    bImg = true;
                    //}

                    //foreach (Control c in this.Controls)
                    //{
                    //    if (c is Cosmos.UI.CsmPictureBox)
                    //    {
                    //        if (c.Name == sPicName)
                    //        {
                    //            if (bImg == true)
                    //            {
                    //                ((Cosmos.UI.CsmPictureBox)c).Image = CmUtil.LoadImage(BaseCom.NxImgPath + sTmpImg);
                    //            }
                    //            else
                    //            {
                    //                ((Cosmos.UI.CsmPictureBox)c).Image = null;
                    //            }
                    //            break;
                    //        }
                    //    }
                    //} 
                    #endregion

                    Control[] ctrls = this.Controls.Find(sPicName, false);
                    if (ctrls != null && ctrls[0] is Cosmos.UI.CsmPictureBox)
                    {
                        ((Cosmos.UI.CsmPictureBox)ctrls[0]).Image = CmUtil.LoadImage(BaseCom.NxImgPath + sTmpImg);
                    }
                }
            }
            catch (Exception ex)
            {
                WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
            }
        }

        /// <summary>
        /// 버튼이미지 로드
        /// </summary>
        private void GetBtnImg()
        {
            try
            {
                for (int iRow = 1; iRow <= 15; iRow++)
                {
                    string sPicName = "btnMenu" + iRow.ToString().PadLeft(2, '0');

                    foreach (Control c in this.Controls)
                    {
                        if (c is Cosmos.UI.CsmButton)
                        {
                            if (c.Name == sPicName)
                            {
                                if (iRow <= 5)
                                {
                                    ((Cosmos.UI.CsmButton)c).DefaultImage = CmUtil.LoadImage(BaseCom.NxImgPath + ImageManager.MENU_BTN_BLUE_BASIC);
                                    ((Cosmos.UI.CsmButton)c).ClickImage = CmUtil.LoadImage(BaseCom.NxImgPath + ImageManager.MENU_BTN_BLUE_PRESS);
                                }
                                else if (iRow <= 10)
                                {
                                    ((Cosmos.UI.CsmButton)c).DefaultImage = CmUtil.LoadImage(BaseCom.NxImgPath + ImageManager.MENU_BTN_ORANGE_BASIC);
                                    ((Cosmos.UI.CsmButton)c).ClickImage = CmUtil.LoadImage(BaseCom.NxImgPath + ImageManager.MENU_BTN_ORANGE_PRESS);
                                }
                                else //if (iRow <= 15)
                                {
                                    ((Cosmos.UI.CsmButton)c).DefaultImage = CmUtil.LoadImage(BaseCom.NxImgPath + ImageManager.MENU_BTN_GREEN_BASIC);
                                    ((Cosmos.UI.CsmButton)c).ClickImage = CmUtil.LoadImage(BaseCom.NxImgPath + ImageManager.MENU_BTN_GREEN_PRESS);
                                }
                                break;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
            }
        }


        #endregion

        #region 화면에 메뉴 표시
        /// <summary>
        /// 화면에 메뉴 표시
        /// </summary>
        private void MenuDisplay()
        {
            try
            {
                // 메뉴 상세 초기화
                foreach (object obj in m_htMenuControls.Values)
                {
                    Cosmos.UI.CsmButton btnCtl = (Cosmos.UI.CsmButton)obj;
                    btnCtl.Text = "";
                    btnCtl.Tag = "";
                    btnCtl.Visible = false;
                }

                //0:메뉴항목, 1:위치, 2:표시텍스트, 3:기능키값
                foreach (string[] aMenu in m_alMenuProc)
                {
                    if (aMenu[0] == PosMenuKeyIn)
                    {
                        int nMax = m_htMenuControls.Count;

                        int nPos = int.Parse(aMenu[1]);      // 표시위치
                        if (nPos > m_nTopPos && nPos <= m_nTopPos + nMax)
                        {
                            if (aMenu[2] != "")
                            {
                                Cosmos.UI.CsmButton btnCtl = (Cosmos.UI.CsmButton)m_htMenuControls[(nPos - 1) % nMax];

                                btnCtl.Text = aMenu[2];
                                btnCtl.Tag = aMenu[3];
                                btnCtl.Visible = true;

                                //2018.01.10;미주에서는 아래 메뉴 감춤 ;girak.kim;Start
                               if ( m_cPosStatus.Base.CmpCd.ToUpper().Equals(PosConst.POS_COMPANY_CODE.PCUS))
                               {
                                   if (aMenu[1].Equals("05") || aMenu[1].Equals("07")) btnCtl.Visible = false;
                               }
                                //2018.01.10;미주에서는 아래 메뉴 감춤 ;girak.kim;End
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
            }
        }
        #endregion

        #region 메뉴 버튼 로딩
        // 메뉴리스트 로딩
        private void LoadMenuList()
        {
            try
            {
                //입출금
                m_alMenuHead.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0003) });

                //--좌측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "01", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0085), PosKey.MENU_KEY.REMONEY_AMT });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "02", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "03", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "04", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "05", "", "" });
                //--중간라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "06", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0087), PosKey.MENU_KEY.ETC_DPST_WTHDR });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "07", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "08", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "09", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "10", "", "" });
                //--우측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0503), PosKey.MENU_KEY.SALE_CLOSE });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0512), PosKey.MENU_KEY.POS_CLOSE_CANCEL });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "13", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "14", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_CLOSE, "15", "", "" });

                //관리
                m_alMenuHead.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0005) });
                //--좌측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "01", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0317), PosKey.MENU_KEY.ENVIRONMENT_SETTING });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "02", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0314), PosKey.MENU_KEY.OPTION_SETTING });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "03", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0321), PosKey.MENU_KEY.ETC_SETTING });
                //--우측라인
                if (m_cDevStatus.ICReader.UseYn == true)     // 여신전문금융업법 적용여부 체크
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "04", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0573), PosKey.MENU_KEY.POS_CERTIFY_INTEGRITY });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "04", "", "" });
                }
                if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.KR && (m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.PC || m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.BR))
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "05", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0334), PosKey.MENU_KEY.TMONEY_START });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "05", "", "" });
                }

                //--중간라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "06", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0313), PosKey.MENU_KEY.PGM_DOWNLOAD });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "07", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0444), PosKey.MENU_KEY.TRANLOG_DOWNLOAD });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "08", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0596), PosKey.MENU_KEY.TRAN_RESEND });



                //#20180322 휴게소pos매출연동 start,phj
                //기존
                //if (m_cPosStatus.Mst.ETC_IF_DIV == ItemConst.TranInterfaceOutside.IF_KOR_01)
                //변경
                if (m_cPosStatus.Mst.ETC_IF_DIV == ItemConst.TranInterfaceOutside.IF_KOR_01 || m_cPosStatus.Mst.ETC_IF_DIV == ItemConst.TranInterfaceOutside.IF_KOR_03)
                    //#20180322 휴게소pos매출연동 end,phj

                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "09", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0874), PosKey.MENU_KEY.EX_RESEND_SALE });
                else
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "09", "", "" });

                if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.KR)
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "10", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0529), PosKey.MENU_KEY.SIGNPAD_UPDATE });
                else
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "10", "", "" });
                                                
                
                //--우측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0336), PosKey.MENU_KEY.REG_GRP_MENU_CHNG });

                if (m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.BR && m_cPosStatus.Base.BrandCd == PosConst.MST_BRAND_CODE.BR_BR)
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0339), PosKey.MENU_KEY.REG_FLOVOR });
                else
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "12", "", "" });
                
                if (CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT040), "0") == "1")
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "13", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0335), PosKey.MENU_KEY.REG_EXCHG_RATE });
                else
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "13", "", "" });

                //#13753 POS MOT음성 기능 추가 개발요청 start,phj
                //기존
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "14", "", "" });

                //변경
                //#20180214 마스터 수신 시 포스에서 설정한 MOT 값 변경안되도록 수정  start,phj
                // 기존
                /*
                if (m_cPosStatus.Mst.DrtFrcsDiv == "10" &&  // PCKR 이고 직영점일 때 
                    m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.KR &&
                    m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.PC)
                */ 
                // 변경
                if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.KR && m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.PC
                    //#13753 POS MOT음성 기능 추가 개발요청 - 20180222 음성MOT 옵션처리 start,phj
                    && PosMstManager.GetPosOption(POS_OPTION.OPT331) == "1")
                    //#13753 POS MOT음성 기능 추가 개발요청 - 20180222 음성MOT 옵션처리 end,phj
                //#20180214 마스터 수신 시 포스에서 설정한 MOT 값 변경안되도록 수정  end,phj

                    //음성MOT 설정
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "14", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1094), PosKey.MENU_KEY.SOUND_MOT_SETTING_FORM });
                else
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "14", "", "" });
                //#13753 POS MOT음성 기능 추가 개발요청 end,phj

                
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "15", "", "" });


                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "01", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0311), PosKey.MENU_KEY.KITHEN_PRINTER_SETTING });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "08", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0492), PosKey.MENU_KEY.PRINT_INIT });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "10", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0315), PosKey.MENU_KEY.BILL_SETTING });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0316), PosKey.MENU_KEY.DEVICE_SETTING });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "13", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0318), PosKey.MENU_KEY.SEND_RECV_SETTING });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "14", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0319), PosKey.MENU_KEY.DISPLAY_SETTING });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "15", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0320), PosKey.MENU_KEY.SHPNG_MALL_SETTING });
                ///m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SETTING, "17", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0572), PosKey.MENU_KEY.POS_CERTIFY_KEYDOWNLOAD });

                //조회
                m_alMenuHead.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0004) });
                //--좌측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "01", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0322), PosKey.MENU_KEY.SALES_REPORT });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "02", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0323), PosKey.MENU_KEY.DATA_SEARCH });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "03", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0534), PosKey.MENU_KEY.SALE_EMP_SEARCH });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "04", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0443), PosKey.MENU_KEY.RETURN_COMPANY });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "05", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0325), PosKey.MENU_KEY.WEB_SCH_APPROVAL });
                
                //--중간라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "06", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0324), PosKey.MENU_KEY.RECEIPT_REPRINT });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "07", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0876), PosKey.MENU_KEY.HP_RATE_REPORT });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "08", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0589), PosKey.MENU_KEY.PREP_STOR_NOTICE });
                if (m_cPosStatus.Base.PosType == PosConst.POS_TYPE.DEFERRED_PAYMENT)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "09", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0481), PosKey.MENU_KEY.SCH_KTCH_ORDER });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "09", "", "" });
                }

                if (m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.PC)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "10", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0965), PosKey.MENU_KEY.STORE_EQUIP_CHECK_LIST });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "10", "", "" });
                }
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "10", "", "" });

                //--우측라인
                if (m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.PC)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0382), PosKey.MENU_KEY.SCH_EVT });
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0326), PosKey.MENU_KEY.SHIPMENT_SEARCH });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "11", "", "" });
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "12", "", "" });
                }
                                
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "13", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "14", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "15", "", "" });


                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0604), PosKey.MENU_KEY.REMB_ORDER_PRINT });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "13", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0588), PosKey.MENU_KEY.POS_LOG_SEARCH });
                


                //if (m_cPosStatus.Base.CmpCd == ItemConst.COMPANY_CODE.PCKR || m_cPosStatus.Base.CmpCd == ItemConst.COMPANY_CODE.SLKR)
                //{
                //    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "14", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0454), PosKey.MENU_KEY.STOR_ARRV_INFO });
                    
                //}
                //else
                //{
                    //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "14", "", "" });
                    //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "15", "", "" });
                //}

                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "07", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0331), PosKey.MENU_KEY.ALIPAY_SEARCH });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "07", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0328), PosKey.MENU_KEY.CASHBILL_REPORT });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "08", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0329), PosKey.MENU_KEY.DPST_WTHDR_SEARCH });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0330), PosKey.MENU_KEY.SHPNG_MALL_SEARCH });
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_SEARCH, "19", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0743), PosKey.MENU_KEY.STORE_CHECK_LIST });

                //기타
                m_alMenuHead.Add(new string[] { PosKey.MENU_KEY.POS_ETC, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0007) });
                //--좌측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "01", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0333), PosKey.MENU_KEY.REG_IN_OUT });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "02", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0343), PosKey.MENU_KEY.CUSTOMER_CLAIMS_LIST });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "03", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0337), PosKey.MENU_KEY.REG_EMP_IN });

                if (m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.BR)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "04", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0341), PosKey.MENU_KEY.VISIT_GOVERNMENT_OFFICE });
                }
                else if (m_cPosStatus.Mst.CorpDiv == ItemConst.CORP_DIV.PC)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "04", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0338), PosKey.MENU_KEY.REG_PVC });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "04", "", "" });
                }

                //#15897 요청)점포생산제품 바코드 출력기능 수정요청 start
                //기존
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "05", "", "" });
                //변경
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "05", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1164), PosKey.MENU_KEY.SRM_LABELPRT });
                //#15897 요청)점포생산제품 바코드 출력기능 수정요청 end
                
                
                //--중간라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "06", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0344), PosKey.MENU_KEY.POS_ETC_RECEIPT });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "07", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0340), PosKey.MENU_KEY.SAL_CALC });
                if (m_cDevStatus.LabelPrinter.UseYn == true)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "08", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0509), PosKey.MENU_KEY.BARCODE_PRINT });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "08", "", "" });
                }
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "09", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0893), PosKey.MENU_KEY.LOG_VIEWER });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "10", "", "" });
                
                
                //--우측라인
                //m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0332), PosKey.MENU_KEY.REG_BOOKMK });
                //#Rhee, 20180103 미주는 메뉴키 안보이게 처리 start
                // 기존
                // m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0845), PosKey.MENU_KEY.HAPPY_KOK });
                // 변경
                if (!m_cPosStatus.Base.CmpCd.Equals("PCUS")) 
                { 
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0845), PosKey.MENU_KEY.HAPPY_KOK });
                }
                //#Rhee, 20180103 미주는 메뉴키 안보이게 처리 End
                if (m_cPosStatus.Base.PosType == PosConst.POS_TYPE.DEFERRED_PAYMENT)
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0342), PosKey.MENU_KEY.REG_TABLE });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "12", "", "" });
                }
                //#Rhee, 20180103 미주는 메뉴키 안보이게 처리 start
                // 기존
                //if (PosMstManager.GetPosOption(POS_OPTION.OPT506) == "1")
                // 변경
                if ((PosMstManager.GetPosOption(POS_OPTION.OPT506) == "1") && (!m_cPosStatus.Base.CmpCd.Equals("PCUS")) )
                //#Rhee, 20180103 미주는 메뉴키 안보이게 처리 End
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "13", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0312), PosKey.MENU_KEY.KITHEN_PRINTER_CHECK });
                }
                else
                {
                    m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "13", "", "" });
                }

                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "14", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_ETC, "15", "", "" });
                

                //교육
                m_alMenuHead.Add(new string[] { PosKey.MENU_KEY.POS_EDU, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0458) });
                //--좌측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "01", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0006), PosKey.MENU_KEY.POS_TRAINING });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "02", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "03", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "04", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "05", "", "" });

                //--중간라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "06", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0477), PosKey.MENU_KEY.TEST_PLU_SEARCH_NEW });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "07", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0476), PosKey.MENU_KEY.TEST_PLU_SEARCH_ALL });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "08", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0460), PosKey.MENU_KEY.TEST_MODE_PLU_ALL });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "09", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0461), PosKey.MENU_KEY.TEST_MODE_PLU_NEW });                
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "10", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0473), PosKey.MENU_KEY.TEST_MODE_PLU_SEARCH });

                //--우측라인
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "11", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0243), PosKey.MENU_KEY.TEST_MODE });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "12", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0456), PosKey.MENU_KEY.TEST_MODE_SEARCH });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "13", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "14", "", "" });
                m_alMenuProc.Add(new string[] { PosKey.MENU_KEY.POS_EDU, "15", "", "" });
                

                //m_htTitleControls = new Hashtable();
                //m_htTitleControls.Add(m_htTitleControls.Count, btnTitle01);
                //m_htTitleControls.Add(m_htTitleControls.Count, btnTitle02);
                //m_htTitleControls.Add(m_htTitleControls.Count, btnTitle03);
                //m_htTitleControls.Add(m_htTitleControls.Count, btnTitle04);
                //m_htTitleControls.Add(m_htTitleControls.Count, btnTitle05);


                #region 메뉴버튼

                // 메뉴버튼 
                m_htMenuControls = new Hashtable();
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu01);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu02);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu03);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu04);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu05);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu06);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu07);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu08);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu09);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu10);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu11);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu12);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu13);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu14);
                m_htMenuControls.Add(m_htMenuControls.Count, btnMenu15);

                #endregion
            }
            catch (Exception ex)
            {
                WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
            }
        }
        #endregion

        #region 메뉴 버튼 입력 처리
        private void btnExit_Click(object sender, EventArgs e)
        {
            //this.DialogResult = DialogResult.OK;
            this.Close();
        }

        /// <summary>
        /// 메뉴 버튼 입력 처리
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnProc_Click(object sender, EventArgs e)
        {
            try
            {
                if (((Cosmos.UI.CsmButton)sender).Tag.ToString() != "")
                {
                    UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ((Cosmos.UI.CsmButton)sender).Text.ToString());

                    PosMenuKeyOut = ((Cosmos.UI.CsmButton)sender).Tag.ToString();


                    // 테이블셋팅    -> 설계구조상 이러면 안되지만... 
                    if (PosMenuKeyOut == PosKey.MENU_KEY.REG_TABLE)
                    {
                        string filePath = BaseCom.NxBinPath + "TableConfiguration.exe";
                        if (CmUtil.Exists(filePath))
                        {
                            CmUtil.ExecuteWaitProcess(filePath, m_cPosStatus.Base.CashierNo);
                        }
                        else
                        {
                            WinManager.ErrorMessage("File Not Found!");
                        }
                        PosMenuKeyOut = string.Empty;
                        return;
                    }

                    //if (PosMenuKeyOut == PosKey.MENU_KEY.POS_TRAINING)  //연습모드
                    //{
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                    //}
                    //else
                    //{
                    //    WinSale.ExecuteBinessRun(PosMenuKeyOut);
                    //}
                }

            }
            catch (Exception ex)
            {
                WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
                    System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
            }
        }

        #endregion


    }
}
