예제 #1
0
        public TransitionItemBase GetTransitionAt(uint index)
        {
            //to fix memory leak issue, match the handle count with native side.
            IntPtr             cPtr = Interop.TransitionSet.GetTransitionAt(SwigCPtr, index);
            HandleRef          CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
            TransitionItemBase ret  = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as TransitionItemBase;

            if (cPtr != null && ret == null)
            {
                ret = new TransitionItemBase(cPtr, false);
                if (NDalicPINVOKE.SWIGPendingException.Pending)
                {
                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                }
                return(ret);
            }
            Interop.BaseHandle.DeleteBaseHandle(CPtr);
            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
예제 #2
0
 internal TransitionItemBase(TransitionItemBase handle) : this(Interop.TransitionItemBase.NewTransitionItemBase(TransitionItemBase.getCPtr(handle)), true)
 {
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #3
0
        private TransitionSet CreateTransitionSet()
        {
            TransitionSet transitionSet = new TransitionSet();

            if (animationType != AnimationType.None)
            {
                TransitionItemBase transitionItem = null;
                switch (animationType)
                {
                case AnimationType.SeamlessAnimationAppearing:
                    transitionItem = defaultTransition.CreateTransition(ApplicationTransitionManager.Instance.SourceView, providerImage, true);
                    break;

                case AnimationType.SeamlessAnimationDisappearing:
                    transitionItem = defaultTransition.CreateTransition(providerImage, ApplicationTransitionManager.Instance.SourceView, false);
                    break;

                case AnimationType.TransitionBaseAppearing:
                    transitionItem = AppearingTransition.CreateTransition(providerImage, true);
                    break;

                case AnimationType.TransitionBaseDisappearing:
                    transitionItem = DisappearingTransition.CreateTransition(providerImage, false);
                    break;
                }
                if (transitionItem != null)
                {
                    transitionSet.AddTransition(transitionItem);
                    transitionSet.Finished += TransitionSetFinished;
                    transitionItem.Dispose();
                    transitionItem = null;
                }
            }
            return(transitionSet);
        }
예제 #4
0
 public void AddTransition(TransitionItemBase transition)
 {
     Interop.TransitionSet.AddTransition(SwigCPtr, transition.SwigCPtr);
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
예제 #5
0
        internal TransitionItemBase Assign(TransitionItemBase rhs)
        {
            TransitionItemBase ret = new TransitionItemBase(Interop.TransitionItemBase.Assign(SwigCPtr, TransitionItemBase.getCPtr(rhs)), false);

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
예제 #6
0
        /// <summary>
        /// Downcasts a handle to TransitionItemBase handle.<br />
        /// If handle points to an TransitionItemBase object, the downcast produces a valid handle.<br />
        /// If not, the returned handle is left uninitialized.<br />
        /// </summary>
        /// <param name="handle">Handle to an object.</param>
        /// <returns>Handle to an TransitionItemBase object or an uninitialized handle.</returns>
        /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
        public static TransitionItemBase DownCast(BaseHandle handle)
        {
            if (handle == null)
            {
                throw new ArgumentNullException(nameof(handle));
            }
            TransitionItemBase ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TransitionItemBase;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
예제 #7
0
 public void AddTransition(TransitionItemBase transition)
 {
     if (transition is TransitionGroupItem)
     {
         TransitionGroupItem transitionGroup = transition as TransitionGroupItem;
         for (int index = 0; index < transitionGroup.TransitionCount; ++index)
         {
             this.AddTransition(transitionGroup.GetTransitionAt(index));
         }
     }
     else
     {
         Interop.TransitionSet.AddTransition(SwigCPtr, transition.SwigCPtr);
         if (NDalicPINVOKE.SWIGPendingException.Pending)
         {
             throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
     }
 }
예제 #8
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TransitionItemBase obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr);
 }