internal CalendarCellModel GetCellModelByPoint(Point lastPointPosition) { var hitTestPoint = TruncateToBounds(this.contentLayer.VisualElement as FrameworkElement, lastPointPosition); CalendarCellModel cellModel = HitTestService.GetCellFromPoint(hitTestPoint, this.Model.CalendarCells); return(cellModel); }
internal void OnContentPanelTapped(TappedRoutedEventArgs e) { if (this.displayModeCache != CalendarDisplayMode.MultiDayView) { CalendarCellModel cellModel = HitTestService.GetCellFromPoint(e.GetPosition(this.contentLayer.VisualElement), this.Model.CalendarCells); if (cellModel == null) { return; } this.RaiseCellTapCommand(cellModel); } else { Point hitPoint = e.GetPosition(this.timeRulerLayer.contentPanel); CalendarMultiDayViewModel multiDayViewModel = this.model.multiDayViewModel; hitPoint.X += multiDayViewModel.timeRulerWidth; var slotContext = this.hitTestService.GetSlotContextFromPoint(hitPoint); if (slotContext != null) { this.commandService.ExecuteCommand(CommandId.TimeSlotTap, slotContext); } } }
internal CalendarCellModel GetCellModelByPosition(PointerRoutedEventArgs e) { Point currentPoint = e.GetCurrentPoint(this.contentLayer.VisualElement).Position; var hitTestPoint = TruncateToBounds(this.contentLayer.VisualElement as FrameworkElement, currentPoint); CalendarCellModel cellModel = HitTestService.GetCellFromPoint(hitTestPoint, this.Model.CalendarCells); return(cellModel); }
public MainWindow() { InitializeComponent(); cameraService = new CameraService(mainViewport, scale, translate, rotateX, rotateY, this); Common.LoadModels(); Common.ConverLatLon(); Common.CreateElement(model3DGroup); hitTestService = new HitTestService(mainViewport, model3DGroup, this); }
/// <summary> /// Initializes a new instance of the <see cref="RadRadialMenu"/> class. /// </summary> public RadRadialMenu() { this.DefaultStyleKey = typeof(RadRadialMenu); this.model = new RadialMenuModel(this); this.hitTestService = new HitTestService(this); this.visualstateService = new VisualStateService(this); this.commandService = new CommandService(this); this.SizeChanged += this.OnRadRadialMenuSizeChanged; }
internal void OnContentPanelTapped(TappedRoutedEventArgs e) { CalendarCellModel cellModel = HitTestService.GetCellFromPoint(e.GetPosition(this.contentLayer.VisualElement), this.Model.CalendarCells); if (cellModel == null) { return; } this.RaiseCellTapCommand(cellModel); }
internal bool OnContentPanelHolding(HoldingRoutedEventArgs e) { var hitPoint = e.GetPosition(this.calendarViewHost); var cellModel = HitTestService.GetCellFromPoint(hitPoint, this.model.CalendarCells); if (cellModel != null && this.SelectionMode == CalendarSelectionMode.Multiple && this.DisplayMode == CalendarDisplayMode.MonthView) { this.VisualStateService.UpdateHoldDecoration(cellModel); return(true); } return(false); }
internal void OnContentPanelPointerOver(PointerRoutedEventArgs e) { var hitPoint = e.GetCurrentPoint(this.calendarViewHost).Position; var cellModel = HitTestService.GetCellFromPoint(hitPoint, this.model.CalendarCells); if (cellModel != null && e.Pointer.PointerDeviceType != PointerDeviceType.Touch) { this.RaiseCellPointerOverCommand(cellModel); } else { this.VisualStateService.UpdateHoverDecoration(null); } }
/// <summary> /// Initializes a new instance of the <see cref="RadRadialMenu"/> class. /// </summary> public RadRadialMenu() { this.DefaultStyleKey = typeof(RadRadialMenu); this.model = new RadialMenuModel(this); this.hitTestService = new HitTestService(this); this.visualstateService = new VisualStateService(this); this.commandService = new CommandService(this); this.SizeChanged += this.OnRadRadialMenuSizeChanged; this.tooltip = new Popup(); this.menuToolTipContent = new MenuToolTip(); this.tooltip.Child = this.menuToolTipContent; }
public void Init() { var swapChaing = GraphicDeviceFactory.Device.DefaultSwapChain; hitTestService = new HitTestService(Engine.Presenter, swapChaing.BackBuffer.Size); defaultScene = _CreateScene(); defaultCamera = _CreateCamera(defaultScene); Engine.Scene = defaultScene; grid = new DesignEnvironment(); gridFrame = defaultScene.Create("GRID", grid, Matrix.Identity); gridFrame.IsDesignOnly = true; coordinateGlyp = new CoordinateGlyp(new Igneel.Rectangle(0, 0, 64, 64)) { EnablePlanes = false, ArrowRadius = 2, ArrowHeight = 3 }.Initialize(); defaultScene.Decals.Add(coordinateGlyp); transformationController = new TransformationController(windows); StartGameLoop(); initialized = true; windows.Canvas3D.KeyDown += Canvas3D_KeyDown; if (SceneCreated != null) { SceneCreated(this, defaultScene); } }