From: huiyu,eun Date: Wed, 22 Nov 2017 11:08:13 +0000 (+0900) Subject: [NUI] Fix LineWrapMode issue X-Git-Tag: 5.0.0-preview1-00385^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7210a4d9f09f13de444cabcdc69998744a9c19f0;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix LineWrapMode issue Change-Id: Iec6b63b6d5a979a44b602b96cef221997e766589 Signed-off-by: huiyu,eun --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 3702169d2..e4fd29860 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -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)); } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 3d685f511..6ddfd6bb9 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -822,38 +822,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)); } } }