コード例 #1
0
 private void DisposeCurve()
 {
     if (Curve == null)
     {
         return;
     }
     Curve.Edited -= OnKeyframesEdited;
     Curve.Dispose();
     Curve     = null;
     _splitter = null;
 }
コード例 #2
0
        private void CreateCurve(Type propertyType)
        {
            var curveEditorType = typeof(CurveEditor <>).MakeGenericType(propertyType);

            Curve               = (CurveEditorBase)Activator.CreateInstance(curveEditorType);
            Curve.EnableZoom    = CurveEditorBase.UseMode.Vertical;
            Curve.EnablePanning = CurveEditorBase.UseMode.Vertical;
            Curve.ScrollBars    = ScrollBars.Vertical;
            Curve.Parent        = Timeline?.MediaPanel;
            Curve.FPS           = Timeline?.FramesPerSecond;
            Curve.Edited       += OnKeyframesEdited;
            Curve.UnlockChildrenRecursive();
            UpdateCurve();
        }
コード例 #3
0
 /// <summary>
 /// Creates the curve.
 /// </summary>
 /// <param name="propertyType">Type of the property (keyframes value).</param>
 /// <param name="curveEditorType">Type of the curve editor (generic type of the curve editor).</param>
 protected void CreateCurve(Type propertyType, Type curveEditorType)
 {
     curveEditorType     = curveEditorType.MakeGenericType(propertyType);
     Curve               = (CurveEditorBase)Activator.CreateInstance(curveEditorType);
     Curve.EnableZoom    = CurveEditorBase.UseMode.Vertical;
     Curve.EnablePanning = CurveEditorBase.UseMode.Vertical;
     Curve.ScrollBars    = ScrollBars.Vertical;
     Curve.Parent        = Timeline?.MediaPanel;
     Curve.FPS           = Timeline?.FramesPerSecond;
     Curve.Edited       += OnKeyframesEdited;
     Curve.EditingStart += OnCurveEditingStart;
     Curve.EditingEnd   += OnCurveEditingEnd;
     if (Timeline != null)
     {
         Curve.UnlockChildrenRecursive();
         UpdateCurve();
     }
 }