コード例 #1
0
        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;
                    }
                }
            }
        }
コード例 #2
0
		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;
					}
				}
			}
		}
コード例 #3
0
		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;
		}
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        public WindowsFormBitmap(AbstractOsMappingWidget app, SystemWindow childSystemWindow)
        {
            SetUpFormsWindow(app, childSystemWindow);

            HookWindowsInputAndSendToWidget communication = new HookWindowsInputAndSendToWidget(this, aggAppWidget);
        }
コード例 #7
0
		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);
		}
コード例 #8
0
		public WindowsFormBitmap(AbstractOsMappingWidget app, SystemWindow childSystemWindow)
		{
			SetUpFormsWindow(app, childSystemWindow);

			HookWindowsInputAndSendToWidget communication = new HookWindowsInputAndSendToWidget(this, aggAppWidget);
		}