static void Main()
{
ReportGenerator g = new ReportGenerator();
g.Initialize();
g.GenerateFluidLevelTestReport();
g.GenerateFluidLevelTestReport();
g.GenerateFluidLevelTestReport();
// Initialize the user interface.
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ApplicationInstance application = new ApplicationInstance();
application.ApplicationType = ApplicationType.Server;
application.ConfigSectionName = "HistoricalEventsServer";
try
{
// process and command line arguments.
if (application.ProcessCommandLine())
{
return;
}
// check if running as a service.
if (!Environment.UserInteractive)
{
application.StartAsService(new HistoricalEventsServer());
return;
}
// load the application configuration.
application.LoadApplicationConfiguration(false);
// check the application certificate.
application.CheckApplicationInstanceCertificate(false, 0);
// start the server.
application.Start(new HistoricalEventsServer());
// run the application interactively.
Application.Run(new ServerForm(application));
}
catch (Exception e)
{
ExceptionDlg.Show(application.ApplicationName, e);
return;
}
}