Exemple #1
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 폼 변경
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public void SetChangeForm(CDefine.FormViewConfig eForm)
        {
            var pDocument = CDocument.GetDocument;

            do
            {
                // 현재 폼이 이전 폼과 같으면 건너뜀
                if (m_eCurrentForm == eForm)
                {
                    break;
                }
                // 현재 폼 Invisible
                if (CDefine.FormViewConfig.FORM_VIEW_CONFIG_FINAL != m_eCurrentForm)
                {
                    m_stForm[( int )m_eCurrentForm].m_IForm.SetVisible(false);
                    m_stForm[( int )m_eCurrentForm].m_IForm.SetTimer(false);
                }

                // 생성이 되어 있지 않으면 생성
                if (null == m_stForm[( int )eForm].m_IForm)
                {
                    switch (eForm)
                    {
                    case CDefine.FormViewConfig.FORM_VIEW_CONFIG_OPTION:
                        m_stForm[( int )eForm] = new structureForm(new CFormConfigOption() as CFormInterface);
                        break;

                    case CDefine.FormViewConfig.FORM_VIEW_CONFIG_RECIPE:
                        m_stForm[( int )eForm] = new structureForm(new CFormConfigRecipe() as CFormInterface);
                        break;

                    default:
                        break;
                    }
                    // 패널에 생성된 화면 붙임
                    SetFormDockStyle(m_stForm[( int )eForm].m_objForm, this.panelFormView);
                    m_stForm[( int )eForm].m_IForm.SetVisible(true);
                    m_stForm[( int )eForm].m_IForm.SetTimer(true);
                    m_stForm[( int )eForm].m_IForm.SetChangeLanguage();
                }
                // 생성 되어 있으면 Visible
                else
                {
                    m_stForm[( int )eForm].m_IForm.SetVisible(true);
                    m_stForm[( int )eForm].m_IForm.SetTimer(true);
                    m_stForm[( int )eForm].m_IForm.SetChangeLanguage();
                }

                m_eCurrentForm = eForm;
            } while(false);
        }
Exemple #2
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 버튼 클릭 이벤트 정의
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public void ButtonMenu_Click(object sender, EventArgs e)
        {
            var    pDocument = CDocument.GetDocument;
            Button objButton = sender as Button;

            try {
                var objRegex = new Regex(@"\[(.+)\]");
                if (true == objRegex.IsMatch(objButton.Name))
                {
                    string strText = objRegex.Match(objButton.Name).Groups[1].Value;
                    CDefine.FormViewConfig eFormView = (CDefine.FormViewConfig)Convert.ToInt32(strText);

                    // 버튼 로그 추가
                    string strLog = string.Format("[{0}] [Form Change : {1} -> {2}]", "ButtonMenu_Click", m_eCurrentForm.ToString(), eFormView.ToString());
                    pDocument.SetUpdateButtonLog(this, strLog);

                    SetChangeForm(eFormView);
                }
            }
            catch (Exception ex) {
                Trace.WriteLine(ex.Message);
            }
        }