示例#1
0
 void Keyframes_Added(IViewableCollection <TLValueKeyframe> collection, TLValueKeyframe item)
 {
     if (!Loading)
     {
         SortAndAssignNeighbours();
     }
 }
示例#2
0
        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;
        }
示例#3
0
        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;
        }
示例#4
0
        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);
            }
        }
示例#5
0
 void Keyframes_Removed(IViewableCollection <TLValueKeyframe> collection, TLValueKeyframe item)
 {
     SortAndAssignNeighbours();
 }
示例#6
0
 public TLCurve(string name, TLValueKeyframe start, TLValueKeyframe end)
     : base(name)
 {
     Start = start;
     End   = end;
 }
示例#7
0
 public TLCurve(TLValueKeyframe start, TLValueKeyframe end)
     : this(IDGenerator.NewID, start, end)
 {
 }
示例#8
0
 void Keyframes_Removed(IViewableCollection<TLValueKeyframe> collection, TLValueKeyframe item)
 {
     SortAndAssignNeighbours();
 }
示例#9
0
 void Keyframes_Added(IViewableCollection<TLValueKeyframe> collection, TLValueKeyframe item)
 {
     if (!Loading)
         SortAndAssignNeighbours();
 }
示例#10
0
 public TLCurve(string name, TLValueKeyframe start, TLValueKeyframe end)
     : base(name)
 {
     Start = start;
     End = end;
 }
示例#11
0
 public TLCurve(TLValueKeyframe start, TLValueKeyframe end)
     : this(IDGenerator.NewID, start, end)
 {
 }
示例#12
0
        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);
            }
        }