예제 #1
0
        public ItemPanel()
        {
            m_ItemContainer = new ItemContainer();
            m_ItemContainer.GlobalItem = false;
            m_ItemContainer.ContainerControl = this;
            m_ItemContainer.Stretch = false;
            m_ItemContainer.Displayed = true;
            m_ItemContainer.Style = eDotNetBarStyle.Office2007;
            this.ColorScheme.Style = eDotNetBarStyle.Office2007;
            m_ItemContainer.SetOwner(this);
            m_ItemContainer.SetSystemContainer(true);

            this.SetBaseItemContainer(m_ItemContainer);
            m_ItemContainer.Style = eDotNetBarStyle.Office2007;

            this.DragDropSupport = true;

            if (BarFunctions.IsWindows7 && Touch.TouchHandler.IsTouchEnabled)
            {
                _TouchHandler = new DevComponents.DotNetBar.Touch.TouchHandler(this, Touch.eTouchHandlerType.Gesture);
                _TouchHandler.PanBegin += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPanBegin);
                _TouchHandler.Pan += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPan);
                _TouchHandler.PanEnd += new EventHandler<DevComponents.DotNetBar.Touch.GestureEventArgs>(TouchHandlerPanEnd);
            }
        }
예제 #2
0
 /// <summary>
 /// Create new touch event argument instance
 /// </summary>
 /// <param name="hWndWrapper">The target control</param>
 /// <param name="touchInput">one of the inner touch input in the message</param>
 internal TouchEventArgs(TouchHandler parentHandler, float dpiX, float dpiY, ref WinApi.TOUCHINPUT touchInput)
 {
     _ParentHandler = parentHandler;
     _dpiXFactor = 96F / dpiX;
     _dpiYFactor = 96F / dpiY;
     DecodeTouch(ref touchInput);
 }
예제 #3
0
        /// <summary>
        /// Create new gesture event instance and decode the gesture info structure
        /// </summary>
        /// <param name="handler">The gesture handler</param>
        /// <param name="gestureInfo">The gesture information</param>
        internal GestureEventArgs(TouchHandler handler, ref WinApi.GESTUREINFO gestureInfo)
        {
            _Flags = gestureInfo.dwFlags;
            GestureId = gestureInfo.dwID;
            GestureArguments = gestureInfo.ullArguments;

            //Get the last event from the handler
            LastEvent = handler.LastEventArgs;

            //Get the last begin event from the handler 
            LastBeginEvent = handler.LastBeginEventArgs;

            ParseGesture(handler.ParentControl, ref gestureInfo);

            //new gesture, clear last and first event fields
            if (IsBegin)
            {
                LastBeginEvent = null;
                LastEvent = null;
            }
        }
예제 #4
0
 protected override void OnHandleCreated(EventArgs e)
 {
     if (TouchHandler.IsTouchEnabled)
     {
         _TouchHandler = new TouchHandler(this, eTouchHandlerType.Touch);
         _TouchHandler.TouchDown += new EventHandler<TouchEventArgs>(TouchHandlerTouchDown);
         _TouchHandler.TouchUp += new EventHandler<TouchEventArgs>(TouchHandlerTouchUp);
         // Don't need touch move action for keyboard handling
         //_TouchHandler.TouchMove += new EventHandler<TouchEventArgs>(TouchHandlerTouchMove);
     }
     base.OnHandleCreated(e);
 }