示例#1
0
        private FlowInfo doRegisterFirewall(FlowInfo flowInfo)
        {
            FrmStatus frmStatusFirewall = new FrmStatus(this.context, ConstDef.mainTitle
                                                        , "방화벽설정을 등록합니다.", ctr.RegisterFirewall);

            if (frmStatusFirewall != null)
            {
                ctr.LogWriteHandler += frmStatusFirewall.OnStatusWrite;
                if (frmStatusFirewall.ShowDialog(wrapper) == DialogResult.OK)
                {
                    Logger.info("방화벽등록 완료");
                }
                else
                {
                    Logger.error("방화벽등록중 설치취소");
                    throw new Exception("방화벽등록중 설치취소");
                }
                ctr.LogWriteHandler -= frmStatusFirewall.OnStatusWrite;
                frmStatusFirewall.Dispose();
            }
            flowInfo.PrevStep = Step.REGISTER_FIREWALL;
            flowInfo.NextStep = Step.NO_MORE_STEP;

            return(flowInfo);
        }
        private FlowInfo doGenerateData(FlowInfo flowInfo)
        {
            //기존DB있는경우, 회사코드만 변경.
            //                변경안된 경우는 스킵
            //신규DB인 경우, 신규데이터 설정
            //**FrmStatus를 통해 처리진행현황 보여줌.
            if (ctr.NeedDataGenerate())
            {
                FrmStatus frmStatusDataGen = new FrmStatus(this.context, ConstDef.mainTitle
                                                           , "회사코드 및 기본정보를 생성합니다.", ctr.GenerateData);

                if (frmStatusDataGen != null)
                {
                    ctr.LogWriteHandler += frmStatusDataGen.OnStatusWrite;
                    if (frmStatusDataGen.ShowDialog(wrapper) == DialogResult.OK)
                    {
                        Logger.info("데이터생성 완료");
                    }
                    else
                    {
                        Logger.error("데이터생성중 설치취소");
                        throw new Exception("데이터생성중 설치취소");
                    }
                    ctr.LogWriteHandler -= frmStatusDataGen.OnStatusWrite;
                    frmStatusDataGen.Dispose();
                }
            }
            flowInfo.PrevStep = Step.GENERATE_DATA;
            flowInfo.NextStep = Step.REGISTER_FIREWALL;

            return(flowInfo);
        }
        private FlowInfo doDeleteInstallDB(FlowInfo flowInfo)
        {
            //FrmStatus를 통해 처리진행현황 보여줌.
            string    header    = "MySql DB를 설치합니다.";
            string    title     = ConstDef.mainTitle;
            FrmStatus frmStatus = null;

            frmStatus            = new FrmStatus(this.context, title, header, ctr.RemoveAndInstallDb);
            ctr.LogWriteHandler += frmStatus.OnStatusWrite;

            if (frmStatus.ShowDialog(wrapper) == DialogResult.OK)
            {
                Logger.info("DB설치 완료");
            }
            else
            {
                Logger.error("DB설치중 설치취소");
                throw new Exception("DB설치중 설치취소");
            }
            ctr.LogWriteHandler -= frmStatus.OnStatusWrite;
            frmStatus.Dispose();

            flowInfo.PrevStep = Step.DELETE_INSTALL_DB;
            flowInfo.NextStep = Step.SET_CONFIG;

            return(flowInfo);
        }
        private FlowInfo doRegisterFirewall(FlowInfo flowInfo) {
            FrmStatus frmStatusFirewall = new FrmStatus(this.context, ConstDef.mainTitle
                                                       , "방화벽설정을 등록합니다.", ctr.RegisterFirewall);

            if (frmStatusFirewall != null)
            {
                ctr.LogWriteHandler += frmStatusFirewall.OnStatusWrite;
                if (frmStatusFirewall.ShowDialog(wrapper) == DialogResult.OK)
                {
                    Logger.info("방화벽등록 완료");
                }
                else
                {
                    Logger.error("방화벽등록중 설치취소");
                    throw new Exception("방화벽등록중 설치취소");
                }
                ctr.LogWriteHandler -= frmStatusFirewall.OnStatusWrite;
                frmStatusFirewall.Dispose();
            }
            flowInfo.NextStep = Step.NO_MORE_STEP;
            flowInfo.PrevStep = Step.REGISTER_FIREWALL;

            return flowInfo;
        }
        private FlowInfo doGenerateData(FlowInfo flowInfo) {
            //기존DB있는경우, 회사코드만 변경. 
            //                변경안된 경우는 스킵
            //신규DB인 경우, 신규데이터 설정
            //**FrmStatus를 통해 처리진행현황 보여줌.
            if (ctr.NeedDataGenerate())
            {
                FrmStatus frmStatusDataGen = new FrmStatus(this.context, ConstDef.mainTitle
                    , "회사코드 및 기본정보를 생성합니다.", ctr.GenerateData);

                if (frmStatusDataGen != null)
                {
                    ctr.LogWriteHandler += frmStatusDataGen.OnStatusWrite;
                    if (frmStatusDataGen.ShowDialog(wrapper) == DialogResult.OK)
                    {
                        Logger.info("데이터생성 완료");
                    }
                    else
                    {
                        Logger.error("데이터생성중 설치취소");
                        throw new Exception("데이터생성중 설치취소");
                    }
                    ctr.LogWriteHandler -= frmStatusDataGen.OnStatusWrite;
                    frmStatusDataGen.Dispose();
                }
            }
            flowInfo.PrevStep = Step.GENERATE_DATA;
            flowInfo.NextStep = Step.REGISTER_FIREWALL;

            return flowInfo;
        }
        private FlowInfo doDeleteInstallDB(FlowInfo flowInfo)
        {
            //FrmStatus를 통해 처리진행현황 보여줌.
            string header = "MySql DB를 설치합니다.";
            string title = ConstDef.mainTitle;
            FrmStatus frmStatus = null;

            frmStatus = new FrmStatus(this.context, title, header, ctr.RemoveAndInstallDb);
            ctr.LogWriteHandler += frmStatus.OnStatusWrite;

            if (frmStatus.ShowDialog(wrapper) == DialogResult.OK)
            {
                Logger.info("DB설치 완료");
            }
            else
            {
                Logger.error("DB설치중 설치취소");
                throw new Exception("DB설치중 설치취소");
            }
            ctr.LogWriteHandler -= frmStatus.OnStatusWrite;
            frmStatus.Dispose();

            flowInfo.PrevStep = Step.DELETE_INSTALL_DB;
            flowInfo.NextStep = Step.SET_CONFIG;

            return flowInfo;
        }