void Keyframes_Added(IViewableCollection <TLValueKeyframe> collection, TLValueKeyframe item) { if (!Loading) { SortAndAssignNeighbours(); } }
public ValueKeyframeView(TLValueKeyframe kf, ValueTrackView trackview) : base(kf, trackview) { //configure svg Background.ReferencedElement = new Uri("#" + Parent.Model.GetID() + "_KF", UriKind.Relative); Background.ID = "bg"; Background.CustomAttributes["class"] = "kf"; Background.MouseDown += Background_MouseDown; Background.MouseUp += Background_MouseUp; Background.MouseOver += Background_MouseOver; Background.MouseOut += Background_MouseOut; Background.MouseMove += Background_MouseMove; Label.FontSize = 12; Label.ID = "label"; Label.CustomAttributes["class"] = "kffont"; Label.Visible = false; Label.Transforms = new SvgTransformCollection(); Label.Transforms.Add(new SvgScale(1, 1)); CollapsedView.ReferencedElement = new Uri("#" + Parent.Model.GetID() + "_NE", UriKind.Relative); CollapsedView.ID = "fg"; CollapsedView.CustomAttributes["class"] = "ckf"; CollapsedView.MouseDown += Background_MouseDown; CollapsedView.MouseUp += Background_MouseUp; CollapsedView.MouseOver += Background_MouseOver; CollapsedView.MouseOut += Background_MouseOut; CollapsedView.MouseMove += Background_MouseMove; }
void Background_MouseClick(object sender, MouseArg e) { if (e.ClickCount >= 2) { var x = FRuler.XPosToTime(e.x); var y = YPosToValue(e.y); var kf = new TLValueKeyframe(x, y); var cmd = Command.Add(this.Model.Keyframes, kf); History.Insert(cmd); } }
void Keyframes_Removed(IViewableCollection <TLValueKeyframe> collection, TLValueKeyframe item) { SortAndAssignNeighbours(); }
public TLCurve(string name, TLValueKeyframe start, TLValueKeyframe end) : base(name) { Start = start; End = end; }
public TLCurve(TLValueKeyframe start, TLValueKeyframe end) : this(IDGenerator.NewID, start, end) { }
void Keyframes_Removed(IViewableCollection<TLValueKeyframe> collection, TLValueKeyframe item) { SortAndAssignNeighbours(); }
void Keyframes_Added(IViewableCollection<TLValueKeyframe> collection, TLValueKeyframe item) { if (!Loading) SortAndAssignNeighbours(); }
void Background_MouseClick(object sender, MouseArg e) { if(e.ClickCount >= 2) { var x = FRuler.XPosToTime(e.x); var y = YPosToValue(e.y); var kf = new TLValueKeyframe(x, y); var cmd = Command.Add(this.Model.Keyframes, kf); History.Insert(cmd); } }