public void RemoveNotify(AnimNotifyNodeControl notify) { mAnimNodifyNodes.Remove(notify); TicksCanvas.Children.Remove(notify); notify.AnimNotifyMouseLeftButtonDown -= Notify_AnimNotifyMouseLeftButtonDown; notify.AnimNotifyMouseLeftButtonUp -= Notify_AnimNotifyMouseLeftButtonUp; notify.AnimNotifyMouseMove -= Notify_AnimNotifyMouseMove; notify.AnimNotifyMouseRightButtonDown -= Notify_AnimNotifyMouseRightButtonDown; notify.AnimNotifyMouseWheel -= Notify_AnimNotifyMouseWheel; }
public void AddNofity(AnimNotifyNodeControl notify) { mAnimNodifyNodes.Add(notify); TicksCanvas.Children.Add(notify); notify.LocationFrame = (notify.Pos - mTicksList[0].Pos) / TicksScaleInterval; notify.CGfxNotify.NotifyTime = (long)(notify.LocationFrame / Maximum * AnimationDuration); notify.Height = 30; notify.AnimNotifyMouseLeftButtonDown += Notify_AnimNotifyMouseLeftButtonDown; notify.AnimNotifyMouseLeftButtonUp += Notify_AnimNotifyMouseLeftButtonUp; notify.AnimNotifyMouseMove += Notify_AnimNotifyMouseMove; notify.AnimNotifyMouseRightButtonDown += Notify_AnimNotifyMouseRightButtonDown; notify.AnimNotifyMouseWheel += Notify_AnimNotifyMouseWheel; }
private void NewNotify_Click(object sender, RoutedEventArgs e) { var pos = System.Windows.Forms.Control.MousePosition; var transform = PresentationSource.FromVisual(this).CompositionTarget.TransformFromDevice; var mousePos = transform.Transform(new Point(pos.X, pos.Y)); var win = new NotifyCreateWindow(); win.Left = mousePos.X; win.Top = mousePos.Y; if (win.ShowDialog() == false) { return; } var notifyName = win.NotifyTextBox.Text; AnimNotifyNodeControl node = new AnimNotifyNodeControl(); node.Height = AnimSlider.ActualHeight; node.NodeName = notifyName; node.Pos = rightClickMousePoint.X - node.NodeWidth * 0.5; AnimSlider.AddNofity(node); }
private void NotifyTrack_OnNotifyDropDown(object sender, AnimNotifyEditControlEventArgs e) { mPickedNotifyNodeCtrl = null; }
private void NotifyTrack_OnNotifyPickUp(object sender, AnimNotifyEditControlEventArgs e) { mPickedNotifyNodeCtrl = e.Ctrl; }
public AnimNotifyEditControlEventArgs(int trackNum, AnimNotifyNodeControl ctrl) { TrackNum = trackNum; Ctrl = ctrl; }
public void MoveNotifyNode(AnimNotifyNodeControl notifyNode, double delta) { notifyNode.Pos += delta; notifyNode.LocationFrame = (notifyNode.Pos - mTicksList[0].Pos) / TicksScaleInterval; notifyNode.CGfxNotify.NotifyTime = (long)(notifyNode.LocationFrame / Maximum * AnimationDuration); }
public AnimNotifySliderEventArgs(AnimNotifyNodeControl ctrl, Point point = default(Point)) { Ctrl = ctrl; }