private void RadBookItem_MouseEnter(object sender, MouseEventArgs e) { if (this.dragStarted || FoldHelper.MouseWithinFoldAreas(e.GetPosition((IInputElement)this), this) || this.ParentBook != null && this.ParentBook.ShowPageFold != PageFoldVisibility.OnPageEnter) { return; } this.OnPageMouseEnter(new PageMouseEventArgs(this)); }
private void RadBookItem_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (!this.CanBeTurned) { return; } this.mousePoint = e.GetPosition((IInputElement)this); if (!FoldHelper.MouseWithinFoldAreas(this.mousePoint, this) && this.FoldSize != new Size(0.0, 0.0)) { return; } this.draggedCorner = FoldHelper.GetQuadrant(this.mousePoint, this); this.targetCorner = RadBookItem.GetOppositeCorner(this.draggedCorner); this.UpdatePageFold(); if (this.doubleClickMode && this.PageFlipMode == PageFlipMode.DoubleClick) { if (this.mouseDoubleClick != null) { this.mouseDoubleClick((object)this, new MouseClickEventArgs(this.targetCorner)); } this.doubleClickMode = false; this.doubleClickTimer.Stop(); } else { this.singleClickMode = this.PageFlipMode == PageFlipMode.SingleClick; this.doubleClickMode = this.PageFlipMode == PageFlipMode.DoubleClick; this.dragStarted = true; if (this.PageFlipMode == PageFlipMode.SingleClick) { this.singleClickTimer.Start(); } else if (this.PageFlipMode == PageFlipMode.DoubleClick) { this.doubleClickTimer.Start(); } else { this.singleClickTimer.Stop(); this.doubleClickTimer.Stop(); } if (this.mouseDragStart == null) { return; } this.mouseDragStart((object)this, new DragStartedEventArgs(this.draggedCorner, this.mousePoint)); } }
private void RadBookItem_MouseMove(object sender, MouseEventArgs e) { if (!this.CanBeTurned) { return; } if (this.dragStarted) { this.CaptureMouse(); } if (this.ParentBook.ShowPageFold == PageFoldVisibility.OnPageEnter && !FoldHelper.MouseWithinFoldAreas(e.GetPosition((IInputElement)this), this)) { this.OnPageMouseMove(new PageMouseEventArgs(this)); } this.mousePoint = e.GetPosition((IInputElement)this); if (this.dragStarted && this.mouseDragMove != null) { this.mouseDragMove((object)this, new DragInProgressEventArgs(this.mousePoint)); } else { this.UpdatePageFold(); } }