public MainForm() { instance = this; //NeoAxis initialization EngineApp.ConfigName = "user:Configs/WinFormsMultiViewAppExample.config"; if( !WinFormsAppWorld.InitWithoutCreation( new MultiViewAppEngineApp( EngineApp.ApplicationTypes.Simulation ), "user:Logs/WinFormsMultiViewAppExample.log", true, null, null, null, null ) ) { Close(); return; } EngineApp.Instance.Config.RegisterClassParameters( typeof( MainForm ) ); //print information logs to the Output panel. Log.Handlers.InfoHandler += delegate( string text, ref bool dumpToLogFile ) { if( outputForm != null ) outputForm.Print( text ); }; //show splash screen if( showSplashScreenAtStartup && !Debugger.IsAttached ) { Image image = WinFormsMultiViewAppExample.Properties.Resources.ApplicationSplash; SplashForm splashForm = new SplashForm( image ); splashForm.Show(); } InitializeComponent(); //restore window state if( showMaximized ) { Screen screen = Screen.FromControl( this ); if( screen.Primary ) WindowState = FormWindowState.Maximized; } else { Size = new Size( startWindowSize.X, startWindowSize.Y ); } SuspendLayout(); dockPanel = new DockPanel(); dockPanel.Visible = false; dockPanel.Parent = this; dockPanel.Dock = DockStyle.Fill; dockPanel.Name = "dockPanel"; dockPanel.BringToFront(); //create dock forms entityTypesForm = new EntityTypesForm(); dockForms.Add( entityTypesForm ); propertiesForm = new PropertiesForm(); dockForms.Add( propertiesForm ); outputForm = new OutputForm(); dockForms.Add( outputForm ); example3DViewForm = new Example3DViewForm(); dockForms.Add( example3DViewForm ); menuStrip.Visible = false; toolStripGeneral.Visible = false; ResumeLayout(); }
public MainForm() { instance = this; //NeoAxis initialization EngineApp.ConfigName = "user:Configs/WinFormsMultiViewAppExample.config"; if (!WinFormsAppWorld.InitWithoutCreation( new MultiViewAppEngineApp(EngineApp.ApplicationTypes.Simulation), "user:Logs/WinFormsMultiViewAppExample.log", true, null, null, null, null)) { Close(); return; } EngineApp.Instance.Config.RegisterClassParameters(typeof(MainForm)); //print information logs to the Output panel. Log.Handlers.InfoHandler += delegate(string text, ref bool dumpToLogFile) { if (outputForm != null) { outputForm.Print(text); } }; //show splash screen if (showSplashScreenAtStartup && !Debugger.IsAttached) { Image image = WinFormsMultiViewAppExample.Properties.Resources.ApplicationSplash; SplashForm splashForm = new SplashForm(image); splashForm.Show(); } InitializeComponent(); //restore window state if (showMaximized) { Screen screen = Screen.FromControl(this); if (screen.Primary) { WindowState = FormWindowState.Maximized; } } else { Size = new Size(startWindowSize.X, startWindowSize.Y); } SuspendLayout(); dockPanel = new DockPanel(); dockPanel.Visible = false; dockPanel.Parent = this; dockPanel.Dock = DockStyle.Fill; dockPanel.Name = "dockPanel"; dockPanel.BringToFront(); //create dock forms entityTypesForm = new EntityTypesForm(); dockForms.Add(entityTypesForm); propertiesForm = new PropertiesForm(); dockForms.Add(propertiesForm); outputForm = new OutputForm(); dockForms.Add(outputForm); example3DViewForm = new Example3DViewForm(); dockForms.Add(example3DViewForm); menuStrip.Visible = false; toolStripGeneral.Visible = false; ResumeLayout(); }