Exemple #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;
                    }
                }
            }
        }
		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 HookWindowsInputAndSendToWidget(ContainerControl controlToHook, WidgetForWindowsFormsAbstract widgetToSendTo)
		{
			this.widgetToSendTo = widgetToSendTo;
			controlToHook.GotFocus += new EventHandler(controlToHook_GotFocus);
			controlToHook.LostFocus += new EventHandler(controlToHook_LostFocus);

			controlToHook.KeyDown += new System.Windows.Forms.KeyEventHandler(controlToHook_KeyDown);
			controlToHook.KeyUp += new System.Windows.Forms.KeyEventHandler(controlToHook_KeyUp);
			controlToHook.KeyPress += new System.Windows.Forms.KeyPressEventHandler(controlToHook_KeyPress);

			controlToHook.MouseDown += new MouseEventHandler(controlToHook_MouseDown);
			controlToHook.MouseMove += new MouseEventHandler(formToHook_MouseMove);
			controlToHook.MouseUp += new MouseEventHandler(controlToHook_MouseUp);
			controlToHook.MouseWheel += new MouseEventHandler(controlToHook_MouseWheel);

			controlToHook.MouseCaptureChanged += new EventHandler(controlToHook_MouseCaptureChanged);

			controlToHook.MouseLeave += new EventHandler(controlToHook_MouseLeave);
		}
        public HookWindowsInputAndSendToWidget(ContainerControl controlToHook, WidgetForWindowsFormsAbstract widgetToSendTo)
        {
            this.widgetToSendTo      = widgetToSendTo;
            controlToHook.GotFocus  += new EventHandler(controlToHook_GotFocus);
            controlToHook.LostFocus += new EventHandler(controlToHook_LostFocus);

            controlToHook.KeyDown  += new System.Windows.Forms.KeyEventHandler(controlToHook_KeyDown);
            controlToHook.KeyUp    += new System.Windows.Forms.KeyEventHandler(controlToHook_KeyUp);
            controlToHook.KeyPress += new System.Windows.Forms.KeyPressEventHandler(controlToHook_KeyPress);

            controlToHook.MouseDown  += new MouseEventHandler(controlToHook_MouseDown);
            controlToHook.MouseMove  += new MouseEventHandler(formToHook_MouseMove);
            controlToHook.MouseUp    += new MouseEventHandler(controlToHook_MouseUp);
            controlToHook.MouseWheel += new MouseEventHandler(controlToHook_MouseWheel);

            controlToHook.MouseCaptureChanged += new EventHandler(controlToHook_MouseCaptureChanged);

            controlToHook.MouseLeave += new EventHandler(controlToHook_MouseLeave);
        }