コード例 #1
0
        public StringKeyframeView(TLStringKeyframe kf, StringTrackView 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.MouseMove += Background_MouseMove;

            Label.FontSize = 12;
            Label.ID       = "label";
            Label.CustomAttributes["class"] = "skffont";
            Label.Text       = "text";
            Label.Transforms = new SvgTransformCollection();
            Label.Transforms.Add(new SvgScale(1, 1));
            Label.Change += Label_Change;

            CollapsedView.ReferencedElement = new Uri("#" + Parent.Model.GetID() + "_CKF", UriKind.Relative);
            CollapsedView.ID = "fg";
            CollapsedView.CustomAttributes["class"] = "ckf";
            CollapsedView.MouseDown += Background_MouseDown;
            CollapsedView.MouseUp   += Background_MouseUp;
            CollapsedView.MouseMove += Background_MouseMove;
        }
コード例 #2
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 TLStringKeyframe(x, "text " + Keyframes.Count);
                var cmd = Command.Add(this.Model.Keyframes, kf);
                History.Insert(cmd);
            }
        }
コード例 #3
0
 void Keyframes_Added(IViewableCollection <TLStringKeyframe> collection, TLStringKeyframe item)
 {
     //sort the keyframes and assign neighbours
     SortAndAssignNeighbours();
 }
コード例 #4
0
ファイル: StringTrackView.cs プロジェクト: stahlnow/Timeliner
        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 TLStringKeyframe(x, "text " + Keyframes.Count);
                var cmd = Command.Add(this.Model.Keyframes, kf);
                History.Insert(cmd);
            }
        }
コード例 #5
0
ファイル: StringTrack.cs プロジェクト: stahlnow/Timeliner
 void Keyframes_Added(IViewableCollection<TLStringKeyframe> collection, TLStringKeyframe item)
 {
     //sort the keyframes and assign neighbours
     SortAndAssignNeighbours();
 }