Example #1
0
        protected override void Initialize()
        {
            base.Initialize();

            configObj = Config as HKFMAndBulkFileGeneratorConfig;
            try
            {
                CbbcStartPos    = int.Parse(configObj.CbbcStartPos);
                CbbcEndPos      = int.Parse(configObj.CbbcEndPos);
                WarrantStartPos = int.Parse(configObj.WarrantStartPos);
                WarrantEndPos   = int.Parse(configObj.WarrantEndPos);
            }
            catch (Exception)
            {
                Logger.Log("The value of CBBC Positions or Warrant Positions must be a digital!");
            }

            cbbcGenerator     = new HKCBBCFMSubGenerator(this);
            warrantGenerator  = new HKWarrantFMSubGenerator(this);
            bulkFileGenerator = new HKFMBulkFilesSubGenerator(this);

            if (!Directory.Exists(configObj.OutPutDir))
            {
                Directory.CreateDirectory(configObj.OutPutDir);
            }

            cbbcGenerator.Initialize(configObj.OutPutDir, Logger, TaskResultList);
            warrantGenerator.Initialize(configObj.OutPutDir, Logger, TaskResultList);
            bulkFileGenerator.Initialize(configObj.OutPutDir, Logger, TaskResultList);
        }
Example #2
0
        protected override void Cleanup()
        {
            base.Cleanup();
            cbbcGenerator.Cleanup();
            warrantGenerator.Cleanup();
            cbbcGenerator     = null;
            warrantGenerator  = null;
            bulkFileGenerator = null;

            if (isKeepPdf == false)
            {
                DeleteTempDir(configObj.OutPutDir + "\\" + pdfFileDir);
            }
        }