Ejemplo n.º 1
0
        public override void editing()
        {
            LayerState undo = LayerState.CreateAndCapture();
            String     currentTransparencyState = TransparencyController.ActiveTransparencyState;

            TransparencyController.ActiveTransparencyState = TransparencyState;
            LayerState.timedApply(MedicalConfig.CameraTransitionTime);
            TransparencyController.ActiveTransparencyState = currentTransparencyState;
            TimelineController.LayerController.pushUndoState(undo);
        }
Ejemplo n.º 2
0
 public override void skipTo(float timelineTime)
 {
     if (TransparencyController.hasTransparencyState(TransparencyState))
     {
         if (timelineTime <= EndTime)
         {
             float  currentPosition          = timelineTime - StartTime;
             String currentTransparencyState = TransparencyController.ActiveTransparencyState;
             TransparencyController.ActiveTransparencyState = TransparencyState;
             float percent = 1.0f;
             if (Duration != 0.0f)
             {
                 percent = currentPosition / Duration;
             }
             LayerState.instantlyApplyBlendPercent(percent);
             LayerState.timedApply(Duration - currentPosition);
             TransparencyController.ActiveTransparencyState = currentTransparencyState;
         }
         else
         {
             LayerState.instantlyApply();
             finished = true;
         }
     }
     else
     {
         //Could not find the specified window, so just apply to the active window.
         if (timelineTime <= EndTime)
         {
             float currentPosition = timelineTime - StartTime;
             TransparencyController.ActiveTransparencyState = TransparencyState;
             float percent = 1.0f;
             if (Duration != 0.0f)
             {
                 percent = currentPosition / Duration;
             }
             LayerState.instantlyApplyBlendPercent(percent);
             LayerState.timedApply(Duration - currentPosition);
         }
         else
         {
             LayerState.instantlyApply();
             finished = true;
         }
     }
 }
Ejemplo n.º 3
0
 public override void started(float timelineTime, Clock clock)
 {
     if (TransparencyController.hasTransparencyState(TransparencyState))
     {
         String currentTransparencyState = TransparencyController.ActiveTransparencyState;
         TransparencyController.ActiveTransparencyState = TransparencyState;
         LayerState.timedApply(Duration);
         TransparencyController.ActiveTransparencyState = currentTransparencyState;
         finished = false;
     }
     else
     {
         //Could not find the specified window, so just apply to the active window.
         LayerState.timedApply(Duration);
         finished = false;
     }
 }