From: EverLEEst(SangHyeon Lee) Date: Fri, 12 Nov 2021 08:31:13 +0000 (+0900) Subject: Revert "[NUI][EXaml] Support DP and PX in EXaml" X-Git-Tag: accepted/tizen/unified/20231205.024657~1304 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db252f937842d63da0664ac13b23d0a3748aa1ee;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Revert "[NUI][EXaml] Support DP and PX in EXaml" This reverts commit e7a65c8e80864158f3fb17d6ce613ec3d35a4701. --- diff --git a/src/Tizen.NUI/src/internal/EXaml/Action/RootAction.cs b/src/Tizen.NUI/src/internal/EXaml/Action/RootAction.cs index f177359..32192f3 100755 --- a/src/Tizen.NUI/src/internal/EXaml/Action/RootAction.cs +++ b/src/Tizen.NUI/src/internal/EXaml/Action/RootAction.cs @@ -126,12 +126,6 @@ namespace Tizen.NUI.EXaml globalDataList.Operations.Add(operation); }; - createOperations[(int)EXamlOperationType.CreateDPObject] = (GlobalDataList globalDataList, List opInfo) => - { - var operation = new CreateDPObject(globalDataList, opInfo); - globalDataList.Operations.Add(operation); - }; - createOperations[(int)EXamlOperationType.CreateArrayObject] = (GlobalDataList globalDataList, List opInfo) => { var operation = new CreateArrayObject(globalDataList, opInfo); diff --git a/src/Tizen.NUI/src/internal/EXaml/Operation/CreateDPObject.cs b/src/Tizen.NUI/src/internal/EXaml/Operation/CreateDPObject.cs deleted file mode 100755 index 3a08193..0000000 --- a/src/Tizen.NUI/src/internal/EXaml/Operation/CreateDPObject.cs +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright(c) 2021 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Text; -using Tizen.NUI.BaseComponents; -using Tizen.NUI.Binding; -using Tizen.NUI.Binding.Internals; -using Tizen.NUI.Xaml; - -namespace Tizen.NUI.EXaml -{ - internal class CreateDPObject : Operation - { - public CreateDPObject(GlobalDataList globalDataList, List operationInfos) - { - this.valueStr = operationInfos[0] as string; - this.typeIndex = (int)operationInfos[1]; - this.globalDataList = globalDataList; - } - - private GlobalDataList globalDataList; - - public void Do() - { - if (0 > typeIndex) - { - object dpValue = null; - - switch (typeIndex) - { - case -3: - dpValue = Convert.ToInt16(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -4: - dpValue = Convert.ToInt32(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -5: - dpValue = Convert.ToInt64(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -7: - dpValue = Convert.ToUInt16(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -8: - dpValue = Convert.ToUInt32(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -9: - dpValue = Convert.ToInt64(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -15: - dpValue = Convert.ToSingle(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - - case -16: - dpValue = Convert.ToDouble(GraphicsTypeManager.Instance.ConvertScriptToPixel(valueStr)); - break; - } - - if (null == dpValue) - { - throw new Exception($"Can't convert {valueStr} to DP value of typeIndex {typeIndex}"); - } - - globalDataList.GatheredInstances.Add(dpValue); - } - else - { - var type = globalDataList.GatheredTypes[typeIndex]; - throw new Exception($"Can't convert DP value of type {type.FullName}"); - } - } - - private int typeIndex; - private string valueStr; - } -} diff --git a/src/Tizen.NUI/src/internal/EXaml/Operation/GatherAssembly.cs b/src/Tizen.NUI/src/internal/EXaml/Operation/GatherAssembly.cs index fdd5a22..bdf9a46 100755 --- a/src/Tizen.NUI/src/internal/EXaml/Operation/GatherAssembly.cs +++ b/src/Tizen.NUI/src/internal/EXaml/Operation/GatherAssembly.cs @@ -47,11 +47,6 @@ namespace Tizen.NUI.EXaml break; } } - - if (null == assembly) - { - throw new Exception($"Can't find assembly {assemblyName}"); - } } private string assemblyName; diff --git a/src/Tizen.NUI/src/internal/EXaml/Operation/GatherMethod.cs b/src/Tizen.NUI/src/internal/EXaml/Operation/GatherMethod.cs index 22eb60f..418f2ef 100755 --- a/src/Tizen.NUI/src/internal/EXaml/Operation/GatherMethod.cs +++ b/src/Tizen.NUI/src/internal/EXaml/Operation/GatherMethod.cs @@ -82,11 +82,6 @@ namespace Tizen.NUI.EXaml var type = globalDataList.GatheredTypes[typeIndex]; var method = type.GetRuntimeMethods().FirstOrDefault(isMatch); - - if (null == method) - { - throw new Exception($"Can't get method {methodName} with {paramTypeList.Count} params"); - } globalDataList.GatheredMethods.Add(method); } diff --git a/src/Tizen.NUI/src/internal/EXaml/Operation/SetProperty.cs b/src/Tizen.NUI/src/internal/EXaml/Operation/SetProperty.cs index cf020ff..d741073 100755 --- a/src/Tizen.NUI/src/internal/EXaml/Operation/SetProperty.cs +++ b/src/Tizen.NUI/src/internal/EXaml/Operation/SetProperty.cs @@ -49,7 +49,7 @@ namespace Tizen.NUI.EXaml if (null == property) { - throw new Exception(String.Format("Can't find property {0} in type {1}", property.Name, instance.GetType().FullName)); + throw new Exception(String.Format("Can't find property in type {0}", instance.GetType().FullName)); } if (null == property.SetMethod) diff --git a/src/Tizen.NUI/src/internal/EXaml/Utility/EXamlOperationType.cs b/src/Tizen.NUI/src/internal/EXaml/Utility/EXamlOperationType.cs index 20b21b6..0165666 100755 --- a/src/Tizen.NUI/src/internal/EXaml/Utility/EXamlOperationType.cs +++ b/src/Tizen.NUI/src/internal/EXaml/Utility/EXamlOperationType.cs @@ -30,7 +30,6 @@ namespace Tizen.NUI.EXaml GatherBindableProperty, CreateObject, CreateArrayObject, - CreateDPObject, CreateDataTemplate, GetStaticObject, GetTypeObject,