예제 #1
0
파일: Form1.cs 프로젝트: rotovibe/engage
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         _reporter.BuildProgramReport();
     }
     catch (Exception ex)
     {
         UpdateStatus(ex.Message);
     }
 }
예제 #2
0
파일: Program.cs 프로젝트: rotovibe/engage
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length > 0)
            {
                if (args[0].ToUpper() == "RUN")
                {
                    Reporter _reporter = new Reporter();

                    _reporter.DataDomainURL  = ConfigurationManager.AppSettings.Get("URL").ToString();
                    _reporter.ContractNumber = ConfigurationManager.AppSettings.Get("Contract").ToString();
                    _reporter.UserId         = ConfigurationManager.AppSettings.Get("UserId").ToString();
                    _reporter.ConfigFile     = ConfigurationManager.AppSettings.Get("ConfigFile").ToString();
                    _reporter.OutputPath     = ConfigurationManager.AppSettings.Get("OutputPath").ToString();
                    if (_reporter.OutputPath.EndsWith(@"\") == false)
                    {
                        _reporter.OutputPath += @"\";
                    }

                    _reporter.LoadLookUps();
                    _reporter.BuildProgramReport();
                    _reporter.BuildActionReport();

                    Application.Exit();
                }
                else
                {
                    Application.Run(new Form1());
                }
            }
            else
            {
                Application.Run(new Form1());
            }
        }