/// <summary> /// The main entry point for the application. /// </summary> public void Main(string[] args) { using (AgateLib.AgateSetup setup = new AgateLib.AgateSetup("Agate Audio Tester", args)) { setup.AskUser = true; setup.Initialize(false, true, false); if (setup.WasCanceled) { return; } Application.Run(new frmAudioTester()); } }
/// <summary> /// Runs the application. /// </summary> /// <param name="args"></param> /// <returns></returns> public int Run(string[] args) { using (AgateSetup setup = new AgateSetup(args)) { setup.Initialize( InitParams.InitializeDisplay, InitParams.InitializeAudio, InitParams.InitializeJoysticks); if (setup.WasCanceled) { return(1); } CreateDisplayWindow(); font = new FontSurface("Arial", 12.0f); if (InitParams.ShowSplashScreen) { DoSplash(); } Initialize(); while (MainWindow.IsClosed == false) { Update(Display.DeltaTime); Display.RenderTarget = mWindow; Display.BeginFrame(); Render(); Display.EndFrame(); Core.KeepAlive(); } } return(0); }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Directory.CreateDirectory("./images"); AgateFileProvider.Assemblies.AddPath("../../Drivers"); AgateFileProvider.Images.AddPath("./images"); using (AgateLib.AgateSetup setup = new AgateLib.AgateSetup(args)) { setup.Initialize(true, false, false); if (setup.WasCanceled) { return; } frmFontCreator frm = new frmFontCreator(); frm.Show(); Properties.Settings.Default.Reload(); if (Properties.Settings.Default.SkipWarning == false) { new frmWarningSplash().ShowDialog(frm); } Properties.Settings.Default.Save(); Application.Run(frm); } foreach (string file in tempFiles) { File.Delete(file); } }