[NUI] Fix LineWrapMode issue 58/161758/1
authorhuiyu,eun <huiyu.eun@samsung.com>
Wed, 22 Nov 2017 11:08:13 +0000 (20:08 +0900)
committerhuiyu,eun <huiyu.eun@samsung.com>
Mon, 27 Nov 2017 09:04:42 +0000 (18:04 +0900)
Change-Id: Iec6b63b6d5a979a44b602b96cef221997e766589
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs

index a1412bc..d75cdc4 100755 (executable)
@@ -1415,38 +1415,16 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
-                string temp;
+                int temp;
                 if(GetProperty(TextEditor.Property.LINE_WRAP_MODE).Get(out temp) == false)
                 {
                     NUILog.Error("LineWrapMode get error!");
                 }
-                switch (temp)
-                {
-                    case "WRAP_MODE_WORD":
-                    return LineWrapMode.Word;
-                    case "WRAP_MODE_CHARACTER":
-                    return LineWrapMode.Character;
-                    default:
-                    return LineWrapMode.Word;
-                }
+                return (LineWrapMode)temp;
             }
             set
             {
-                string temp = "";
-                switch (value)
-                {
-                    case LineWrapMode.Word:
-                    {
-                        temp = "WRAP_MODE_WORD";
-                        break;
-                    }
-                    case LineWrapMode.Character:
-                    {
-                        temp = "WRAP_MODE_CHARACTER";
-                        break;
-                    }
-                }
-                SetProperty(TextEditor.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue(temp));
+                SetProperty(TextEditor.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)value));
             }
         }
 
index 7f11c31..8485438 100755 (executable)
@@ -825,38 +825,16 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
-                string temp;
+                int temp;
                 if(GetProperty(TextLabel.Property.LINE_WRAP_MODE).Get(out temp) == false)
                 {
                     NUILog.Error("LineWrapMode get error!");
                 }
-                switch (temp)
-                {
-                    case "WRAP_MODE_WORD":
-                    return LineWrapMode.Word;
-                    case "WRAP_MODE_CHARACTER":
-                    return LineWrapMode.Character;
-                    default:
-                    return LineWrapMode.Word;
-                }
+                return (LineWrapMode)temp;
             }
             set
             {
-                string temp = "";
-                switch (value)
-                {
-                    case LineWrapMode.Word:
-                    {
-                        temp = "WRAP_MODE_WORD";
-                        break;
-                    }
-                    case LineWrapMode.Character:
-                    {
-                        temp = "WRAP_MODE_CHARACTER";
-                        break;
-                    }
-                }
-                SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue(temp));
+                SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)value));
             }
         }
     }