internal void ShowSplitAdorner(bool showFeedback, TimelineDragDescriptor descriptor) { if (showFeedback && descriptor != null && (descriptor.TargetItem != null && !descriptor.HideSplitter)) { TimelineItem timelineItem = (TimelineItem)null; bool flag = false; double num1 = 0.0; if (descriptor.AllowBetween) { timelineItem = descriptor.TargetItem; flag = (descriptor.ResultDropEffects & TimelineDropEffects.Before) != TimelineDropEffects.None; num1 = (double)(timelineItem.Depth + descriptor.RelativeDepth); } else if (descriptor.TargetItem.IsExpanded && descriptor.DropInDefaultContent) { ElementTimelineItem elementTimelineItem = descriptor.TargetItem as ElementTimelineItem; if (elementTimelineItem != null) { ISceneNodeCollection <SceneNode> defaultContent = elementTimelineItem.Element.DefaultContent; if (defaultContent != null) { if (defaultContent.Count > 0 && !this.TimelineItemManager.SortByZOrder) { flag = true; num1 = (double)(descriptor.TargetItem.Depth + 1); int index = this.TimelineItemManager.ItemList.IndexOf((TimelineItem)elementTimelineItem); int count = this.TimelineItemManager.ItemList.Count; while (index < count - 1 && (double)this.TimelineItemManager.ItemList[index + 1].Depth >= num1) { ++index; } timelineItem = this.TimelineItemManager.ItemList[index]; } else { timelineItem = descriptor.TargetItem; flag = true; num1 = (double)(timelineItem.Depth + 1); } } } } if (timelineItem != null) { Point point = ((Visual)this.ElementTree.ItemContainerGenerator.ContainerFromItem((object)timelineItem)).TransformToVisual((Visual)this).Transform(new Point(0.0, 0.0)); bool sortByZorder = this.TimelineItemManager.SortByZOrder; double indentMultiplier = this.IndentMultiplier; double left = num1 * this.IndentMultiplier + point.X + indentMultiplier; double num2 = (double)((int)(this.DropSplitAdorner.ActualHeight - 1.0) / 2); double num3 = (double)this.Resources[(object)"RowMinHeight"]; double top = point.Y - num2 + (sortByZorder ^ flag ? num3 : 0.0); this.DropSplitAdorner.Margin = new Thickness(left, top, 0.0, 0.0); this.DropSplitAdorner.Visibility = Visibility.Visible; return; } } this.DropSplitAdorner.Visibility = Visibility.Collapsed; }
internal void ShowDragFeedback(bool showDragTip, Point mouseOffset, TimelineDragDescriptor timelineDragDescriptor) { DragTipModel dragTipModel = (DragTipModel)null; if (showDragTip && timelineDragDescriptor != null) { dragTipModel = DragTipModel.FromDescriptor(timelineDragDescriptor); } if (dragTipModel != null) { if (this.DragTipModel != dragTipModel) { this.DragTipModel = dragTipModel; this.DragTip.IsOpen = true; this.OnPropertyChanged("DragTipModel"); } if (this.timer != null) { this.timer.Stop(); } } else { if (this.timer == null) { this.timer = new DispatcherTimer(DispatcherPriority.Input); this.timer.Interval = TimeSpan.FromSeconds(0.1); this.timer.Tick += (EventHandler)((sender, e) => { this.DragTip.IsOpen = false; this.DragTipModel = (DragTipModel)null; this.OnPropertyChanged("DragTipModel"); this.timer.Stop(); }); } this.timer.Start(); } if (showDragTip && this.DragTip.IsOpen) { this.DragTip.HorizontalOffset = mouseOffset.X + 10.0; this.DragTip.VerticalOffset = mouseOffset.Y + 20.0; } this.DragTargetParent = !showDragTip || timelineDragDescriptor == null ? (TimelineItem)null : timelineDragDescriptor.TargetParent; this.OnPropertyChanged("DragTargetParent"); }