Ejemplo n.º 1
0
        static int Main(string[] args)
        {
            try
            {
                XConfig.Init();

                if (!ParseCommandLine(args))
                {
                    return(1);
                }

                DumpFileNameList list = new DumpFileNameList();
                list.Check(XConfig.m_strPath, false);
                if (list.GetCount() > 0)
                {
                    // dump analysis
                    XDumpAnalyzer dumpAnalyzer = new XDumpAnalyzer();
                    dumpAnalyzer.AnalyzeAllFile(XConfig.m_strPath, list.m_FileNameArrayList);

                    // rename file
                    if (XConfig.m_bRenameFile)
                    {
                        XRenameProcess renameProcess = new XRenameProcess(XConfig.m_strPath, list.m_FileNameArrayList, XConfig.m_Postfixes);
                        renameProcess.RenameAll();
                    }
                }

                // sendmail
                if (XConfig.m_bSendEmail)
                {
                    DumpFileNameList newDumplist = new DumpFileNameList();  // Dump File 이름이 바꿔어서 다시 체크
                    newDumplist.Check(XConfig.m_strPath, !XConfig.m_bCheckAll);

                    if (newDumplist.GetCount() > 0)
                    {
                        MailSender mailSender = new MailSender(XConfig.m_EmailIDArrayList, newDumplist);
                        mailSender.Send();
                    }
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine("Error: " + ex.ToString());
                return(1);
            }
            return(0);
        }
Ejemplo n.º 2
0
 public MailSender(ArrayList emailArrayList, DumpFileNameList dumpFileNameList)
 {
     m_EmailIDArrayList = emailArrayList;
     m_dumpFileNameList = dumpFileNameList;
 }