Exemple #1
0
        private void Main2_Load(object sender, EventArgs e)
        {
            pIssuePanel = new IssuePanel(Constants.LOGGER_SCREEN);
            metroPanel2.Controls.Add(pIssuePanel);

            pSearchPanel = new SearchPanel(Constants.LOGGER_SCREEN);
            metroPanel3.Controls.Add(pSearchPanel);

            pPreferencesPanel = new PreferencesPanel(Constants.LOGGER_SCREEN);
            metroPanel4.Controls.Add(pPreferencesPanel);

            pTrxnPanel = new TrxnPanel(Constants.LOGGER_SCREEN);
            metroPanel5.Controls.Add(pTrxnPanel);


            metroPanel2.Location = new Point(119, 40);
            metroPanel3.Location = new Point(119, 40);
            metroPanel4.Location = new Point(119, 40);
            metroPanel5.Location = new Point(119, 40);

            metroPanel2.Size = new Size(1235, 688);
            metroPanel3.Size = new Size(1235, 688);
            metroPanel4.Size = new Size(1235, 688);
            metroPanel5.Size = new Size(1235, 688);

            pIssuePanel.Size       = new Size(1235, 688);
            pSearchPanel.Size      = new Size(1235, 688);
            pPreferencesPanel.Size = new Size(1235, 688);
            pTrxnPanel.Size        = new Size(1235, 688);

            if (Constants.CLOSING_YN)
            {
                metroPanel2.Visible = false;
                metroPanel3.Visible = true;
                metroPanel4.Visible = false;
                metroPanel5.Visible = false;
            }
            else
            {
                metroPanel2.Visible = true;
                metroPanel3.Visible = false;
                metroPanel4.Visible = false;
                metroPanel5.Visible = false;
            }

            metroPanel2.Refresh();
            this.Activate();
            //backgroundWorker1.RunWorkerAsync();
            //단말기 초기 세팅 시 환경설정 화면으로 전환

            //Main2_SizeChanged(null,null);

            //최초생성시 좌표, 크기 조정여부 등록함. 화면별로 Manager 를 가진다.
            this.Size        = new Size(1360, 710);
            m_CtlSizeManager = new ControlManager(this);

            //종횡 늘림
            m_CtlSizeManager.addControlMove(metroPanel2, false, false, true, true);
            m_CtlSizeManager.addControlMove(metroPanel3, false, false, true, true);
            m_CtlSizeManager.addControlMove(metroPanel4, false, false, true, true);
            m_CtlSizeManager.addControlMove(metroPanel5, false, false, true, true);

            m_CtlSizeManager.addControlMove(pIssuePanel, false, false, true, true);
            m_CtlSizeManager.addControlMove(pSearchPanel, false, false, true, true);
            m_CtlSizeManager.addControlMove(pPreferencesPanel, false, false, true, true);
            m_CtlSizeManager.addControlMove(pTrxnPanel, false, false, true, true);

            //종늘림
            m_CtlSizeManager.addControlMove(TIL_LINE_1, false, false, false, true);
            m_CtlSizeManager.addControlMove(TIL_EMPTY_1, false, false, false, true);

            //종이동
            m_CtlSizeManager.addControlMove(TIL_USERNAME, false, true, false, false);
            m_CtlSizeManager.addControlMove(TIL_NETWORK, false, true, false, false);

            if (m_CtlSizeManager != null)
            {
                m_CtlSizeManager.MoveControls();
            }

            if (Constants.TML_ID.Equals(string.Empty))
            {
                MetroMessageBox.Show(this, Constants.getMessage("SYSTEM_INIT"), "SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TIL_PRE_Click(null, null);
            }
        }
        //public Boolean login()
        //{
        //    Boolean bRet = true;
        //    Login fLogin = new Login();
        //    fLogin.ShowDialog();
        //    string strTemp = fLogin.m_strID;
        //    string strTemp2 = fLogin.m_strPassword;
        //    fLogin = null;
        //    if (string.Empty.Equals(strTemp) || string.Empty.Equals(strTemp2))
        //    {
        //        bRet = false;
        //        return false;
        //    }
        //    else
        //    {
        //        Constants.USER_ID = strTemp;
        //        TIL_USERNAME.Text = strTemp ;
        //    }
        //    return bRet;
        //}

        private void Main2_Load(object sender, EventArgs e)
        {
            pIssuePanel = new IssuePanel(Constants.LOGGER_SCREEN);
            metroPanel2.Controls.Add(pIssuePanel);

            pSearchPanel = new SearchPanel(Constants.LOGGER_SCREEN);
            metroPanel3.Controls.Add(pSearchPanel);

            pPreferencesPanel = new PreferencesPanel(Constants.LOGGER_SCREEN);
            metroPanel4.Controls.Add(pPreferencesPanel);

            metroPanel2.Location = new Point(119, 43);
            metroPanel3.Location = new Point(119, 43);
            metroPanel4.Location = new Point(119, 43);

            metroPanel2.Size = new Size(900, 680);
            metroPanel3.Size = new Size(900, 680);
            metroPanel4.Size = new Size(900, 680);

            pIssuePanel.Size       = new Size(900, 680);
            pSearchPanel.Size      = new Size(900, 680);
            pPreferencesPanel.Size = new Size(900, 680);


            metroPanel2.Refresh();
            this.Activate();
            //backgroundWorker1.RunWorkerAsync();
            //단말기 초기 세팅 시 환경설정 화면으로 전환

            //Main2_SizeChanged(null,null);

            //최초생성시 좌표, 크기 조정여부 등록함. 화면별로 Manager 를 가진다.
            this.Size        = new Size(1024, 728);
            m_CtlSizeManager = new ControlManager(this);

            //종횡 늘림
            m_CtlSizeManager.addControlMove(metroPanel2, false, false, true, true);
            m_CtlSizeManager.addControlMove(metroPanel3, false, false, true, true);
            m_CtlSizeManager.addControlMove(metroPanel4, false, false, true, true);

            m_CtlSizeManager.addControlMove(pIssuePanel, false, false, true, true);
            m_CtlSizeManager.addControlMove(pSearchPanel, false, false, true, true);
            m_CtlSizeManager.addControlMove(pPreferencesPanel, false, false, true, true);

            //종늘림
            m_CtlSizeManager.addControlMove(TIL_LINE_1, false, false, false, true);
            m_CtlSizeManager.addControlMove(TIL_EMPTY_1, false, false, false, true);

            //종이동
            m_CtlSizeManager.addControlMove(TIL_USERNAME, false, true, false, false);
            m_CtlSizeManager.addControlMove(TIL_NETWORK, false, true, false, false);

            if (m_CtlSizeManager != null)
            {
                m_CtlSizeManager.MoveControls();
            }

            TIL_VER.Text = "ver." + Properties.Resources.appVer;

            //환경설정 안되어 있으면 설정
            if (Constants.TML_ID.Equals(string.Empty))
            {
                MetroMessageBox.Show(this, Constants.getMessage("SYSTEM_INIT"), "SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TIL_PRE_Click(null, null);
            }
            else
            {
                TIL_SHOP_NAME.Text = Constants.SHOP_NAME;
                TIL_ISSUE_Click(null, null);
                //if (Constants.TML_ID != null && !"".Equals(Constants.TML_ID))
                //{
                //    JObject sendObj = new JObject();
                //    sendObj.Add("tml_id", Constants.TML_ID);
                //    Transaction tran = new Transaction();
                //    JArray arrRet = tran.sendServer_arr(sendObj.ToString(), tran.url_TmlInfo);
                //    if (arrRet != null && arrRet.Count > 0)
                //    {
                //        TIL_SHOP_NAME.Text = arrRet[0]["shop_name"].ToString()+" ";
                //    }
                //}
            }
        }