static void Main() { //Application.EnableVisualStyles(); //Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new Form1()); string path = Application.ExecutablePath; EndogineHub endogine = new EndogineHub(path); string[] aAvailableStrategies = StageBase.GetAvailableRenderers(); //Endogine.MdiParent mdiParent = new MdiParent(); //SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, mdiParent); SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, null); wndSetup.ShowDialog(); Main main = new Main(); main.Show(); endogine.Init(main, null, null); main.EndogineInitDone(); MusicGame.Midi.Main game = new MusicGame.Midi.Main(); while (endogine.MainLoop()) Application.DoEvents(); }
private void Form1_Load(object sender, System.EventArgs e) { m_endogine = new EndogineHub(Application.ExecutablePath); string[] aAvailableStrategies = StageBase.GetAvailableRenderers(null); // string[] aAvailableStrategies = new string[]{Enum.GetName(typeof(EndogineHub.RenderStrategy), 0), Enum.GetName(typeof(EndogineHub.RenderStrategy), 1)}; if (Endogine.AppSettings.Instance.GetNodeText("MDI") != "false") this.IsMdiContainer = true; if (Endogine.AppSettings.Instance.GetNodeText("SetupDialog") != "false") { SetupWindow wndSetup = new SetupWindow(aAvailableStrategies, this); wndSetup.ShowDialog(); } m_formStage = new Main(); Form formMdiParent = (Form)null; if (this.IsMdiContainer) { this.Width = 800; this.Height = 600; this.WindowState = FormWindowState.Maximized; formMdiParent = this; m_formStage.MdiParent = this; } else { this.Visible = false; //TODO: this doesn't work this.Text = "Should be invisible!"; } //TODO: anyhow, it's strange to use a Form to start from, the project should probably be a console application. m_formStage.Show(); m_endogine.Init(m_formStage, formMdiParent, this); m_formStage.EndogineInitDone(); }