Exemple #1
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 폼 초기화
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public bool InitializeForm()
        {
            bool bReturn = false;

            do
            {
                var pDocument = CDocument.GetDocument;
                m_objCurrentForm = this;
                // 대기 다이얼로그 생성
                m_objDialogWait = new CDialogWait();
                // 메인 폼 패널에 타이틀 / 몸통 / 메뉴 형식으로 붙인다.
                m_objTitle = new CFormTitle();
                m_objView  = new CFormView();
                m_objMenu  = new CFormMenu();
                CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 3, "CFormTitle Initialize....", TypeOfMessage.Warning);
                SetFormDockStyle(m_objTitle, this.panelTitle);
                CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 13, "CFormTitle Initialize Completed", TypeOfMessage.Success);
                Application.DoEvents();
                CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 13, "CFormView Initialize....", TypeOfMessage.Warning);
                SetFormDockStyle(m_objView, this.panelView);
                CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 7, "CFormView Initialize Completed", TypeOfMessage.Success);
                Application.DoEvents();
                SetFormDockStyle(m_objMenu, this.panelMenu);
                CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 3, "CFormMenu Initialize Completed", TypeOfMessage.Success);
                Application.DoEvents();

                CFormInterface objInterface = m_objTitle as CFormInterface;
                if (null != objInterface)
                {
                    objInterface.SetChangeLanguage();
                    objInterface = null;
                }
                objInterface = m_objMenu as CFormInterface;
                if (null != objInterface)
                {
                    objInterface.SetChangeLanguage();
                    objInterface = null;
                }

                this.Location      = new Point(0, 0);
                this.StartPosition = FormStartPosition.Manual;

                bReturn = true;
            } while(false);

            return(bReturn);
        }
Exemple #2
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 초기화
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public bool Initialize()
        {
            bool bReturn = false;

            do
            {
                var objMMFCamera = ENC.MemoryMap.Manager.CMMFManagerVisionData.Instance;
                // MAX 로 생성
                for (int iLoopCount = 0; iLoopCount < ( int )CDefine.enumCamera.CAMERA_FINAL; iLoopCount++)
                {
                    objMMFCamera[iLoopCount].bLive    = false;
                    objMMFCamera[iLoopCount].bTrigger = false;
                    objMMFCamera[iLoopCount].bLightOn = false;
                }

                var pDocument = CDocument.GetDocument;
                if (false == pDocument.Initialize())
                {
                    throw new ArgumentException("Fail to Initialize Document Class");
                }

                pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "Program Start");
                // 폼 초기화
                if (false == InitializeForm())
                {
                    break;
                }

                CLoadingScreen.UpdateStatusTextWithStatus(100, "Initialize Completed.", TypeOfMessage.Success);
                CLoadingScreen.CloseSplashScreen();
                pDocument.m_ThreadSplashWindow.Join();

                bReturn = true;
            } while(false);

            return(bReturn);
        }
Exemple #3
0
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //생성 :
        //추가 :
        //목적 : 초기화 함수
        //설명 :
        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        public override bool Initialize()
        {
            bool bReturn = false;

            do
            {
                var pDocument = CDocument.GetDocument;
                pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "CProcessVision Initialize Start");

                pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "CProcessVision - Manager Initialize");

                if (CDefine.enumMachineType.PROCESS_60 == pDocument.m_objConfig.GetSystemParameter().eMachineType)
                {
                    // 프로그래스 바 : CProcessVisionManagerLoader Initialize Start.
                    CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint(), "CProcessVisionManagerProcess60 Initialize Start.", TypeOfMessage.Warning);
                    m_objProcessVisionManagerProcess60 = new CProcessVisionManagerProcess60();
                    if (false == m_objProcessVisionManagerProcess60.Initialize())
                    {
                        pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "CProcessVisionManagerProcess60 Initialize Fail");
                        break;
                    }
                    // 프로그래스 바 : CProcessVisionManagerLoader Initialize Completed.
                    CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 3, "CProcessVisionManagerLoader Initialize Completed.", TypeOfMessage.Success);
                }
                else if (CDefine.enumMachineType.PROCESS_110 == pDocument.m_objConfig.GetSystemParameter().eMachineType)
                {
                    // 프로그래스 바 : CProcessVisionManagerLoader Initialize Start.
                    CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint(), "CProcessVisionManagerProcess110 Initialize Start.", TypeOfMessage.Warning);
                    m_objProcessVisionManagerProcess110 = new CProcessVisionManagerProcess110();
                    if (false == m_objProcessVisionManagerProcess110.Initialize())
                    {
                        pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "CProcessVisionManagerProcess110 Initialize Fail");
                        break;
                    }
                    // 프로그래스 바 : CProcessVisionManagerLoader Initialize Completed.
                    CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 3, "CProcessVisionManagerLoader Initialize Completed.", TypeOfMessage.Success);
                }
                else if (CDefine.enumMachineType.PROCESS_150 == pDocument.m_objConfig.GetSystemParameter().eMachineType)
                {
                    var objSystemParameter = pDocument.m_objConfig.GetSystemParameter();
                    // 프로그래스 바 : CProcessVisionManagerLoader Initialize Start.
                    CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint(), "CProcessVisionManagerProcess150 Initialize Start.", TypeOfMessage.Warning);

                    if (CDefine.enumCameraType.CAMERA_3D != objSystemParameter.eCameraType)
                    {
                        m_objProcessVisionManagerProcess150 = new CProcessVisionManagerProcess150();
                        if (false == m_objProcessVisionManagerProcess150.Initialize())
                        {
                            pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "CProcessVisionManagerProcess150 Initialize Fail");
                            break;
                        }
                    }
                    else
                    {
                        m_objProcessVisionManagerProcess150Gocator = new CProcessVisionManagerProcess150Gocator();
                        if (false == m_objProcessVisionManagerProcess150Gocator.Initialize())
                        {
                            pDocument.SetUpdateLog(CDefine.enumLogType.LOG_SYSTEM, "CProcessVisionManagerProcess150Gocator Initialize Fail");
                            break;
                        }
                    }


                    // 프로그래스 바 : CProcessVisionManagerLoader Initialize Completed.
                    CLoadingScreen.UpdateStatusTextWithStatus(CLoadingScreen.GetPrograssPoint() + 3, "CProcessVisionManagerLoader Initialize Completed.", TypeOfMessage.Success);
                }

                bReturn = true;
            } while(false);

            return(bReturn);
        }