Exemplo n.º 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;
                    }
                }
            }
        }
Exemplo n.º 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;
					}
				}
			}
		}
Exemplo n.º 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;
		}
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
        public WindowsFormBitmap(AbstractOsMappingWidget app, SystemWindow childSystemWindow)
        {
            SetUpFormsWindow(app, childSystemWindow);

            HookWindowsInputAndSendToWidget communication = new HookWindowsInputAndSendToWidget(this, aggAppWidget);
        }
Exemplo n.º 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);
		}
Exemplo n.º 8
0
		public WindowsFormBitmap(AbstractOsMappingWidget app, SystemWindow childSystemWindow)
		{
			SetUpFormsWindow(app, childSystemWindow);

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