Fix Transit.Pause
authorsung-su.kim <sung-su.kim@samsung.com>
Wed, 5 Jul 2017 07:29:20 +0000 (16:29 +0900)
committersung-su.kim <sung-su.kim@samsung.com>
Wed, 5 Jul 2017 07:30:47 +0000 (16:30 +0900)
- TCAPI-2548
- Remove Transit.Pause property
- Add Transit.Pause() method
- Add Transit.Resume() method

Change-Id: I9703ed2922f769c0c08efb9910acb79cf0cd5963

src/ElmSharp/ElmSharp/Transit.cs

index 2b2dc00..3281b6f 100755 (executable)
@@ -172,21 +172,6 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Pause/Resume the transition.
-        /// </summary>
-        public bool Pause
-        {
-            get
-            {
-                return Interop.Elementary.elm_transit_paused_get(_handle);
-            }
-            set
-            {
-                Interop.Elementary.elm_transit_paused_set(_handle, value);
-            }
-        }
-
-        /// <summary>
         /// Get the time progression of the animation (a double value between 0.0 and 1.0).
         /// The value returned is a fraction(current time / total time).
         /// It represents the progression position relative to the total.
@@ -246,6 +231,24 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Pause the transition.
+        /// </summary>
+        public void Pause()
+        {
+            if (Interop.Elementary.elm_transit_paused_get(_handle) == false)
+                Interop.Elementary.elm_transit_paused_set(_handle, true);
+        }
+
+        /// <summary>
+        /// Resume the transition.
+        /// </summary>
+        public void Resume()
+        {
+            if (Interop.Elementary.elm_transit_paused_get(_handle) == true)
+                Interop.Elementary.elm_transit_paused_set(_handle, false);
+        }
+
+        /// <summary>
         /// Get the current chained transit list.
         /// </summary>
         /// <remarks>Cannot add the duplicate transit.</remarks>