protected void SetUpFormsWindow(AbstractOsMappingWidget app, SystemWindow childSystemWindow) { aggAppWidget = (WidgetForWindowsFormsAbstract)app; this.AllowDrop = true; if (File.Exists("application.ico")) { try { this.Icon = new System.Drawing.Icon("application.ico"); } catch (System.ComponentModel.Win32Exception ex) { if (ex.NativeErrorCode != 0) { throw; } } } else if (File.Exists("../MonoBundle/StaticData/application.ico")) { try { this.Icon = new System.Drawing.Icon("../MonoBundle/StaticData/application.ico"); } catch (System.ComponentModel.Win32Exception ex) { if (ex.NativeErrorCode != 0) { throw; } } } }
public static AbstractOsMappingWidget CreateOsMappingWidget(SystemWindow childSystemWindow) { if (factoryToUse == null) { throw new NotSupportedException("You must call 'SetGuiBackend' with a GuiFactory before you can create any surfaces"); } AbstractOsMappingWidget osMappingWidget = factoryToUse.CreateSurface(childSystemWindow); if (primaryOsMappingWidget == null) { primaryOsMappingWidget = osMappingWidget; } return osMappingWidget; }
public static AbstractOsMappingWidget CreateOsMappingWidget(SystemWindow childSystemWindow) { if (factoryToUse == null) { throw new NotSupportedException("You must call 'SetGuiBackend' with a GuiFactory before you can create any surfaces"); } AbstractOsMappingWidget osMappingWidget = factoryToUse.CreateSurface(childSystemWindow); if (primaryOsMappingWidget == null) { primaryOsMappingWidget = osMappingWidget; } return(osMappingWidget); }
public WindowsFormsOpenGL(AbstractOsMappingWidget app, SystemWindow childSystemWindow) { switch (childSystemWindow.BitDepth) { case 32: glControl = new MyGLControl(32, childSystemWindow.StencilBufferDepth); break; default: throw new NotImplementedException(); } Controls.Add(glControl); SetUpFormsWindow(app, childSystemWindow); HookWindowsInputAndSendToWidget communication = new HookWindowsInputAndSendToWidget(glControl, aggAppWidget); }
public WindowsFormBitmap(AbstractOsMappingWidget app, SystemWindow childSystemWindow) { SetUpFormsWindow(app, childSystemWindow); HookWindowsInputAndSendToWidget communication = new HookWindowsInputAndSendToWidget(this, aggAppWidget); }