[NUI] Move 'using's outside of namespace
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Transition / TransitionItemBase.cs
index 2819f67..171bf44 100755 (executable)
  *
  */
 
+using System;
+using System.ComponentModel;
+using Tizen.NUI.BaseComponents;
+
 namespace Tizen.NUI
 {
-    using System;
-    using System.ComponentModel;
-    using Tizen.NUI.BaseComponents;
-
     internal class TransitionItemBase : BaseHandle
     {
         /// <summary>
         /// Creates an initialized TransitionItemBase.<br />
         /// </summary>
-        public TransitionItemBase(View target, bool isEntering, TimePeriod timePeriod, AlphaFunction alphaFunction) : this(Interop.TransitionItemBase.New(/*target.SwigCPtr, isEntering, timePeriod.SwigCPtr*/), true)
+        public TransitionItemBase(View target, bool isAppearing, TimePeriod timePeriod, AlphaFunction alphaFunction) : this(Interop.TransitionItemBase.New(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            
+            AppearingTransition = isAppearing;
+            TimePeriod = timePeriod;
             AlphaFunction = alphaFunction;
         }
 
@@ -37,79 +40,61 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Gets or sets the duration in milliseconds of the transition.
+        /// Gets or sets the TimePeriod
         /// </summary>
-        public int Duration
+        public TimePeriod TimePeriod
         {
             set
             {
-                Interop.TransitionItemBase.SetDuration(SwigCPtr, MilliSecondsToSeconds(value));
+                Interop.TransitionItemBase.SetTimePeriod(SwigCPtr, value.SwigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                float ret = Interop.TransitionItemBase.GetDuration(SwigCPtr);
+                TimePeriod ret = new TimePeriod(Interop.TransitionItemBase.GetTimePeriod(SwigCPtr), true);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return SecondsToMilliSeconds(ret);
+                return ret;
             }
         }
 
         /// <summary>
-        /// Gets or sets the delay in milliseconds of the transition.
+        /// Gets or sets the AlphaFunction
         /// </summary>
-        public int Delay
+        public AlphaFunction AlphaFunction
         {
             set
             {
-                Interop.TransitionItemBase.SetDelay(SwigCPtr, MilliSecondsToSeconds(value));
+                Interop.TransitionItemBase.SetAlphaFunction(SwigCPtr, value.SwigCPtr);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
             get
             {
-                float ret = Interop.TransitionItemBase.GetDelay(SwigCPtr);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return SecondsToMilliSeconds(ret);
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the TimePeriod
-        /// </summary>
-        public TimePeriod TimePeriod
-        {
-            set
-            {
-                Interop.TransitionItemBase.SetTimePeriod(SwigCPtr, value.SwigCPtr);
+                AlphaFunction ret = new AlphaFunction(Interop.TransitionItemBase.GetAlphaFunction(SwigCPtr), true);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
             }
         }
 
         /// <summary>
-        /// Gets or sets the AlphaFunction
+        /// Gets or sets whether the View moves with child or not.
         /// </summary>
-        public AlphaFunction AlphaFunction
+        public bool TransitionWithChild
         {
             set
             {
-                Interop.TransitionItemBase.SetAlphaFunction(SwigCPtr, value.SwigCPtr);
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-            get
-            {
-                AlphaFunction ret = new AlphaFunction(Interop.TransitionItemBase.GetAlphaFunction(SwigCPtr), true);
+                Interop.TransitionItemBase.TransitionWithChild(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-                return ret;
             }
         }
 
         /// <summary>
-        /// Gets or sets whether the View moves with child or not.
+        /// Gets or sets whether this transition is appearing transition or not.
         /// </summary>
-        public bool TransitionWithChild
+        public bool AppearingTransition
         {
             set
             {
-                Interop.TransitionItemBase.TransitionWithChild(SwigCPtr, value);
+                Interop.TransitionItemBase.SetAppearingTransition(SwigCPtr, value);
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
         }
@@ -133,11 +118,6 @@ namespace Tizen.NUI
             return ret;
         }
 
-        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;
-        }
-
         internal TransitionItemBase(TransitionItemBase handle) : this(Interop.TransitionItemBase.NewTransitionItemBase(TransitionItemBase.getCPtr(handle)), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();