+++ /dev/null
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26730.16
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NUIsamples", "NUIsamples\NUIsamples.csproj", "{9FA72502-47A9-40E8-8265-F6AF63961051}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI", "..\src\Tizen.NUI\Tizen.NUI.csproj", "{F7BFC7DE-9994-4237-B94C-AF07FF71FB1B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Common", "..\src\Tizen.Applications.Common\Tizen.Applications.Common.csproj", "{A37D3703-06F4-4533-B183-108D8CDEDF31}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\src\Tizen\Tizen.csproj", "{8BFE2A6F-5BB5-4A25-86E1-8448BF03C6F2}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\src\Tizen.Log\Tizen.Log.csproj", "{743831B0-B40E-4A10-A50D-C4C31E895379}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.SystemSettings", "..\src\Tizen.System.SystemSettings\Tizen.System.SystemSettings.csproj", "{0DF75E1B-C3FF-4E63-A654-8579075C0271}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9FA72502-47A9-40E8-8265-F6AF63961051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9FA72502-47A9-40E8-8265-F6AF63961051}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9FA72502-47A9-40E8-8265-F6AF63961051}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9FA72502-47A9-40E8-8265-F6AF63961051}.Release|Any CPU.Build.0 = Release|Any CPU
- {F7BFC7DE-9994-4237-B94C-AF07FF71FB1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F7BFC7DE-9994-4237-B94C-AF07FF71FB1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F7BFC7DE-9994-4237-B94C-AF07FF71FB1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F7BFC7DE-9994-4237-B94C-AF07FF71FB1B}.Release|Any CPU.Build.0 = Release|Any CPU
- {A37D3703-06F4-4533-B183-108D8CDEDF31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A37D3703-06F4-4533-B183-108D8CDEDF31}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A37D3703-06F4-4533-B183-108D8CDEDF31}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A37D3703-06F4-4533-B183-108D8CDEDF31}.Release|Any CPU.Build.0 = Release|Any CPU
- {8BFE2A6F-5BB5-4A25-86E1-8448BF03C6F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8BFE2A6F-5BB5-4A25-86E1-8448BF03C6F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8BFE2A6F-5BB5-4A25-86E1-8448BF03C6F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8BFE2A6F-5BB5-4A25-86E1-8448BF03C6F2}.Release|Any CPU.Build.0 = Release|Any CPU
- {743831B0-B40E-4A10-A50D-C4C31E895379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {743831B0-B40E-4A10-A50D-C4C31E895379}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {743831B0-B40E-4A10-A50D-C4C31E895379}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {743831B0-B40E-4A10-A50D-C4C31E895379}.Release|Any CPU.Build.0 = Release|Any CPU
- {0DF75E1B-C3FF-4E63-A654-8579075C0271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0DF75E1B-C3FF-4E63-A654-8579075C0271}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0DF75E1B-C3FF-4E63-A654-8579075C0271}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0DF75E1B-C3FF-4E63-A654-8579075C0271}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {42B5CE69-D380-4AAF-B50B-47C0F6702963}
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<Project>
- <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
- <PropertyGroup Label="Globals">
- <TizenProjectExtensionsPath>$(MSBuildExtensionsPath)\Tizen\VisualStudio\</TizenProjectExtensionsPath>
- </PropertyGroup>
-
- <Import Project="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props" Condition="Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props')" />
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.0</TargetFramework>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>TizenTVNUI.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugType>portable</DebugType>
- <DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;DEBUG_ON;</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>None</DebugType>
- </PropertyGroup>
-
- <ItemGroup>
- <Folder Include="lib\" />
- <Folder Include="res\" />
- </ItemGroup>
-
- <ItemGroup>
- <PackageReference Include="Tizen.NET.Sdk" Version="1.0.0-pre2" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\..\src\Tizen.Log\Tizen.Log.csproj" />
- <ProjectReference Include="..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
- </ItemGroup>
-
- <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
- <Import Project="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets" Condition="Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets')" />
-
- <!-- Install Check 'Visual Studio for Tizen' for developing on Visual Studio -->
- <Target Name="TizenVsixInstallCheck" BeforeTargets="CompileDesignTime">
- <Warning Condition="!Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props')" Text="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props is not exist.
 you need to check if 'Visual Studio for Tizen' is installed" />
- <Warning Condition="!Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets')" Text="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets is not exist.\
 you need to check if 'Visual Studio for Tizen' is installed" />
- </Target>
-</Project>
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- id="Layer_1"
- x="0px"
- y="0px"
- viewBox="0 0 306.90988 416.79828"
- xml:space="preserve"
- inkscape:version="0.48.4 r9939"
- width="100%"
- height="100%"
- sodipodi:docname="Kid1.svg"><metadata
- id="metadata185"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
- id="defs183" /><sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="640"
- inkscape:window-height="480"
- id="namedview181"
- showgrid="false"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:zoom="0.28032166"
- inkscape:cx="152.20465"
- inkscape:cy="184.87264"
- inkscape:window-x="75"
- inkscape:window-y="34"
- inkscape:window-maximized="0"
- inkscape:current-layer="Layer_1" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 192.28065,343.14765 c 0,0 -4.5,75.5 37.5,71 42,-4.5 11.5,-75.5 11.5,-75.5 l -49,4.5 z"
- id="path3"
- inkscape:connector-curvature="0" /><path
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 229.78065,414.14765 c 24.024,-2.574 24.325,-26.903 20.184,-47.259 l -56.117,5.805 c 3.172,20.614 12.003,44.018 35.933,41.454 z"
- id="path5"
- inkscape:connector-curvature="0" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 113.60765,343.14765 c 0,0 -23.087995,69 14,73 37.088,4 48,-73 48,-73 h -62 z"
- id="path7"
- inkscape:connector-curvature="0" /><path
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 169.15465,370.76265 -60.625,-7.118 c -3.745,20.685 -4.689,49.94 19.078,52.503 21.993,2.372 34.78,-23.738 41.547,-45.385 z"
- id="path9"
- inkscape:connector-curvature="0" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 117.10565,371.73465 39.895,2.68 c 0,0 -7.065,27.803 -23.798,24.788 -16.733,-3.015 -16.097,-27.468 -16.097,-27.468 z"
- id="path11"
- inkscape:connector-curvature="0" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 206.27865,381.65765 35.399,-5.164 c 0,0 2.531,26.234 -10.49,26.241 -18.543,0.011 -24.909,-21.077 -24.909,-21.077 z"
- id="path13"
- inkscape:connector-curvature="0" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 121.49165,210.92765 c -24.560995,5.263 -52.631995,5.263 -52.631995,5.263 l 5.354,60.772 25.859995,-5.032 c 0,0 64.328,-18.197 62.574,-34.16 -2.104,-19.138 -16.595,-32.106 -41.156,-26.843 z"
- id="path15"
- inkscape:connector-curvature="0" /><path
- style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 231.14065,228.64765 c -10.143,-34.251 -65.789,-51.053 -65.789,-51.053 0,0 -19.298,28.07 -43.86,33.333 -1.209,0.259 -2.428,0.502 -3.65,0.736 l -20.035995,60.709 2.267995,-0.441 -16.300995,80.54 184.714995,-4.731 c 0,10e-4 -25.566,-79.313 -37.347,-119.093 z"
- id="path17"
- inkscape:connector-curvature="0" /><line
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="110.72466"
- y1="311.29565"
- x2="104.40065"
- y2="352.30963"
- id="line19" /><polygon
- style="fill:#666666;stroke:#000000;stroke-miterlimit:10"
- points="390.823,464.081 392.798,470.374 237.225,476.667 237.225,468.729 "
- id="polygon21"
- transform="translate(-145.43535,-189.01935)" /><linearGradient
- id="SVGID_1_"
- gradientUnits="userSpaceOnUse"
- x1="317.35651"
- y1="383.66669"
- x2="317.35651"
- y2="199.5519"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0"
- style="stop-color:#402A04"
- id="stop24" /><stop
- offset="1"
- style="stop-color:#7F5100"
- id="stop26" /></linearGradient><path
- style="fill:url(#SVGID_1_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="M 172.97165,196.01565 H 63.267655 c 0,0 -54.6040005,-192.1050008 109.704995,-188.5960008 164.309,3.5089998 106.414,188.5960008 106.414,188.5960008 h -106.415 z"
- id="path28"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_2_"
- gradientUnits="userSpaceOnUse"
- x1="317.6879"
- y1="298.16669"
- x2="317.6879"
- y2="399.66791"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0.0019"
- style="stop-color:#FFCA94"
- id="stop31" /><stop
- offset="1"
- style="stop-color:#E2A380"
- id="stop33" /></linearGradient><path
- style="fill:url(#SVGID_2_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 93.798655,65.647649 c 0,0 -48.605,145.281001 77.692995,145.281001 126.298,0 80.202,-145.281001 80.202,-145.281001 H 93.798655 z"
- id="path35"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_3_"
- gradientUnits="userSpaceOnUse"
- x1="316.33801"
- y1="383.66669"
- x2="316.33801"
- y2="199.5519"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0"
- style="stop-color:#402A04"
- id="stop38" /><stop
- offset="1"
- style="stop-color:#7F5100"
- id="stop40" /></linearGradient><path
- style="fill:url(#SVGID_3_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 108.82665,29.573649 c 0,0 -37.535995,22.859 -34.316995,82.359001 h 62.920995 c 0,0 7.255,-35.965001 7.255,-31.786001 0,4.179 3.509,31.786001 3.509,31.786001 h 48.246 V 87.833649 l 8.772,24.099001 h 62.281 c 0,0 0,-53.553001 -28.63,-82.359001 -28.072,0.877 -130.037,0 -130.037,0 z"
- id="path42"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_4_"
- gradientUnits="userSpaceOnUse"
- x1="195.0862"
- y1="372.3811"
- x2="217.894"
- y2="516.99213"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0"
- style="stop-color:#006178"
- id="stop45" /><stop
- offset="1"
- style="stop-color:#00495C"
- id="stop47" /></linearGradient><path
- style="fill:url(#SVGID_4_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 111.64765,331.69965 -70.387995,13.196 c -6.487,1.216 -12.79,-3.096 -14.006,-9.583 L 1.8536545,199.83065 c -1.21599995,-6.487 3.096,-12.79 9.5830005,-14.006 l 70.388,-13.196 c 6.487,-1.216 12.79,3.096 14.006,9.583 l 25.399995,135.482 c 1.217,6.487 -3.096,12.79 -9.583,14.006 z"
- id="path49"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_5_"
- gradientUnits="userSpaceOnUse"
- x1="197.17931"
- y1="393.6586"
- x2="218.5313"
- y2="505.75641"><stop
- offset="0"
- style="stop-color:#6BBBD0"
- id="stop52" /><stop
- offset="1"
- style="stop-color:#ACCCD4"
- id="stop54" /></linearGradient><polygon
- style="fill:url(#SVGID_5_);stroke:#000000;stroke-miterlimit:10"
- points="179.836,514.167 159.336,399.948 236.336,387.667 254.336,498.167 "
- id="polygon56"
- transform="translate(-145.43535,-189.01935)" /><linearGradient
- id="SVGID_6_"
- gradientUnits="userSpaceOnUse"
- x1="207.9456"
- y1="466.41"
- x2="201.4173"
- y2="399.4946"><stop
- offset="0"
- style="stop-color:#FBCA51"
- id="stop59" /><stop
- offset="1"
- style="stop-color:#FFECBF"
- id="stop61" /></linearGradient><ellipse
- style="fill:url(#SVGID_6_);stroke:#000000;stroke-miterlimit:10"
- cx="205.43201"
- cy="440.64801"
- rx="28.959"
- ry="28.080999"
- id="ellipse63"
- sodipodi:cx="205.43201"
- sodipodi:cy="440.64801"
- sodipodi:rx="28.959"
- sodipodi:ry="28.080999"
- transform="translate(-145.43535,-189.01935)" /><linearGradient
- id="SVGID_7_"
- gradientUnits="userSpaceOnUse"
- x1="190.9269"
- y1="427.96649"
- x2="192.52139"
- y2="436.33749"><stop
- offset="0"
- style="stop-color:#6BBBD0"
- id="stop66" /><stop
- offset="1"
- style="stop-color:#ACCCD4"
- id="stop68" /></linearGradient><line
- style="fill:url(#SVGID_7_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="44.983662"
- y1="238.97565"
- x2="47.595661"
- y2="247.29865"
- id="line70" /><linearGradient
- id="SVGID_8_"
- gradientUnits="userSpaceOnUse"
- x1="211.39799"
- y1="423.5397"
- x2="213.01559"
- y2="432.0325"><stop
- offset="0"
- style="stop-color:#6BBBD0"
- id="stop73" /><stop
- offset="1"
- style="stop-color:#ACCCD4"
- id="stop75" /></linearGradient><line
- style="fill:url(#SVGID_8_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="66.200653"
- y1="234.40564"
- x2="67.343658"
- y2="243.13666"
- id="line77" /><path
- style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 47.595655,260.51865 c 0,0 0.653,13.22 15.831,9.14 15.178,-4.08 11.229,-15.994 11.229,-15.994"
- id="path79"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_9_"
- gradientUnits="userSpaceOnUse"
- x1="247.2587"
- y1="416.16669"
- x2="247.2587"
- y2="464.19009"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0.0019"
- style="stop-color:#FFCA94"
- id="stop82" /><stop
- offset="1"
- style="stop-color:#E2A380"
- id="stop84" /></linearGradient><path
- style="fill:url(#SVGID_9_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 125.03565,225.81865 c 0,0 -54.844995,-4.046 -54.589995,5.391 0.255,9.437 21.359,3.668 20.849,8.259 -0.51,4.591 -10.173,3.424 -8.763,9.166 1.335,5.436 9.891,0.337 10.485,4.399 0.594,4.062 -7.944,4.738 -7.2,9.587 0.744,4.849 9.437,1.275 9.947,4.081 0.51,2.806 -5.959,4.099 -3.664,7.415 2.296,3.316 25.481995,4.532 36.820995,-0.784 11.531,-5.406 -3.885,-47.514 -3.885,-47.514 z"
- id="path86"
- inkscape:connector-curvature="0" /><path
- style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 108.82665,147.75265 c 0,0 0.464,-21.64 21.464,-21.14 21,0.5 22,21.14 22,21.14"
- id="path88"
- inkscape:connector-curvature="0" /><path
- style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 194.78965,147.75265 c 0,0 5.5,-23.64 25,-23.64 19.5,0 21.571,21 21.571,21"
- id="path90"
- inkscape:connector-curvature="0" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="M 154.28965,177.59465"
- id="path92"
- inkscape:connector-curvature="0" /><path
- style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 154.28965,177.59465 c 0,0 0.715,18.789 16.607,18.421 15.893,-0.368 12.893,-18.421 12.893,-18.421"
- id="path94"
- inkscape:connector-curvature="0" /><path
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 228.94765,254.13365 c -2.38,6.629 -9.604,20.319 -44.933,26.513 -37.922,6.649 -56.122,-3.11 -56.122,-3.11 l -10.787,-59.329 c 0,0 37.312,5.696 53.792,4.439 16.48,-1.257 33.346,-5.764 33.346,-5.764 0,0 18.324,-4.366 23.904,8.074 5.579,12.439 3.538,21.552 0.8,29.177 z"
- id="path96"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_10_"
- gradientUnits="userSpaceOnUse"
- x1="316.32571"
- y1="383.66669"
- x2="316.32571"
- y2="199.5519"><stop
- offset="0"
- style="stop-color:#402A04"
- id="stop99" /><stop
- offset="1"
- style="stop-color:#7F5100"
- id="stop101" /></linearGradient><polygon
- style="fill:url(#SVGID_10_)"
- points="408.426,250.667 394.198,218.593 358.725,207.167 262.541,210.167 237.725,225.136 224.225,247.667 "
- id="polygon103"
- transform="translate(-145.43535,-189.01935)" /><polygon
- style="fill:#c1272d;stroke:#000000;stroke-miterlimit:10"
- points="399.167,290.713 428.616,269.855 394.694,225.136 365.225,225.136 354.191,247.667 404.225,254.667 "
- id="polygon105"
- transform="translate(-145.43535,-189.01935)" /><path
- style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 245.96865,0.64764917 c -6.811,-2.50199997 -41.178,27.49999983 -36.678,36.49999983 4.5,9 39,21.5 39,21.5 l 13.209,-17.558 c -10e-4,0 -4.031,-36.2179998 -15.531,-40.44199983 z"
- id="path107"
- inkscape:connector-curvature="0" /><path
- style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 272.19765,55.502649 -13.408,15.144 c 0,0 9,36.500001 17.5,35.500001 8.5,-1 32,-21.720001 30,-31.408001 -2,-9.688 -34.092,-19.236 -34.092,-19.236 z"
- id="path109"
- inkscape:connector-curvature="0" /><path
- style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 243.78965,58.647649 c 0,0 13.418,-23.5 17.709,-22.5 4.291,1 15.093,16.043 15.791,19.356 0.698,3.313 -13,20.644 -18.5,19.144 -5.5,-1.5 -12.5,-10 -15,-16 z"
- id="path111"
- inkscape:connector-curvature="0" /><line
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="215.78966"
- y1="36.11665"
- x2="245.96864"
- y2="54.967648"
- id="line113" /><line
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="262.99066"
- y1="73.483643"
- x2="277.31567"
- y2="96.647644"
- id="line115" /><circle
- style="opacity:0.2;fill:#d86d44"
- cx="262.54099"
- cy="357.16699"
- r="19.249001"
- id="circle117"
- sodipodi:cx="262.54099"
- sodipodi:cy="357.16699"
- sodipodi:rx="19.249001"
- sodipodi:ry="19.249001"
- transform="translate(-145.43535,-189.01935)" /><circle
- style="opacity:0.2;fill:#d86d44"
- cx="372.72501"
- cy="357.16699"
- r="19.249001"
- id="circle119"
- sodipodi:cx="372.72501"
- sodipodi:cy="357.16699"
- sodipodi:rx="19.249001"
- sodipodi:ry="19.249001"
- transform="translate(-145.43535,-189.01935)" /><path
- style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="M 231.14065,228.64765"
- id="path121"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_11_"
- gradientUnits="userSpaceOnUse"
- x1="218.8582"
- y1="511.4505"
- x2="220.60651"
- y2="520.62927"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0"
- style="stop-color:#006178"
- id="stop124" /><stop
- offset="1"
- style="stop-color:#00495C"
- id="stop126" /></linearGradient><path
- style="fill:url(#SVGID_11_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 61.249655,330.25265 c 0.7,3.23 4.623,2.704 4.623,2.704 0,0 14.196,-2.268 16.856,-2.704 2.66,-0.436 5.413,-2.183 4.802,-5.501 -0.611,-3.318 -2.578,-4.334 -4.977,-4.104 -2.143,0.206 -17.811,4.016 -17.811,4.016 0,0 -4.628,0.35 -3.493,5.589 z"
- id="path128"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_12_"
- gradientUnits="userSpaceOnUse"
- x1="196.34351"
- y1="377.0275"
- x2="197.17529"
- y2="381.39441"><stop
- offset="0"
- style="stop-color:#006178"
- id="stop131" /><stop
- offset="1"
- style="stop-color:#00495C"
- id="stop133" /></linearGradient><polygon
- style="fill:url(#SVGID_12_);stroke:#000000;stroke-miterlimit:10"
- points="186.437,382.911 186.437,379.506 206.978,374.966 207.302,379.506 "
- id="polygon135"
- transform="translate(-145.43535,-189.01935)" /><linearGradient
- id="SVGID_13_"
- gradientUnits="userSpaceOnUse"
- x1="152.85809"
- y1="432.1676"
- x2="155.30721"
- y2="445.02539"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0.0019"
- style="stop-color:#FFCA94"
- id="stop138" /><stop
- offset="1"
- style="stop-color:#E2A380"
- id="stop140" /></linearGradient><path
- style="fill:url(#SVGID_13_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 2.5626545,251.52265 c 0.949,7.344 13.9770005,5.843 12.4400005,-2.53 -1.537,-8.373 -13.8540005,-8.404 -12.4400005,2.53 z"
- id="path142"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_14_"
- gradientUnits="userSpaceOnUse"
- x1="150.90849"
- y1="418.1373"
- x2="153.3576"
- y2="430.99509"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0.0019"
- style="stop-color:#FFCA94"
- id="stop145" /><stop
- offset="1"
- style="stop-color:#E2A380"
- id="stop147" /></linearGradient><path
- style="fill:url(#SVGID_14_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 0.61265455,237.49265 c 0.94899995,7.344 13.97700045,5.843 12.44000045,-2.53 -1.537,-8.373 -13.85300045,-8.404 -12.44000045,2.53 z"
- id="path149"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_15_"
- gradientUnits="userSpaceOnUse"
- x1="155.52521"
- y1="446.19681"
- x2="157.7338"
- y2="457.79221"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0.0019"
- style="stop-color:#FFCA94"
- id="stop152" /><stop
- offset="1"
- style="stop-color:#E2A380"
- id="stop154" /></linearGradient><path
- style="fill:url(#SVGID_15_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 5.7066545,264.72965 c 0.856,6.623 12.6050005,5.269 11.2180005,-2.281 -1.387,-7.55 -12.4920005,-7.58 -11.2180005,2.281 z"
- id="path156"
- inkscape:connector-curvature="0" /><linearGradient
- id="SVGID_16_"
- gradientUnits="userSpaceOnUse"
- x1="153.2876"
- y1="459.8923"
- x2="155.15581"
- y2="469.70059"
- gradientTransform="translate(-145.43535,-189.01935)"><stop
- offset="0.0019"
- style="stop-color:#FFCA94"
- id="stop159" /><stop
- offset="1"
- style="stop-color:#E2A380"
- id="stop161" /></linearGradient><path
- style="fill:url(#SVGID_16_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- d="m 14.738655,269.81365 c 0,0 -14.45200045,0.644 -13.0900005,6.785 1.362,6.141 15.1240005,2.806 15.1240005,2.806 l -2.034,-9.591 z"
- id="path163"
- inkscape:connector-curvature="0" /><line
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="103.19666"
- y1="134.52966"
- x2="111.07164"
- y2="138.28766"
- id="line165" /><line
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="116.44066"
- y1="121.91666"
- x2="119.95366"
- y2="128.63864"
- id="line167" /><line
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="231.53465"
- y1="117.39664"
- x2="227.96065"
- y2="125.27765"
- id="line169" /><line
- style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="249.61266"
- y1="127.38266"
- x2="237.84065"
- y2="134.52966"
- id="line171" /><line
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="243.72664"
- y1="311.64764"
- x2="251.97566"
- y2="348.16364"
- id="line173" /><line
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="184.01564"
- y1="310.31366"
- x2="184.01564"
- y2="349.90466"
- id="line175" /><line
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="146.45665"
- y1="311.64764"
- x2="143.12267"
- y2="350.95166"
- id="line177" /><line
- style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
- x1="218.07564"
- y1="311.29565"
- x2="222.05864"
- y2="348.93066"
- id="line179" /></svg>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- id="Layer_1"
- x="0px"
- y="0px"
- viewBox="0 0 195.689 195.688"
- xml:space="preserve"
- inkscape:version="0.48.4 r9939"
- width="100%"
- height="100%"
- sodipodi:docname="Mail.svg"><metadata
- id="metadata68"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
- id="defs66" /><sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1508"
- inkscape:window-height="982"
- id="namedview64"
- showgrid="false"
- inkscape:zoom="8.970293"
- inkscape:cx="97.257987"
- inkscape:cy="98.235009"
- inkscape:window-x="75"
- inkscape:window-y="34"
- inkscape:window-maximized="0"
- inkscape:current-layer="Layer_1"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0" /><g
- id="g3"
- transform="translate(-200.38201,-323.492)"><linearGradient
- id="SVGID_1_"
- gradientUnits="userSpaceOnUse"
- x1="298.22559"
- y1="324.43469"
- x2="298.22559"
- y2="518.20068"><stop
- offset="0"
- style="stop-color:#FFFFFF;stop-opacity:0.7"
- id="stop6" /><stop
- offset="0.9987"
- style="stop-color:#D8D9D8;stop-opacity:0.7"
- id="stop8" /></linearGradient><path
- style="fill:url(#SVGID_1_);fill-rule:evenodd"
- d="m 210.005,518.68 c -5.031,0 -9.124,-4.093 -9.124,-9.123 v -176.44 c 0,-5.031 4.093,-9.124 9.124,-9.124 h 176.441 c 5.03,0 9.123,4.093 9.123,9.124 v 176.44 c 0,5.03 -4.093,9.123 -9.123,9.123 H 210.005 z"
- id="path10"
- inkscape:connector-curvature="0" /><path
- style="fill:#d8d8d7"
- d="m 386.446,324.492 c 4.755,0 8.624,3.868 8.624,8.624 v 176.441 c 0,4.755 -3.868,8.623 -8.624,8.623 h -176.44 c -4.755,0 -8.624,-3.868 -8.624,-8.623 V 333.116 c 0,-4.755 3.868,-8.624 8.624,-8.624 h 176.44 m 0,-1 h -176.44 c -5.315,0 -9.624,4.309 -9.624,9.624 v 176.441 c 0,5.315 4.309,9.623 9.624,9.623 h 176.441 c 5.315,0 9.624,-4.308 9.624,-9.623 V 333.116 c -0.001,-5.315 -4.31,-9.624 -9.625,-9.624 l 0,0 z"
- id="path12"
- inkscape:connector-curvature="0" /></g><path
- style="fill:#e1dfe2;fill-rule:evenodd"
- d="M 43.775991,58.85 H 148.48299 c 3.322,0 6.015,2.693 6.015,6.015 v 81.128 c 0,3.322 -2.693,6.015 -6.015,6.015 H 43.775991 c -3.322,0 -6.015,-2.693 -6.015,-6.015 V 64.865 c 0,-3.323 2.693,-6.015 6.015,-6.015 z"
- id="path14"
- inkscape:connector-curvature="0" /><g
- id="g16"
- transform="translate(-200.38201,-323.492)"><linearGradient
- id="SVGID_2_"
- gradientUnits="userSpaceOnUse"
- x1="296.51169"
- y1="381.51559"
- x2="296.51169"
- y2="474.0015"><stop
- offset="0.0032"
- style="stop-color:#E6C71E"
- id="stop19" /><stop
- offset="1"
- style="stop-color:#E1BB23"
- id="stop21" /></linearGradient><path
- style="fill:url(#SVGID_2_);fill-rule:evenodd"
- d="m 244.158,474.999 c -3.041,0 -5.515,-2.474 -5.515,-5.515 v -82.699 c 0,-3.041 2.474,-5.515 5.515,-5.515 h 104.707 c 3.041,0 5.515,2.474 5.515,5.515 v 82.699 c 0,3.041 -2.474,5.515 -5.515,5.515 H 244.158 z"
- id="path23"
- inkscape:connector-curvature="0" /><path
- style="fill:#d6b429"
- d="m 348.865,381.771 c 2.765,0 5.015,2.25 5.015,5.015 v 82.699 c 0,2.765 -2.25,5.015 -5.015,5.015 H 244.158 c -2.765,0 -5.015,-2.25 -5.015,-5.015 v -82.699 c 0,-2.765 2.25,-5.015 5.015,-5.015 h 104.707 m 0,-1 H 244.158 c -3.322,0 -6.015,2.693 -6.015,6.015 v 82.699 c 0,3.322 2.693,6.015 6.015,6.015 h 104.707 c 3.322,0 6.015,-2.693 6.015,-6.015 v -82.699 c 0,-3.322 -2.693,-6.015 -6.015,-6.015 l 0,0 z"
- id="path25"
- inkscape:connector-curvature="0" /></g><path
- style="fill:#c9af2d;fill-rule:evenodd"
- d="m 39.744991,60.112 -1.026,1.112 58.106,56.862 v -2.652 l -57.08,-55.322 z"
- id="path27"
- inkscape:connector-curvature="0" /><path
- style="fill:#9e8831;fill-rule:evenodd"
- d="m 39.867991,60.294 0.589,-0.666 56.368,55.16 v 0.646 l -56.957,-55.14 z"
- id="path29"
- inkscape:connector-curvature="0" /><polygon
- style="fill:#eecf32;fill-rule:evenodd"
- points="239.625,471.413 240.152,471.976 296.94,421.926 296.94,420.907 "
- id="polygon31"
- transform="translate(-200.38201,-323.492)" /><path
- style="fill:#c9af2d;fill-rule:evenodd"
- d="m 97.159431,118.6434 56.403999,-56.915 -1.09844,-1.5594 -55.638999,55.265 0,2.652 z"
- id="path33"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccc" /><path
- style="fill:#968330;fill-rule:evenodd"
- d="m 96.824991,114.788 55.097999,-55.103 0.542,0.485 -55.638999,55.265 v -0.647 z"
- id="path35"
- inkscape:connector-curvature="0" /><path
- style="fill:#9e8831;fill-rule:evenodd"
- d="m 148.48299,57.119 -104.706999,0 c -4.82917,1.06976 -6.015,3.82683 -6.015,7.746 0,-3.322 2.693,-6.015 6.015,-6.015 l 104.706999,0 c 3.322,0 6.015,2.693 6.015,6.015 l 0,-1.731 c 0,-3.322 -2.693,-6.015 -6.015,-6.015 z"
- id="path37"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sccsscss" /><path
- style="fill:#bba330;fill-rule:evenodd"
- d="m 38.470991,146.961 c 0,0 0.246,0.5 0.772,0.959 l 57.316,-50.505 0.02,-1.375 -58.108,50.921 z"
- id="path39"
- inkscape:connector-curvature="0" /><path
- style="fill:#bba330;fill-rule:evenodd"
- d="m 96.557991,95.891 v 1.524 l 55.750999,51.174 c 0.466,-0.33 0.768,-0.716 0.768,-0.716 L 96.557991,95.891 z"
- id="path41"
- inkscape:connector-curvature="0" /><path
- style="fill:#eecf32;fill-rule:evenodd"
- d="M 152.30999,148.589 96.558991,97.415 v 0.761 l 55.114999,50.925 c 0.32,-0.151 0.213,-0.212 0.636,-0.512 z"
- id="path43"
- inkscape:connector-curvature="0" /><path
- style="fill:#ac9431;fill-rule:evenodd"
- d="m 88.629991,88.999 c -3.192,1.17 -4.69,6.312 -6.235,7.829 -1.544,1.517 -4.703,1.544 -6.273,5.029 -1.57,3.485 1.75,4.183 1.675,7.319 -0.076,3.136 -2.91,3.923 -2.368,7.185 0.541,3.262 3.454,2.5 4.846,4.564 1.391,2.064 -0.81,5.496 2.281,6.831 3.091,1.335 5.185,-0.25 8.327,0.084 3.142,0.334 2.986,4.66 7.796,4.18 5.496999,-0.548 4.266999,-4.183 7.267999,-5.811 3.001,-1.628 6.925,1.166 8.397,-2.402 1.472,-3.568 -0.258,-5.944 0.469,-9.521 0.727,-3.577 4.949,-4.005 4.769,-7.767 -0.18,-3.762 -4.779,-6.555 -7.659,-7.681 -1.814,-0.709 -0.625,-7.017 -4.299,-8.084 -3.673,-1.067 -5.597,0.229 -10.023999,0.635 -4.428,0.407 -3.247,-4.488 -8.97,-2.39 z"
- id="path45"
- inkscape:connector-curvature="0" /><g
- id="g47"
- transform="translate(-200.38201,-323.492)"><linearGradient
- id="SVGID_3_"
- gradientUnits="userSpaceOnUse"
- x1="297.85461"
- y1="413.6799"
- x2="297.85461"
- y2="452.90948"><stop
- offset="0"
- style="stop-color:#F9F3D9"
- id="stop50" /><stop
- offset="1"
- style="stop-color:#EAE3CA"
- id="stop52" /></linearGradient><path
- style="fill:url(#SVGID_3_);fill-rule:evenodd"
- d="m 298.342,453.3 c -2.136,0 -3.101,-1.126 -4.034,-2.215 -0.778,-0.908 -1.583,-1.848 -3.018,-2.001 -0.322,-0.034 -0.633,-0.049 -0.936,-0.049 -0.919,0 -1.754,0.136 -2.561,0.267 -0.764,0.124 -1.484,0.241 -2.238,0.241 -0.892,0 -1.693,-0.166 -2.52,-0.523 -1.686,-0.729 -1.654,-2.082 -1.617,-3.649 0.025,-1.077 0.051,-2.191 -0.556,-3.092 -0.607,-0.901 -1.469,-1.292 -2.303,-1.669 -1.183,-0.535 -2.205,-0.997 -2.503,-2.797 -0.275,-1.657 0.375,-2.643 1.063,-3.687 0.625,-0.949 1.272,-1.931 1.309,-3.452 0.034,-1.415 -0.597,-2.379 -1.154,-3.229 -0.744,-1.137 -1.387,-2.118 -0.542,-3.992 0.985,-2.186 2.632,-2.966 4.084,-3.653 0.806,-0.382 1.567,-0.742 2.136,-1.301 0.559,-0.549 1.086,-1.504 1.698,-2.61 1.089,-1.973 2.445,-4.427 4.448,-5.162 0.936,-0.343 1.715,-0.51 2.382,-0.51 1.299,0 1.967,0.656 2.675,1.35 0.759,0.745 1.619,1.589 3.318,1.589 0.167,0 0.344,-0.008 0.53,-0.025 1.51,-0.139 2.74,-0.381 3.824,-0.596 1.225,-0.242 2.282,-0.451 3.415,-0.451 0.894,0 1.749,0.127 2.693,0.402 2.02,0.587 2.468,2.9 2.862,4.941 0.291,1.5 0.542,2.794 1.414,3.136 2.703,1.057 7.325,3.818 7.5,7.46 0.092,1.901 -1.027,2.912 -2.212,3.982 -1.081,0.977 -2.199,1.986 -2.552,3.724 -0.326,1.603 -0.171,2.965 -0.021,4.281 0.189,1.669 0.369,3.246 -0.435,5.193 -0.609,1.478 -1.646,1.78 -3.018,1.78 -0.382,0 -0.779,-0.023 -1.184,-0.047 -0.431,-0.024 -0.869,-0.05 -1.309,-0.05 -1.16,0 -2.017,0.184 -2.774,0.595 -1.227,0.665 -1.782,1.648 -2.319,2.599 -0.832,1.471 -1.617,2.86 -4.854,3.183 -0.242,0.025 -0.472,0.037 -0.691,0.037 z"
- id="path54"
- inkscape:connector-curvature="0" /><path
- style="fill:#fffcf3"
- d="m 291.481,410.466 c 1.197,0 1.8,0.593 2.499,1.279 0.793,0.778 1.692,1.661 3.493,1.661 0.175,0 0.359,-0.008 0.553,-0.026 1.523,-0.14 2.759,-0.384 3.849,-0.599 1.212,-0.239 2.258,-0.446 3.366,-0.446 0.869,0 1.703,0.125 2.623,0.392 1.873,0.544 2.306,2.778 2.688,4.749 0.305,1.572 0.568,2.93 1.568,3.321 2.647,1.035 7.173,3.725 7.341,7.24 0.085,1.784 -0.941,2.711 -2.13,3.785 -1.059,0.957 -2.26,2.041 -2.629,3.859 -0.334,1.642 -0.176,3.023 -0.024,4.36 0.186,1.636 0.362,3.181 -0.417,5.07 -0.558,1.354 -1.48,1.626 -2.787,1.626 -0.373,0 -0.76,-0.022 -1.17,-0.046 -0.43,-0.025 -0.874,-0.051 -1.323,-0.051 -1.204,0 -2.096,0.193 -2.893,0.625 -1.29,0.7 -1.863,1.714 -2.418,2.695 -0.833,1.474 -1.553,2.748 -4.661,3.058 -0.23,0.023 -0.455,0.035 -0.667,0.035 -2.022,0 -2.907,-1.033 -3.845,-2.128 -0.81,-0.946 -1.648,-1.923 -3.181,-2.087 -0.318,-0.034 -0.633,-0.05 -0.962,-0.05 -0.94,0 -1.784,0.137 -2.601,0.27 -0.753,0.122 -1.464,0.238 -2.198,0.238 -0.857,0 -1.626,-0.16 -2.421,-0.503 -1.457,-0.629 -1.507,-1.707 -1.466,-3.414 0.026,-1.116 0.053,-2.271 -0.598,-3.238 -0.647,-0.96 -1.582,-1.383 -2.408,-1.757 -1.164,-0.527 -2.083,-0.943 -2.359,-2.61 -0.259,-1.561 0.336,-2.463 1.025,-3.508 0.615,-0.933 1.312,-1.99 1.35,-3.584 0.036,-1.493 -0.618,-2.491 -1.195,-3.373 -0.733,-1.12 -1.312,-2.004 -0.524,-3.753 0.947,-2.102 2.48,-2.828 3.963,-3.53 0.826,-0.391 1.606,-0.76 2.205,-1.348 0.585,-0.575 1.121,-1.545 1.741,-2.668 1.069,-1.936 2.4,-4.346 4.315,-5.048 0.909,-0.334 1.66,-0.496 2.298,-0.496 m 0,-0.5 c -0.651,0 -1.451,0.152 -2.468,0.525 -3.192,1.17 -4.69,6.312 -6.235,7.829 -1.544,1.517 -4.703,1.544 -6.273,5.029 -1.57,3.485 1.75,4.183 1.675,7.319 -0.076,3.136 -2.91,3.923 -2.368,7.185 0.541,3.262 3.454,2.5 4.846,4.564 1.391,2.064 -0.81,5.496 2.281,6.831 0.947,0.409 1.801,0.544 2.619,0.544 1.587,0 3.044,-0.507 4.799,-0.507 0.294,0 0.597,0.014 0.91,0.048 2.977,0.317 2.994,4.217 7.079,4.217 0.226,0 0.465,-0.012 0.717,-0.037 5.497,-0.548 4.267,-4.183 7.268,-5.811 0.837,-0.454 1.747,-0.564 2.655,-0.564 0.853,0 1.704,0.097 2.493,0.097 1.382,0 2.574,-0.298 3.249,-1.935 1.472,-3.568 -0.258,-5.944 0.469,-9.521 0.727,-3.577 4.949,-4.005 4.769,-7.767 -0.18,-3.762 -4.779,-6.555 -7.659,-7.681 -1.814,-0.709 -0.625,-7.017 -4.299,-8.084 -1.027,-0.298 -1.917,-0.412 -2.763,-0.412 -2.181,0 -4.071,0.755 -7.261,1.047 -0.178,0.016 -0.347,0.024 -0.507,0.024 -3.128,0 -3.132,-2.939 -5.996,-2.94 l 0,0 z"
- id="path56"
- inkscape:connector-curvature="0" /></g><g
- id="g58"
- transform="translate(-200.38201,-323.492)"><path
- style="fill:#2c2c2c"
- d="m 295.754,427.07 c -0.707,0.492 -1.312,1.11 -1.816,1.854 -0.506,0.744 -0.9,1.554 -1.189,2.43 -0.287,0.876 -0.432,1.71 -0.432,2.502 0,1.008 0.289,1.842 0.863,2.502 0.576,0.66 1.32,0.99 2.232,0.99 0.793,0 1.523,-0.258 2.197,-0.774 0.67,-0.516 1.26,-1.163 1.764,-1.943 0.504,-0.78 0.9,-1.614 1.188,-2.502 0.288,-0.888 0.432,-1.704 0.432,-2.448 0,-0.433 -0.078,-0.852 -0.234,-1.26 -0.156,-0.408 -0.371,-0.762 -0.646,-1.062 -0.277,-0.3 -0.59,-0.546 -0.938,-0.738 -0.348,-0.191 -0.713,-0.288 -1.098,-0.288 -0.84,-0.001 -1.614,0.246 -2.323,0.737 z m 6.157,8.676 c -0.084,0.324 -0.125,0.618 -0.125,0.883 0,0.744 0.287,1.115 0.863,1.115 0.553,0 1.121,-0.252 1.711,-0.756 0.588,-0.504 1.121,-1.151 1.602,-1.943 0.479,-0.792 0.875,-1.68 1.188,-2.664 0.313,-0.984 0.469,-1.956 0.469,-2.916 0,-1.416 -0.271,-2.7 -0.811,-3.853 -0.541,-1.151 -1.266,-2.13 -2.178,-2.934 -0.912,-0.804 -1.951,-1.422 -3.115,-1.854 -1.164,-0.432 -2.381,-0.647 -3.652,-0.647 -1.537,0 -2.971,0.306 -4.303,0.918 -1.332,0.611 -2.49,1.446 -3.475,2.502 -0.984,1.057 -1.758,2.28 -2.322,3.672 -0.562,1.393 -0.846,2.88 -0.846,4.464 0,1.608 0.295,3.108 0.883,4.5 0.588,1.393 1.391,2.599 2.412,3.618 1.02,1.021 2.201,1.824 3.545,2.412 1.344,0.588 2.773,0.882 4.285,0.882 1.727,0 3.389,-0.396 4.986,-1.188 1.596,-0.792 2.908,-1.848 3.941,-3.168 h 2.268 c -0.576,1.009 -1.271,1.902 -2.088,2.683 -0.817,0.781 -1.709,1.439 -2.682,1.98 -0.973,0.54 -2.01,0.948 -3.115,1.225 -1.104,0.275 -2.23,0.414 -3.383,0.414 -1.896,0 -3.666,-0.349 -5.311,-1.044 -1.645,-0.696 -3.072,-1.65 -4.283,-2.862 -1.213,-1.212 -2.166,-2.64 -2.863,-4.284 -0.695,-1.644 -1.043,-3.426 -1.043,-5.346 0,-1.848 0.354,-3.582 1.062,-5.202 0.707,-1.62 1.668,-3.036 2.879,-4.248 1.213,-1.212 2.629,-2.166 4.248,-2.862 1.621,-0.695 3.342,-1.044 5.166,-1.044 1.656,0 3.229,0.276 4.717,0.828 1.488,0.553 2.789,1.314 3.906,2.286 1.115,0.972 1.998,2.137 2.645,3.492 0.648,1.355 0.973,2.85 0.973,4.481 0,1.561 -0.283,2.982 -0.846,4.267 -0.564,1.284 -1.266,2.382 -2.105,3.294 -0.842,0.912 -1.754,1.62 -2.736,2.124 -0.984,0.504 -1.896,0.756 -2.736,0.756 -0.625,0 -1.152,-0.192 -1.584,-0.576 -0.432,-0.384 -0.672,-0.972 -0.721,-1.764 h -0.107 c -0.553,0.624 -1.213,1.182 -1.98,1.674 -0.767,0.492 -1.596,0.738 -2.484,0.738 -0.768,0 -1.469,-0.15 -2.105,-0.45 -0.636,-0.3 -1.176,-0.702 -1.619,-1.206 -0.445,-0.504 -0.793,-1.104 -1.045,-1.8 -0.252,-0.696 -0.377,-1.44 -0.377,-2.232 0,-1.248 0.203,-2.484 0.611,-3.708 0.408,-1.224 0.979,-2.315 1.711,-3.276 0.73,-0.959 1.619,-1.739 2.662,-2.34 1.045,-0.6 2.203,-0.899 3.475,-0.899 0.84,0 1.621,0.222 2.34,0.666 0.721,0.444 1.283,1.206 1.693,2.286 l 0.826,-2.269 h 2.27 l -3.025,10.224 c -0.099,0.309 -0.188,0.628 -0.272,0.951 z"
- id="path60"
- inkscape:connector-curvature="0" /></g><path
- style="fill:#e1dfe2;fill-rule:evenodd"
- d="M 148.48299,149.755 H 43.775991 c -3.322,0 -6.015,-2.693 -6.015,-6.015 v 2.253 c 0,3.322 2.693,6.015 6.015,6.015 H 148.48299 c 3.322,0 6.015,-2.693 6.015,-6.015 v -2.253 c 0,3.322 -2.693,6.015 -6.015,6.015 z"
- id="path62"
- inkscape:connector-curvature="0" /></svg>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- id="Layer_1"
- x="0px"
- y="0px"
- viewBox="0 0 195.687 195.688"
- xml:space="preserve"
- inkscape:version="0.48.4 r9939"
- width="100%"
- height="100%"
- sodipodi:docname="World.svg"><metadata
- id="metadata129"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
- id="defs127" /><sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1199"
- inkscape:window-height="896"
- id="namedview125"
- showgrid="false"
- inkscape:zoom="6.342955"
- inkscape:cx="97.837987"
- inkscape:cy="98.236009"
- inkscape:window-x="75"
- inkscape:window-y="34"
- inkscape:window-maximized="0"
- inkscape:current-layer="Layer_1"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0" /><g
- id="g3"
- transform="translate(-199.80201,-323.493)"><linearGradient
- id="SVGID_1_"
- gradientUnits="userSpaceOnUse"
- x1="297.64529"
- y1="324.43469"
- x2="297.64529"
- y2="518.20172"><stop
- offset="0"
- style="stop-color:#FFFFFF;stop-opacity:0.7"
- id="stop6" /><stop
- offset="0.9987"
- style="stop-color:#D8D9D8;stop-opacity:0.7"
- id="stop8" /></linearGradient><path
- style="fill:url(#SVGID_1_);fill-rule:evenodd"
- d="m 209.425,518.681 c -5.031,0 -9.124,-4.093 -9.124,-9.124 v -176.44 c 0,-5.031 4.093,-9.124 9.124,-9.124 h 176.44 c 5.031,0 9.124,4.093 9.124,9.124 v 176.44 c 0,5.031 -4.093,9.124 -9.124,9.124 h -176.44 z"
- id="path10"
- inkscape:connector-curvature="0" /><path
- style="fill:#d8d8d7"
- d="m 385.865,324.493 c 4.755,0 8.623,3.868 8.623,8.624 v 176.441 c 0,4.755 -3.868,8.623 -8.623,8.623 h -176.44 c -4.755,0 -8.623,-3.868 -8.623,-8.623 V 333.116 c 0,-4.755 3.868,-8.624 8.623,-8.624 h 176.44 m 0,-0.999 h -176.44 c -5.315,0 -9.623,4.309 -9.623,9.624 v 176.441 c 0,5.315 4.309,9.623 9.623,9.623 h 176.441 c 5.315,0 9.623,-4.309 9.623,-9.623 V 333.116 c 0,-5.315 -4.309,-9.623 -9.624,-9.623 l 0,0 z"
- id="path12"
- inkscape:connector-curvature="0" /></g><g
- id="g14"
- transform="translate(-199.80201,-323.493)"><linearGradient
- id="SVGID_2_"
- gradientUnits="userSpaceOnUse"
- x1="295.34409"
- y1="366.51251"
- x2="295.34409"
- y2="477.05319"><stop
- offset="0"
- style="stop-color:#537FAF"
- id="stop17" /><stop
- offset="1"
- style="stop-color:#436997"
- id="stop19" /></linearGradient><path
- style="fill:url(#SVGID_2_);fill-rule:evenodd"
- d="m 295.344,365.432 c 30.647,0 55.492,24.845 55.492,55.492 0,30.647 -24.845,55.492 -55.492,55.492 -30.647,0 -55.492,-24.845 -55.492,-55.492 0,-30.647 24.845,-55.492 55.492,-55.492 z"
- id="path21"
- inkscape:connector-curvature="0" /></g><g
- id="g23"
- transform="translate(-199.80201,-323.493)"><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 336.697,448.9 c -1.4466,-17.74544 -6.79574,8.99663 -17.693,-19.639 -0.105,-0.613 -0.158,-1.2 -0.187,-1.775 -0.053,0.99 -0.003,2.033 0.187,3.145 8.478,23.495 15.228,8.439 17.693,18.269 z"
- id="path25"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccc" /><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 322.35931,469.75845 c 11.4669,-11.09759 23.42214,-27.18821 22.63386,-47.49545 -0.009,-0.23982 5.82483,-0.446 5.82183,-0.686 0.33349,21.63904 -14.73709,38.28161 -28.45569,48.18145 z"
- id="path27"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cscc" /></g><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 142.99999,70.832 c -0.788,3.617 -1.577,7.235 -2.365,10.852 -4.961,-1.349 -8.753,1.731 -13.289,3.095 -0.653,-2.785 -1.305,-5.572 -1.958,-8.357 -0.113,-0.024 -0.223,-0.043 -0.338,-0.074 0.765,3.266 1.531,6.534 2.296,9.801 4.537,-1.363 8.328,-4.444 13.289,-3.095 0.788,-3.617 1.577,-7.235 2.365,-10.852 0.387,-0.052 0.774,-0.104 1.161,-0.156 -0.238,-0.431 -0.502,-0.844 -0.75,-1.268 -0.137,0.017 -0.274,0.035 -0.411,0.054 z"
- id="path29"
- inkscape:connector-curvature="0" /><g
- id="g31"
- transform="translate(-199.80201,-323.493)"><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 329.068,380.749 c -0.243,-1.017 -0.486,-2.033 -0.729,-3.05 -0.135,-0.1 -0.264,-0.207 -0.4,-0.306 0.303,1.267 0.606,2.535 0.909,3.802 0.072,-0.148 0.146,-0.297 0.22,-0.446 z"
- id="path33"
- inkscape:connector-curvature="0" /><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 327.22,389.512 c -0.489,-0.227 -0.978,-0.455 -1.468,-0.682 -0.183,0.371 -0.367,0.742 -0.55,1.114 0.673,0.313 1.345,0.625 2.018,0.938 3.634,-0.915 5.053,-5.373 4.871,-9.558 -0.155,3.741 -1.633,7.372 -4.871,8.188 z"
- id="path35"
- inkscape:connector-curvature="0" /></g><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 123.30399,61.978 c -0.543,-0.236 -1.087,-0.471 -1.63,-0.707 -0.179,0.379 -0.358,0.758 -0.537,1.136 0.722,0.313 1.445,0.627 2.167,0.94 0.365,-1.137 0.73,-2.275 1.095,-3.413 -0.129,-0.055 -0.257,-0.111 -0.386,-0.166 -0.236,0.737 -0.473,1.474 -0.709,2.21 z"
- id="path37"
- inkscape:connector-curvature="0" /><g
- id="g39"
- transform="translate(-199.80201,-323.493)"><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 272.087,393.816 c 0.93,-5.339 1.861,-10.68 2.792,-16.019 -0.025,-0.167 -0.072,-0.388 -0.129,-0.63 -0.93,5.334 -1.859,10.669 -2.789,16.003 0.037,0.217 0.085,0.431 0.126,0.646 z"
- id="path41"
- inkscape:connector-curvature="0" /><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 260.998,417.547 c 0,0.424 0.044,0.842 0.117,1.256 0.455,-0.442 0.911,-0.885 1.366,-1.327 1.956,0 13.993,0.484 15.897,1.198 0,-0.465 -0.021,-0.926 -0.05,-1.385 -2.041,-0.705 -13.906,-1.182 -15.847,-1.182 -0.495,0.479 -0.989,0.96 -1.483,1.44 z"
- id="path43"
- inkscape:connector-curvature="0" /><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 271.142,443.257 c -0.062,0.322 -0.109,0.664 -0.134,1.038 5.203,13.429 12.196,14.9 12.423,28.805 0.219,-15.067 -6.933,-16.306 -12.289,-29.843 z"
- id="path45"
- inkscape:connector-curvature="0" /><path
- style="fill:#3d5e86;fill-rule:evenodd"
- d="m 276.572,434.507 c -0.064,-0.093 -8.841,-3.054 -12.462,-5.359 -7.139,-4.544 -14.035,-13.956 -20.542,-26.81 -0.1,0.258 -0.211,0.51 -0.306,0.77 6.597,13.166 13.598,22.794 20.849,27.409 3.571,2.273 12.138,5.178 12.438,5.348 0.136,-0.364 0.169,-0.795 0.023,-1.358 z"
- id="path49"
- inkscape:connector-curvature="0" /></g><g
- id="g51"
- transform="translate(-217.32904,-322.54707)"><linearGradient
- id="SVGID_3_"
- gradientUnits="userSpaceOnUse"
- x1="334.81161"
- y1="368.34589"
- x2="334.81161"
- y2="475.01251"
- gradientTransform="translate(17.527034,-0.89641334)"><stop
- offset="0"
- style="stop-color:#D1DBE8"
- id="stop54" /><stop
- offset="1"
- style="stop-color:#C4CDDC"
- id="stop56" /></linearGradient><path
- style="fill:url(#SVGID_3_);fill-rule:evenodd"
- d="m 368.20538,422.0761 c 0,-4.224 -0.33035,-10.38051 -1.22335,-14.33451 -9.023,1.521 -33.199,4.524 -30.451,20.622 8.53,23.641 15.312,8.248 17.739,18.45 0.38,4.725 -6.01,12.864 -10.126,19.052 14.62,-9.993 24.06135,-24.74349 24.06135,-43.78949 z"
- id="path58"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="sccccs" /></g><g
- id="g60"
- transform="translate(-199.80201,-323.493)"><linearGradient
- id="SVGID_4_"
- gradientUnits="userSpaceOnUse"
- x1="334.4075"
- y1="368.34589"
- x2="334.4075"
- y2="475.01251"><stop
- offset="0"
- style="stop-color:#D1DBE8"
- id="stop63" /><stop
- offset="1"
- style="stop-color:#C4CDDC"
- id="stop65" /></linearGradient><path
- style="fill:url(#SVGID_4_);fill-rule:evenodd"
- d="m 340.438,405.177 c 0.788,-3.617 1.577,-7.235 2.365,-10.852 0.387,-0.052 0.774,-0.104 1.161,-0.156 -2.168,-3.931 -4.798,-7.569 -7.818,-10.845 -1.648,5.677 -4.173,17.083 -11.293,15.147 0.765,3.266 1.531,6.534 2.296,9.801 4.536,-1.364 8.327,-4.444 13.289,-3.095 z"
- id="path67"
- inkscape:connector-curvature="0" /></g><g
- id="g69"
- transform="translate(-199.80201,-323.493)"><linearGradient
- id="SVGID_5_"
- gradientUnits="userSpaceOnUse"
- x1="328.65619"
- y1="368.34589"
- x2="328.65619"
- y2="475.01251"><stop
- offset="0"
- style="stop-color:#D1DBE8"
- id="stop72" /><stop
- offset="1"
- style="stop-color:#C4CDDC"
- id="stop74" /></linearGradient><path
- style="fill:url(#SVGID_5_);fill-rule:evenodd"
- d="m 329.068,380.749 c -1.288,2.608 -2.577,5.217 -3.865,7.824 0.673,0.313 1.345,0.625 2.018,0.938 3.816,-0.96 5.194,-5.829 4.836,-10.184 -1.319,-1.165 -2.692,-2.267 -4.118,-3.304 0.376,1.576 0.752,3.151 1.129,4.726 z"
- id="path76"
- inkscape:connector-curvature="0" /></g><linearGradient
- id="SVGID_6_"
- gradientUnits="userSpaceOnUse"
- x1="322.56961"
- y1="368.34589"
- x2="322.56961"
- y2="475.01251"
- gradientTransform="translate(-199.80201,-323.493)"><stop
- offset="0"
- style="stop-color:#D1DBE8"
- id="stop79" /><stop
- offset="1"
- style="stop-color:#C4CDDC"
- id="stop81" /></linearGradient><path
- style="fill:url(#SVGID_6_);fill-rule:evenodd"
- d="m 122.55399,58.04 c -0.472,1 -0.945,1.999 -1.417,2.999 0.722,0.313 1.445,0.627 2.168,0.94 0.365,-1.137 0.73,-2.275 1.095,-3.413 -0.603,-0.26 -1.206,-0.52 -1.809,-0.78 -0.013,0.084 -0.025,0.169 -0.037,0.254 z"
- id="path83"
- inkscape:connector-curvature="0" /><g
- id="g85"
- transform="translate(-199.80201,-323.493)"><linearGradient
- id="SVGID_7_"
- gradientUnits="userSpaceOnUse"
- x1="272.83749"
- y1="368.69739"
- x2="272.83749"
- y2="474.75171"><stop
- offset="0"
- style="stop-color:#D1DBE8"
- id="stop88" /><stop
- offset="1"
- style="stop-color:#C4CDDC"
- id="stop90" /></linearGradient><path
- style="fill:url(#SVGID_7_);fill-rule:evenodd"
- d="m 289.565,475.865 c -1.934,-0.202 -3.929,-0.524 -5.938,-0.96 0.533,-10.776 -2.327,-14.988 -5.941,-20.313 -2.057,-3.029 -4.387,-6.462 -6.424,-11.704 0.232,-3.271 1.997,-4.275 3.555,-5.163 1.275,-0.727 2.479,-1.413 1.998,-3.28 -0.096,-0.164 -0.096,-0.164 -1.222,-0.578 -2.546,-0.935 -8.511,-3.123 -11.348,-4.93 -6.877,-4.377 -13.845,-13.534 -20.711,-27.213 5.141,-13.864 15.829,-25.245 29.361,-31.274 0.786,2.477 1.591,5.021 1.737,6.015 l -1.458,8.292 -1.458,8.372 c 0.583,3.561 1.838,6.961 3.052,10.25 1.614,4.371 3.281,8.887 3.357,13.59 -2.776,-0.693 -14.013,-1.111 -15.644,-1.111 h -0.102 l -1.631,1.585 v 0.105 c 0,6.491 8.881,11.957 14.996,12.867 0.383,0.058 0.781,0.086 1.182,0.086 1.528,0 3.001,-0.416 4.425,-0.817 1.436,-0.405 2.92,-0.824 4.474,-0.824 0.413,0 0.824,0.03 1.22,0.089 13.326,1.986 15.562,6.703 15.026,14.712 -2.567,9.616 -8.209,22.441 -11.942,30.928 l -0.564,1.276 z"
- id="path92"
- inkscape:connector-curvature="0" /><path
- style="fill:#f5fbfd"
- d="m 272.741,370.792 c 0.736,2.319 1.466,4.644 1.632,5.632 l -2.904,16.661 -0.015,0.084 0.014,0.084 c 0.587,3.499 1.847,6.911 3.065,10.21 1.57,4.253 3.191,8.644 3.335,13.193 -3.276,-0.657 -13.81,-1.05 -15.387,-1.05 h -0.203 l -0.146,0.141 -0.837,0.813 -0.646,0.627 -0.152,0.147 v 0.211 c 0,4.531 5.786,11.712 15.208,13.115 0.395,0.059 0.806,0.089 1.22,0.089 1.563,0 3.053,-0.42 4.493,-0.827 1.419,-0.4 2.886,-0.814 4.405,-0.814 0.401,0 0.799,0.029 1.183,0.086 6.37,0.949 10.356,2.524 12.543,4.956 1.889,2.101 2.57,4.926 2.274,9.443 -2.575,9.637 -8.198,22.421 -11.921,30.884 l -0.492,1.119 c -1.796,-0.194 -3.65,-0.493 -5.523,-0.892 0.49,-10.702 -2.377,-14.926 -5.995,-20.255 -2.042,-3.008 -4.355,-6.415 -6.378,-11.602 0.24,-3.093 1.931,-4.057 3.425,-4.908 1.301,-0.741 2.646,-1.507 2.116,-3.56 l -0.022,-0.087 -0.051,-0.074 c -0.104,-0.149 -0.104,-0.149 -1.306,-0.59 -2.321,-0.852 -8.485,-3.114 -11.299,-4.905 -6.822,-4.343 -13.743,-13.431 -20.573,-27.018 5.101,-13.665 15.618,-24.897 28.937,-30.913 m 0.307,-0.685 c -13.74,6.037 -24.57,17.472 -29.787,31.631 6.597,13.166 13.598,22.794 20.849,27.409 3.621,2.305 12.398,5.266 12.462,5.359 0.955,3.699 -5.15,2.093 -5.564,8.419 5.597,14.445 13.27,15.045 12.359,32.179 2.078,0.457 4.195,0.811 6.354,1.028 3.832,-8.726 9.872,-22.225 12.598,-32.457 0.557,-8.315 -1.871,-12.984 -15.239,-14.975 -0.427,-0.064 -0.846,-0.092 -1.257,-0.092 -3.144,0 -5.88,1.641 -8.898,1.641 -0.377,0 -0.759,-0.026 -1.146,-0.083 -6.077,-0.905 -14.782,-6.232 -14.782,-12.62 0.494,-0.48 0.989,-0.96 1.483,-1.44 1.956,0 13.993,0.484 15.897,1.198 0,-8.417 -5.042,-15.941 -6.416,-24.133 0.972,-5.58 1.945,-11.162 2.918,-16.743 -0.154,-1.05 -1.001,-3.704 -1.831,-6.321 l 0,0 z"
- id="path94"
- inkscape:connector-curvature="0" /></g><g
- id="g96"
- transform="translate(-199.80201,-323.493)"><linearGradient
- id="SVGID_8_"
- gradientUnits="userSpaceOnUse"
- x1="272.82639"
- y1="368.33749"
- x2="272.82639"
- y2="475.51071"><stop
- offset="0"
- style="stop-color:#D1DBE8"
- id="stop99" /><stop
- offset="1"
- style="stop-color:#C4CDDC"
- id="stop101" /></linearGradient><path
- style="fill:url(#SVGID_8_);fill-rule:evenodd"
- d="m 287.081,428.701 c -4.097,-0.61 -7.409,2.046 -11.301,1.466 -6.077,-0.905 -14.782,-6.232 -14.782,-12.62 0.494,-0.48 0.989,-0.96 1.483,-1.44 1.956,0 13.993,0.484 15.897,1.198 0,-8.417 -5.042,-15.941 -6.416,-24.133 0.972,-5.58 1.945,-11.162 2.918,-16.743 -0.154,-1.05 -1.001,-3.704 -1.831,-6.321 -13.74,6.037 -24.57,17.472 -29.787,31.631 6.597,13.166 13.598,22.794 20.849,27.409 3.621,2.305 12.398,5.266 12.462,5.359 0.955,3.699 -5.15,2.093 -5.564,8.419 5.597,14.445 13.187,15.646 12.276,32.78 2.078,0.457 4.047,0.713 6.206,0.93 2.76103,-10.7429 8.89487,-23.77947 12.829,-32.96 0.556,-8.315 -1.871,-12.984 -15.239,-14.975 z"
- id="path103"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="cccccccccccccccc" /></g><path
- style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
- d="m 143.92999,71.247 c -2.151,-3.9 -5.028,-7.893 -8.025,-11.143"
- id="path105"
- inkscape:connector-curvature="0" /><path
- style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
- d="m 132.77899,56.97 c -1.308,-1.156 -3.383,-3.07 -4.992,-4.109"
- id="path107"
- inkscape:connector-curvature="0" /><path
- style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
- d="m 73.432991,46.99 c -14.161,6.084 -24.626,17.909 -29.827,32.251"
- id="path109"
- inkscape:connector-curvature="0" /><g
- id="g111"
- transform="translate(-199.80201,-323.493)"><path
- style="fill:#e1dfe2;fill-rule:evenodd"
- d="m 295.344,476.415 c -30.44,0 -55.144,-24.514 -55.476,-54.876 -0.002,0.206 -0.016,0.409 -0.016,0.616 0,30.647 24.844,55.492 55.492,55.492 30.647,0 57.06855,-24.52869 55.492,-55.492 -0.0105,-0.2067 -0.013,-0.41 -0.016,-0.616 -0.48966,30.20434 -25.035,54.876 -55.476,54.876 z"
- id="path113"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="scssscs" /></g><path
- style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
- d="M 90.267991,152.213"
- id="path115"
- inkscape:connector-curvature="0" /><path
- style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
- d="M 83.481991,151.099"
- id="path117"
- inkscape:connector-curvature="0" /><g
- id="g121"
- transform="translate(-199.80201,-323.493)"><path
- style="fill:#37577e;fill-rule:evenodd"
- d="m 295.344,366.659 c 30.441,0 54.98834,24.98797 55.476,54.878 0.002,-0.205 0.0107,-0.40807 0.016,-0.614 0.78828,-30.647 -24.845,-55.492 -55.492,-55.492 -30.647,0 -55.492,24.845 -55.492,55.492 0,0.206 0.013,0.408 0.016,0.614 0.331,-30.363 25.035,-54.878 55.476,-54.878 z"
- id="path123"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="scssscs" /></g></svg>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * This file is part of Dali Toolkit
- *
- * 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.
- */
-
-{
- "styles":
- {
- "ProgressBar":
- {
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.
- *
- */
-{
- // Data picker loaded directly on to the stage
- //
- "templates": {
- "date-picker":
- {
- "type":"FlexContainer",
- "name":"exampleDatePicker",
- "flexDirection":"ROW",
- "size":[480.0, 150, 0 ],
- "actors": [
- {
-
- "type": "Spin",
- "name": "Year",
- "Value":2017,
- "MinValue":1900,
- "MaxValue":2100,
- "Step":1,
- "TextColor":[0.0,0.0,1.0,1.0],
- "properties": { // properties registered dynamically
- "flex":0.3,
- "flexMargin": [5.0,0.0,5.0,0.0]
- }
- },
- {
-
- "type": "Spin",
- "name": "Month",
- "Value":10,
- "Step":1,
- "MinValue":1,
- "MaxValue":12,
- "TextColor":[1.0,1.0,1.0,1.0],
- "properties": { // properties registered dynamically
- "flex":0.3,
- "flexMargin": [5.0,0.0,5.0,0.0]
- }
-
- },
- {
-
- "type": "Spin",
- "name": "Day",
- "Value":1,
- "MinValue":1,
- "MaxValue":31,
- "TextColor":[1.0,0.0,0.0,1.0],
- "properties": { // properties registered dynamically
- "flex":0.3,
- "flexMargin": [5.0,0.0,5.0,0.0]
- }
- }]
-
- }
-}
-
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * This file is part of Dali Toolkit
- *
- * 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.
- */
-
-{
- "styles": {
- "Spin": {
- "MinValue": 0,
- "MaxValue": 100,
- "Value": 50,
- "Step": 1,
- "TextColor": [ 1.0, 0.0, 0.0, 1.0 ]
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 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.
- *
- */
-{
- // Data picker loaded directly on to the stage
- //
- "stage": [{
-
- "type":"FlexContainer",
- "name":"exampleDatePicker",
- "parentOrigin": "CENTER",
- "anchorPoint": "CENTER",
- "flexDirection":"ROW",
- "size":[480.0, 150, 0 ],
- "actors": [
- {
-
- "type": "Spin",
- "name": "Year",
- "parentOrigin": "CENTER",
- "anchorPoint": "CENTER",
- "MinValue":1900,
- "MaxValue":2100,
- "Value":2017,
- "Step":1,
- "TextColor":[0.0,0.0,1.0,1.0],
- "properties": { // properties registered dynamically
- "flex":0.3,
- "flexMargin": [5.0,0.0,5.0,0.0]
- }
- },
- {
-
- "type": "Spin",
- "name": "Month",
- "parentOrigin": "CENTER",
- "anchorPoint": "CENTER",
- "parentOrigin": "CENTER",
- "Step":1,
- "MinValue":1,
- "MaxValue":12,
- "Value":10,
- "TextColor":[1.0,1.0,1.0,1.0],
- "properties": { // properties registered dynamically
- "flex":0.3,
- "flexMargin": [5.0,0.0,5.0,0.0]
- }
-
- },
- {
-
- "type": "Spin",
- "name": "Day",
- "parentOrigin": "CENTER",
- "anchorPoint": "CENTER",
- "MinValue":1,
- "MaxValue":31,
- "Value":1,
- "TextColor":[1.0,0.0,0.0,1.0],
- "properties": { // properties registered dynamically
- "flex":0.3,
- "flexMargin": [5.0,0.0,5.0,0.0]
- }
- }]
-
-}]
-
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2014 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.
- *
- */
-{
- // a tree of actors
- "stage": [
- // You can add an array of Actors / Views here
- // Lets add a spin to the stage
- {
- "type":"Spin",
- "parentOrigin":"CENTER",
- "size":[120,120,0]
- // now lets use the C# app json-loader.exe to load it
- }
-
- ]
-}
+++ /dev/null
-{
- "constants": {
- "STYLE_DIR": "{APPLICATION_RESOURCE_PATH}/style"
- },
- "styles": {
- "Title": {
- "textColor": "#0000ff",
- "background": {
- "visualType": "COLOR",
- "mixColor": [ 1.0, 1.0, 1.0, 1.0 ]
- }
- },
- "TableView": {
- "background": {
- "visualType": "COLOR",
- "mixColor": [ 1.0, 1.0, 1.0, 0.03 ]
- }
- },
- "FlexContainer": {
- "background": {
- "visualType": "COLOR",
- "mixColor": [ 1.0, 1.0, 1.0, 0.1 ]
- }
- },
- "RadioButton": {
- "label": {
- "textColor": [ 1, 1, 1, 1 ]
- }
- },
- "CheckBoxButton": {
- "label": {
- "textColor": [ 1, 1, 1, 1 ]
- }
- },
- "ColorLabel1": {
- "textColor": [ 1, 0, 0, 1 ]
- },
- "ColorLabel2": {
- "textColor": [ 0, 1, 0, 1 ]
- },
- "ColorLabel3": {
- "textColor": [ 0.3, 0.3, 1, 1 ]
- },
- "ThemeLabel": {
- "textColor": [ 0, 1, 1, 1 ]
- },
- "PopupTitle": {
- "textColor": [ 1, 1, 1, 1 ]
- },
- "PopupBody": {
- "textColor": [ 1, 1, 0, 1 ]
- },
- "TextLabel": {
- "textColor": [ 0, 0, 0, 1 ]
- },
- "ColorSlider1": {
- "styles": [ "Slider" ]
- },
- "ColorSlider2": {
- "styles": [ "slider" ]
- },
- "ColorSlider3": {
- "styles": [ "slider" ]
- },
- "ImageChannelControl": {
- "enableVisibilityTransition": [
- {
- "target": "imageVisual",
- "property": "opacity",
- "initialValue": 0,
- "targetValue": 1,
- "animator": {
- "alphaFunction": "EASE_IN_OUT",
- "timePeriod": {
- "duration": 0.25,
- "delay": 0
- }
- }
- },
- {
- "target": "imageVisual",
- "property": "size",
- "targetValue": [ 1, 1 ]
- }
- ],
- "disableVisibilityTransition": [
- {
- "target": "imageVisual",
- "property": "opacity",
- "targetValue": 0,
- "animator": {
- "alphaFunction": "EASE_IN_OUT",
- "timePeriod": {
- "duration": 0.25,
- "delay": 0
- }
- }
- },
- {
- "target": "imageVisual",
- "property": "size",
- "targetValue": [ 1, 1, 1 ]
- }
- ]
- },
- "ShadowButton": {
- "backgroundVisual": {
- "visualType": "IMAGE",
- "url": "{STYLE_DIR}/images/shadowButtonBg.9.png",
- "mixColor": [ 1, 1, 1, 0 ]
- },
- "checkboxBgVisual": {
- "visualType": "IMAGE",
- "url": "{STYLE_DIR}/images/CheckBg.png",
- "transform": {
- "size": [ 0.09, 0.28 ],
- "offset": [ 30, 0 ],
- "offsetSizeMode": [ 1, 1, 0, 0 ],
- "origin": "CENTER_BEGIN",
- "anchorPoint": "CENTER_BEGIN"
- }
- },
- "checkboxFgVisual": {
- "visualType": "IMAGE",
- "url": "{STYLE_DIR}/images/Tick.png",
- "transform": {
- "size": [ 0.09, 0.28 ],
- "offset": [ 30, 0 ],
- "offsetSizeMode": [ 1, 1, 0, 0 ],
- "origin": "CENTER_BEGIN",
- "anchorPoint": "CENTER_BEGIN"
- }
- },
- "labelVisual": {
- "visualType": "TEXT",
- "text": "Don't show again",
- "pointSize": 20,
- "horizontalAlignment": "END",
- "verticalAlignment": "CENTER",
- "textColor": [ 1, 1, 1, 1 ],
- "mixColor": [ 0.3, 0.3, 0.3, 1 ],
- "transform": {
- "size": [ 0.9, 0.9 ],
- "offset": [ -30, 0 ],
- "offsetSizeMode": [ 1, 1, 0, 0 ],
- "origin": "CENTER_END",
- "anchorPoint": "CENTER_END"
- }
- },
- "activeTransition": [
- {
- "target": "checkboxBgVisual",
- "property": "size",
- "initialValue": [ 0.09, 0.28 ],
- "targetValue": [ 0.12, 0.37 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "backgroundVisual",
- "property": "mixColor",
- "initialValue": [ 1, 1, 1, 0 ],
- "targetValue": [ 1, 1, 1, 1 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "backgroundVisual",
- "property": "size",
- "initialValue": [ 0.9, 0.9 ],
- "targetValue": [ 1, 1 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "checkboxFgVisual",
- "property": "size",
- "initialValue": [ 0.09, 0.28 ],
- "targetValue": [ 0.12, 0.37 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "labelVisual",
- "property": "mixColor",
- "initialValue": [ 0.2, 0.2, 0.2, 1.0 ],
- "targetValue": [ 0, 0, 0, 1 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- }
- ],
- "inactiveTransition": [
- {
- "target": "checkboxBgVisual",
- "property": "size",
- "initialValue": [ 0.12, 0.37 ],
- "targetValue": [ 0.09, 0.28 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "backgroundVisual",
- "property": "mixColor",
- "targetValue": [ 1, 1, 1, 0 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "checkboxFgVisual",
- "property": "size",
- "initialValue": [ 0.12, 0.37 ],
- "targetValue": [ 0.09, 0.28 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "labelVisual",
- "property": "mixColor",
- "targetValue": [ 0.4, 0.4, 0.4, 1.0 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- },
- {
- "target": "backgroundVisual",
- "property": "size",
- "targetValue": [ 0.9, 0.9 ],
- "animator": {
- "alphaFunction": "EASE_OUT_BACK",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- }
- ],
- "checkTransition": [
- {
- "target": "checkboxFgVisual",
- "property": "pixelArea",
- "initialValue": [ 0.0, 0.0, 0.0, 1.0 ],
- "targetValue": [ 0.0, 0.0, 1.0, 1.0 ],
- "animator": {
- "alphaFunction": "EASE_IN",
- "timePeriod": {
- "duration": 0.4,
- "delay": 0
- }
- }
- },
- {
- "target": "checkboxFgVisual",
- "property": "size",
- "initialValue": [ 0.0, 0.37 ],
- "targetValue": [ 0.12, 0.37 ],
- "animator": {
- "alphaFunction": "EASE_IN",
- "timePeriod": {
- "duration": 0.4,
- "delay": 0
- }
- }
- }
- ],
- "uncheckTransition": [
- {
- "target": "checkboxFgVisual",
- "property": "pixelArea",
- "initialValue": [ 0.0, 0.0, 1.0, 1.0 ],
- "targetValue": [ 0.0, 0.0, 0.0, 1.0 ],
- "animator": {
- "alphaFunction": "EASE_OUT",
- "timePeriod": {
- "duration": 0.4,
- "delay": 0
- }
- }
- },
- {
- "target": "checkboxFgVisual",
- "property": "size",
- "targetValue": [ 0.0, 0.37 ],
- "animator": {
- "alphaFunction": "EASE_OUT",
- "timePeriod": {
- "duration": 0.4,
- "delay": 0
- }
- }
- }
- ]
- },
- "BeatControl": {
- "beatVisual": {
- "visualType": "IMAGE",
- "url": "{APPLICATION_RESOURCE_PATH}/images/Logo-for-demo.png"
- },
-
- "bounceTransition": [
- {
- "target": "beatVisual",
- "property": "size",
- "initialValue": [ 0.5, 0.5 ],
- "targetValue": [ 0.75, 0.75 ],
- "animator": {
- "alphaFunction": "BOUNCE",
- "timePeriod": {
- "duration": 0.5,
- "delay": 0
- }
- }
- }
- ],
-
- "leftTransition": [
- {
- "target": "beatVisual",
- "property": "offset",
- "initialValue": [ 0, 0 ],
- "targetValue": [ 0.25, 0 ],
- "animator": {
- "alphaFunction": "BOUNCE",
- "timePeriod": {
- "duration": 0.5,
- "delay": 0
- }
- }
- }
- ],
-
- "upTransition": [
- {
- "target": "beatVisual",
- "property": "offset",
- "initialValue": [ 0, 0 ],
- "targetValue": [ 0, 0.25 ],
- "animator": {
- "alphaFunction": "BOUNCE",
- "timePeriod": {
- "duration": 0.5,
- "delay": 0
- }
- }
- }
- ],
-
- "fadeTransition": [
- {
- "target": "beatVisual",
- "property": "opacity",
- "targetValue": 0,
- "animator": {
- "alphaFunction": "BOUNCE",
- "timePeriod": {
- "duration": 0.8,
- "delay": 0
- }
- }
- }
- ]
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-newmtl lambert2SG
-illum 4
-Kd 0.00 0.00 0.00
-Ka 0.00 0.00 0.00
-Tf 1.00 1.00 1.00
-map_Kd Dino-Painted_lambert2SG_color.png
-bump Dino-Painted_lambert2SG_nmap.png -bm 0.05
-Ni 1.00
-Ks 0.00 0.00 0.00
-map_Ks Dino-Painted_lambert2SG_gloss.png
-Ns 100.00
+++ /dev/null
-using System;
-using Tizen.NUI;
-
-
-namespace NUIsamples
-{
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- ///
-
- class Application
- {
- [STAThread]
- static void Main(string[] args)
- {
- //new ControlDashboard.Example().Run(args);
- //new DatePickerTest.Example().Run(args);
- //new DatePickerUsingJson.Example().Run(args);
- //new HelloTest.Example().Run(args);
- //new HelloWorldTest.Example().Run(args);
- //new Test1.Example().Run(args);
- //new SiblingOrderTest.Example().Run(args);
- //new UserAlphaFunctionTest.Example().Run(args);
- //new MyCSharpExample.Example().Run(args);
- //new CustomControlTest.Example().Run(args);
- //new ScrollViewTest.Example().Run(args);
- //new ImageViewTest.Example().Run(args);
- //new FlexContainerTest.SampleMain().Run(args);
- //new DaliTest.Example().Run(args);
- //new RelativeVectorTest.Example().Run(args);
- //new VisaulAnimationExample.Example().Run(args);
- //new VisaulAnimationExample.Example2().Run(args);
- //new VisaulAnimationExample.Example3().Run(args);
- //new VisualViewTest.Example().Run(args);
- //new VisualViewTest2.VisualSample().Run(args);
- //new PositionUsesPivotPointTest.Example().Run(args);
- //new VisualViewTest3.Example().Run(args);
- //new VisualsUsingCustomView.VisualsExample().Run(args);
- //new FirstScreen.FirstScreenApp().Run(args);
- //new VisualsExampleTest.Example().Run(args);
- //new AsIsTest.Example().Run(args);
- //new WidgetViewTest.Example().Run(args);
- new TimerTest.Example().Run(args);
- }
- }
-}
+++ /dev/null
-using System;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI;
-
-namespace AsIsTest
-{
- class Example : NUIApplication
- {
- private Timer myTimer;
-
- private View myView;
- private TextLabel myTextLabel;
-
-
- //===========================
- Layer layer;
- View vi1, vi2, vi3;
- TextLabel tl1, tl2, tl3;
- ToggleButton tb1, tb2, tb3;
-
-
- protected override void OnCreate()
- {
- base.OnCreate();
-
- myView = new View();
- myView.Size2D = new Size2D(100, 100);
- myView.Position = new Position(100, 100, 0);
- myView.BackgroundColor = Color.Red;
- myView.Name = "myView";
- myView.SizeWidth = 111;
-
- Window.Instance.GetDefaultLayer().Add(myView);
-
- myTextLabel = new TextLabel();
- myTextLabel.Position = new Position(100, 100, 0);
- myTextLabel.Size2D = new Size2D(100, 100);
- myTextLabel.Name = "myTextLabel";
-
- myView.Add(myTextLabel);
-
- //===========================
- LayerTest2();
-
- myTimer = new Timer(500);
- myTimer.Tick += Mytimer_Tick;
- myTimer.Start();
- }
-
- private void ObjectDumpTrigger()
- {
- for (int i = 0; i < Window.LayerCount; i++)
- {
- BFS(Window.GetLayer((uint)i), 1);
- }
- }
-
-
-
- private static void BFS(Animatable o, int depth)
- {
- if (o == null)
- {
- Tizen.Log.Fatal("NUI-APP", "##### o == null! return here!");
- return;
- }
-
- Tizen.Log.Fatal("NUI-APP", "##### o.GetTypeName()=" + o.GetTypeName());
-
- if (o is View)
- {
- View myView = o as View;
-
- if (o is TextLabel)
- {
- TextLabel myTextLabel = o as TextLabel;
-
- Tizen.Log.Fatal("NUI-APP", string.Format("it is TextLabel, {0}", myTextLabel.Text));
-
- return;
- }
- else
- {
- Tizen.Log.Fatal("NUI-APP", string.Format("it is not TextLaebl"));
- }
-
- for (int i = 0; i < myView.ChildCount; i++)
- {
- BFS(myView.GetChildAt((uint)i), depth + 1);
- }
- }
- else if (o is Layer)
- {
- Layer myLayer = o as Layer;
-
- for (int i = 0; i < myLayer.ChildCount; i++)
- {
- BFS(myLayer.GetChildAt((uint)i), depth + 1);
- }
- }
- else
- {
- return;
- }
- }
-
- private bool Mytimer_Tick(object source, Timer.TickEventArgs e)
- {
- ObjectDumpTrigger();
- ObjectDumpTrigger2();
- Tizen.Log.Debug("NUI", " === Size property set/get test!");
- myView.Size2D.Width += 5; //this is not working, because stage's Size is Vector2 but view's Size is Vector3. need to figure out.
- myView.SizeHeight += 5;
- Tizen.Log.Debug("NUI", $" view's size width= {myView.Size2D.Width} heigh={myView.Size2D.Height}");
-
- return true;
- }
-
-
-
- //======================================================================
- void LayerTest2()
- {
- layer = new Layer();
-
- vi1 = new View();
- vi2 = new View();
- vi3 = new View();
-
- tl1 = new TextLabel();
- tl2 = new TextLabel();
- tl3 = new TextLabel();
-
- tb1 = new ToggleButton();
- tb2 = new ToggleButton();
- tb3 = new ToggleButton();
-
- vi1.Add(vi3);
- vi1.Add(tl1);
- vi1.Add(tl2);
-
- vi3.Add(tb1);
- vi3.Add(tb2);
-
- vi2.Add(tl3);
-
- layer.Add(vi1);
- layer.Add(vi2);
- layer.Add(tb3);
-
- Window.Instance.AddLayer(layer);
- }
-
- void ObjectDumpTrigger2()
- {
- uint layerCnt = Window.LayerCount;
- Tizen.Log.Fatal("NUI-APP", "layerCnt=" + layerCnt);
-
- for (uint i = 0; i < layerCnt; i++)
- {
- Tizen.Log.Fatal("NUI-APP", "T[" + DateTime.Now + "]__________ layer #" + i + " traverse");
- CheckViewsInLayer(Window.GetLayer(i));
- }
- }
- void CheckViewsInLayer(Animatable obj)
- {
- if (obj is Layer)
- {
- var layer = obj as Layer;
- if (layer == null)
- {
- Tizen.Log.Fatal("NUI-APP", "### layer is null! just return!");
- return;
- }
- uint childCnt = layer.ChildCount;
- if (childCnt > 0)
- {
- for (uint i = 0; i < childCnt; i++)
- {
- var temp = layer.GetChildAt(i) as View;
- Tizen.Log.Fatal("NUI-APP", "depth[1] child in layer! type=" + temp?.GetTypeName());
- ViewCheckRecurse(temp, 1);
- }
- }
- else
- {
- Tizen.Log.Fatal("NUI-APP", "### there is no child in this layer! just return!");
- }
- }
- else
- {
- Tizen.Log.Fatal("NUI-APP", "obj is NOT Layer! do nothing!");
- }
- }
- void ViewCheckRecurse(View view, int depth)
- {
- if (view)
- {
- uint childCnt = view.ChildCount;
- if (childCnt > 0)
- {
- depth = depth + 1;
- for (uint i = 0; i < childCnt; i++)
- {
- var temp = view.GetChildAt(i) as View;
- Tizen.Log.Fatal("NUI-APP", "depth[" + depth + "] child in layer! type=" + temp.GetTypeName() + " AS-IS Test: IsView?=" + (temp is View) + " IsTextLabel?=" + (temp is TextLabel) );
-
- if (temp is TextLabel)
- {
- ToggleButton _toggleBt = temp as ToggleButton;
- if(_toggleBt == null)
- {
- Tizen.Log.Debug("NUI", $"temp is TextLabel! try to do invalid cast! should return null! OK!GOOD!");
- }
- else
- {
- Tizen.Log.Debug("NUI", $"temp is TextLabel! try to do invalid cast! should return null! BAD!ERROR!");
- }
- }
- else if (temp is ToggleButton)
- {
- TextLabel _textLb = temp as TextLabel;
- if(_textLb == null)
- {
- Tizen.Log.Debug("NUI", $"temp is ToggleButton! try to do invalid cast! should return null! OK!GOOD!");
- }
- else
- {
- Tizen.Log.Debug("NUI", $"temp is ToggleButton! try to do invalid cast! should return null! BAD!ERROR!");
- }
- }
-
- ViewCheckRecurse(temp, depth);
- }
- }
- else
- {
- //Tizen.Log.Fatal("NUI-APP", "depth[" + depth + "] child in layer! type=" + view.GetTypeName());
- return;
- }
- }
- else
- {
- //Tizen.Log.Fatal("NUI-APP", "### view is null! just return!");
- }
- }
-
- private static void _Main(string[] args)
- {
- //Create an Application
- Example myProgram = new Example();
- myProgram.Run(args);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace ControlDashboard
-{
- class Example : NUIApplication
- {
- // This is simple structure to contain Control name and implement state at once
- // name : control name
- // isImplemented : the state which the control is implemented in public or not
- private struct Item
- {
- public String name;
- public bool isImplemented;
-
- public Item(String name, bool isImplemented)
- {
- this.name = name;
- this.isImplemented = isImplemented;
- }
- }
-
- private TableView _contentContainer;
- private Timer _timer;
- private Window _window;
- private Popup _popup;
- private ProgressBar _progressBar;
- //private const string _resPath = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private const string _resPath = "./res"; //for ubuntu
-
-
- // List of items
- private Item[] mViewList = {
- new Item("PushButton", true), new Item("DropDown", false), new Item("Toggle", true),
- new Item("InputField", false), new Item("AnimateGif", false), new Item("Loading", false),
- new Item("ProgressBar", true), new Item("CheckBox", false), new Item("RadioButton", true),
- new Item("Tooltip", true), new Item("Popup", true), new Item("Toast", true),
- new Item("ItemView", false), new Item("CheckBox", true)
- };
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, NUIApplication.WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Tizen.Log.Debug("NUI", "Customized Application Initialize event handler");
- _window = Window.Instance;
- _window.BackgroundColor = Color.White;
-
- // Top label
- TextLabel topLabel = new TextLabel();
- topLabel.WidthResizePolicy = ResizePolicyType.FillToParent;
- topLabel.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- topLabel.PivotPoint = PivotPoint.TopCenter;
- topLabel.SetSizeModeFactor(new Vector3(0.0f, 0.1f, 0.0f));
- topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
- topLabel.TextColor = Color.White;
- topLabel.Text = " DALi Views";
- topLabel.HorizontalAlignment = HorizontalAlignment.Begin;
- topLabel.VerticalAlignment = VerticalAlignment.Center;
- topLabel.PointSize = 42.0f;
- _window.Add(topLabel);
- //StyleManager.Get().ApplyStyle(topLabel, _resPath + "/json/control-dashboard-theme.json", "TextFieldFontSize4");
- topLabel.SetStyleName("TextFieldFontSize4");
-
- // Grid container to contain items. Use tableView because FlexContainer support focus navigation just two direction ( up/down or left/right )
- _contentContainer = new TableView(6, 5);
- _contentContainer.WidthResizePolicy = ResizePolicyType.FillToParent;
- _contentContainer.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- _contentContainer.SetSizeModeFactor(new Vector3(0.0f, 0.9f, 0.0f));
- _contentContainer.PivotPoint = PivotPoint.BottomCenter;
- _contentContainer.Position = new Position(0, _window.Size.Height * 0.1f, 0);
- _contentContainer.SetRelativeHeight(0, 0.07f);
- _contentContainer.SetRelativeHeight(1, 0.26f);
- _contentContainer.SetRelativeHeight(2, 0.07f);
- _contentContainer.SetRelativeHeight(3, 0.26f);
- _contentContainer.SetRelativeHeight(4, 0.07f);
- _contentContainer.SetRelativeHeight(5, 0.26f);
- _contentContainer.Focusable = (true);
- _window.Add(_contentContainer);
-
- CreateContent();
-
- FocusManager.Instance.PreFocusChange += OnPreFocusChange;
- }
-
- // Callback for KeyboardFocusManager
- private View OnPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
- {
- if (!e.ProposedView && !e.CurrentView)
- {
- e.ProposedView = _contentContainer.GetChildAt(1);
- }
- return e.ProposedView;
- }
-
- private void CreateContent()
- {
- for (int i = 0; i < mViewList.Length; i++)
- {
- CreateItem(mViewList[i], i);
- }
- }
-
- private void CreateItem(Item item, int idx)
- {
- // Make label for item
- TextLabel itemLabel = new TextLabel(" " + item.name);
- itemLabel.Size2D = new Size2D((int)(_window.Size.Width * 0.2f), (int)(_window.Size.Height * 0.05f));
- itemLabel.HorizontalAlignment = HorizontalAlignment.Begin;
- itemLabel.VerticalAlignment = VerticalAlignment.Bottom;
- //itemLabel.PointSize = 18.0f;
- _contentContainer.AddChild(itemLabel, new TableView.CellPosition(((uint)idx / 5) * 2, (uint)idx % 5));
-
- // If item is implemented in public, attach it on window
- if (item.isImplemented)
- {
- if (item.name.CompareTo("PushButton") == 0)
- {
- PushButton pushButton = new PushButton();
- pushButton.LabelText = "Push Button";
- pushButton.WidthResizePolicy = ResizePolicyType.FillToParent;
- pushButton.HeightResizePolicy = ResizePolicyType.FillToParent;
- pushButton.UnselectedColor = new Vector4(1.0f, 0.0f, 0.0f, 1.0f);
- pushButton.SelectedColor = new Vector4(0.0f, 1.0f, 0.0f, 1.0f);
- pushButton.Clicked += (obj, e) =>
- {
- Button sender = obj as Button;
- sender.LabelText = "Click Me";
- sender.UnselectedColor = new Vector4(0.0f, 0.0f, 1.0f, 1.0f);
- return true;
- };
-
- _contentContainer.AddChild(pushButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("DropDown") == 0)
- {
-
- }
- if (item.name.CompareTo("Toggle") == 0)
- {
- ToggleButton toggleButton = new ToggleButton();
- PropertyArray array = new PropertyArray();
- array.Add(new PropertyValue(_resPath + "/images/star-highlight.png"));
- array.Add(new PropertyValue(_resPath + "/images/star-mod.png"));
- array.Add(new PropertyValue(_resPath + "/images/star-dim.png"));
- toggleButton.StateVisuals = array;
-
- PropertyArray tooltips = new PropertyArray();
- tooltips.Add(new PropertyValue("State A"));
- tooltips.Add(new PropertyValue("State B"));
- tooltips.Add(new PropertyValue("State C"));
- toggleButton.Tooltips = tooltips;
-
- toggleButton.WidthResizePolicy = ResizePolicyType.FillToParent;
- toggleButton.HeightResizePolicy = ResizePolicyType.FillToParent;
- toggleButton.Clicked += (obj, e) =>
- {
- Tizen.Log.Debug("NUI", "Toggle button state changed.");
- return true;
- };
-
- _contentContainer.AddChild(toggleButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("InputField") == 0)
- {
-
- }
- if (item.name.CompareTo("AnimateGif") == 0)
- {
-
- }
- if (item.name.CompareTo("Loading") == 0)
- {
-
- }
- if (item.name.CompareTo("ProgressBar") == 0)
- {
- _progressBar = new ProgressBar();
- _progressBar.WidthResizePolicy = ResizePolicyType.FillToParent;
- _progressBar.HeightResizePolicy = ResizePolicyType.Fixed;
- _progressBar.Size2D = new Size2D(0, 100);
-
- _progressBar.ValueChanged += OnProgressBarValueChanged;
-
- _timer = new Timer(100);
- _timer.Tick += (obj, e) =>
- {
- float progress = (float)Math.Round(_progressBar.ProgressValue, 2);
-
- if (progress == 1.0f)
- {
- _progressBar.ProgressValue = 0.0f;
- _progressBar.SecondaryProgressValue = 0.01f;
- }
- else
- {
- _progressBar.ProgressValue = progress + 0.01f;
- _progressBar.SecondaryProgressValue = progress + 0.21f;
- }
- return true;
- };
- _timer.Start();
-
- _contentContainer.AddChild(_progressBar, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("ScrollBar") == 0)
- {
-
- }
- if (item.name.CompareTo("CheckBox") == 0)
- {
- CheckBoxButton checkBoxButton = new CheckBoxButton();
- checkBoxButton.LabelText = "Yes";
-
- _contentContainer.AddChild(checkBoxButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("RadioButton") == 0)
- {
- TableView tableView = new TableView(2, 1);
- tableView.WidthResizePolicy = ResizePolicyType.FillToParent;
- tableView.HeightResizePolicy = ResizePolicyType.FillToParent;
-
- RadioButton rButton = new RadioButton();
- rButton.LabelText = "Yes";
- rButton.Selected = true;
- tableView.AddChild(rButton, new TableView.CellPosition(0, 0));
-
- rButton = new RadioButton();
- rButton.LabelText = "No";
-
- tableView.AddChild(rButton, new TableView.CellPosition(1, 0));
-
- _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("Tooltip") == 0)
- {
- TableView tableView = new TableView(2, 1);
- tableView.WidthResizePolicy = ResizePolicyType.FillToParent;
- tableView.HeightResizePolicy = ResizePolicyType.FillToParent;
-
- // Create two push buttons and add them to a table view
- PushButton buttonWithSimpleTooltip = new PushButton();
- buttonWithSimpleTooltip.LabelText = "Tooltip with text only";
- buttonWithSimpleTooltip.UnselectedColor = new Vector4(0.5f, 0.5f, 0.7f, 1.0f);
- buttonWithSimpleTooltip.SelectedColor = new Vector4(0.7f, 0.5f, 0.7f, 1.0f);
- buttonWithSimpleTooltip.WidthResizePolicy = ResizePolicyType.FillToParent;
- tableView.AddChild(buttonWithSimpleTooltip, new TableView.CellPosition(0, 0));
-
- PushButton buttonWithIconTooltip = new PushButton();
- buttonWithIconTooltip.LabelText = "Tooltip with Text and Icon";
- buttonWithIconTooltip.WidthResizePolicy = ResizePolicyType.FillToParent;
- buttonWithIconTooltip.UnselectedColor = new Vector4(0.5f, 0.5f, 0.7f, 1.0f);
- buttonWithIconTooltip.SelectedColor = new Vector4(0.7f, 0.5f, 0.7f, 1.0f);
- tableView.AddChild(buttonWithIconTooltip, new TableView.CellPosition(1, 0));
-
- // Add a simple text only tooltip to the first push button
- buttonWithSimpleTooltip.TooltipText = "Simple Tooltip";
-
- // Create a property map for a tooltip with one icon and one text
- PropertyArray iconTooltipContent = new PropertyArray();
-
- PropertyMap iconVisual = new PropertyMap();
- iconVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image))
- .Add(ImageVisualProperty.URL, new PropertyValue(_resPath + "/images/star-highlight.png"));
- iconTooltipContent.Add(new PropertyValue(iconVisual));
-
- PropertyMap textVisual = new PropertyMap();
- textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text))
- .Add(TextVisualProperty.Text, new PropertyValue("Tooltip with Icon"));
- iconTooltipContent.Add(new PropertyValue(textVisual));
-
- PropertyMap iconTooltip = new PropertyMap();
- iconTooltip.Add(Tizen.NUI.Constants.Tooltip.Property.Content, new PropertyValue(iconTooltipContent))
- .Add(Tizen.NUI.Constants.Tooltip.Property.Tail, new PropertyValue(true));
-
- // Add the tooltip with icon and text to the second push button
- buttonWithIconTooltip.Tooltip = iconTooltip;
-
- _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("Popup") == 0)
- {
- PushButton button = new PushButton();
- button.LabelText = "Popup";
- button.PivotPoint = PivotPoint.Center;
- button.MaximumSize = new Size2D(150, 100);
- _popup = CreatePopup();
- _popup.SetTitle(CreateTitle("Popup"));
-
- TextLabel text = new TextLabel("This will erase the file permanently. Are you sure?");
- text.BackgroundColor = Color.White;
- text.MultiLine = true;
- text.WidthResizePolicy = ResizePolicyType.FillToParent;
- text.HeightResizePolicy = ResizePolicyType.DimensionDependency;
- text.SetPadding(new PaddingType(10.0f, 10.0f, 20.0f, 0.0f));
- _popup.SetContent(text);
- _popup.Focusable = (true);
- _popup.SetDisplayState(Popup.DisplayStateType.Hidden);
-
- button.Clicked += (obj, ee) =>
- {
- _window.Add(_popup);
- _popup.SetDisplayState(Popup.DisplayStateType.Shown);
- FocusManager.Instance.SetCurrentFocusView((_popup.FindChildByName("Footer")).FindChildByName("OKButton"));
- return true;
- };
- _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("Toast") == 0)
- {
- PushButton button = new PushButton();
- button.LabelText = "Toast";
- button.PivotPoint = PivotPoint.Center;
- button.Clicked += (obj, ee) =>
- {
- Popup toast = new Popup();
- toast.SizeModeFactor = new Vector3(0.75f, 0.75f, 0.75f);
- toast.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- toast.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- toast.ContextualMode = Popup.ContextualModeType.NonContextual;
- toast.AnimationDuration = 0.65f;
- toast.TailVisibility = false;
-
- // Disable the dimmed backing.
- toast.BackingEnabled = false;
-
- // The toast popup should fade in (not zoom).
- toast.AnimationMode = Popup.AnimationModeType.Fade;
-
- // The toast popup should auto-hide.
- toast.AutoHideDelay = 3000;
-
- // Align to the bottom of the screen.
- toast.ParentOrigin = new Position(0.5f, 0.94f, 0.5f);
- toast.PivotPoint = PivotPoint.BottomCenter;
-
- // Let events pass through the toast popup.
- toast.TouchTransparent = true;
-
- TextLabel text = new TextLabel("This is a Toast.\nIt will auto-hide itself");
- text.TextColor = Color.White;
- text.MultiLine = true;
- text.HorizontalAlignment = HorizontalAlignment.Center;
- toast.SetTitle(text);
- _window.Add(toast);
- toast.DisplayState = Popup.DisplayStateType.Shown;
-
- return true;
- };
- _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- if (item.name.CompareTo("ItemView") == 0)
- {
-
- }
- }
- else
- {
- ImageView notSupportView = new ImageView(_resPath + "/images/not_yet_sign.png");
- notSupportView.Size2D = new Size2D((int)(_window.Size.Width * 0.2f), (int)(_window.Size.Height * 0.25f));
- notSupportView.Focusable = (true);
- _contentContainer.AddChild(notSupportView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
- }
- }
- Popup CreatePopup()
- {
- Popup confirmationPopup = new Popup();
-
- View footer = new View();
- footer.Name = ("Footer");
- footer.WidthResizePolicy = ResizePolicyType.FillToParent;
- footer.HeightResizePolicy = ResizePolicyType.Fixed;
- footer.Size2D = new Size2D(0, 80);
- footer.PivotPoint = PivotPoint.Center;
-
- PushButton okButton = CreateOKButton();
- okButton.PivotPoint = PivotPoint.Center;
- okButton.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
- okButton.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
- okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
-
- PushButton cancelButton = CreateCancelButton();
- cancelButton.PivotPoint = PivotPoint.Center;
- cancelButton.WidthResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
- cancelButton.HeightResizePolicy = ResizePolicyType.SizeFixedOffsetFromParent;
- cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
-
- TableView controlLayout = new TableView(1, 2);
- controlLayout.PivotPoint = PivotPoint.Center;
- controlLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
- controlLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
- controlLayout.SetCellPadding(new Size2D(10, 10));
- controlLayout.SetRelativeWidth(0, 0.5f);
- controlLayout.SetRelativeWidth(1, 0.5f);
- controlLayout.SetCellAlignment(new TableView.CellPosition(0, 0), HorizontalAlignmentType.Center, VerticalAlignmentType.Center);
- controlLayout.SetCellAlignment(new TableView.CellPosition(0, 1), HorizontalAlignmentType.Center, VerticalAlignmentType.Center);
- controlLayout.AddChild(okButton, new TableView.CellPosition(0, 0));
- controlLayout.AddChild(cancelButton, new TableView.CellPosition(0, 1));
-
- footer.Add(controlLayout);
-
- confirmationPopup.SetFooter(footer);
- return confirmationPopup;
- }
- View CreateTitle(string title)
- {
- TextLabel titleView = new TextLabel(title);
- titleView.TextColor = Color.White;
- titleView.MultiLine = true;
- titleView.HorizontalAlignment = HorizontalAlignment.Center;
- return titleView;
- }
-
- PushButton CreateOKButton()
- {
- PushButton okayButton = new PushButton();
- okayButton.Name = ("OKButton");
- okayButton.LabelText = "OK";
- okayButton.Focusable = (true);
- okayButton.Clicked += (obj, ee) =>
- {
- _popup.SetDisplayState(Popup.DisplayStateType.Hidden);
- return true;
- };
- return okayButton;
- }
- PushButton CreateCancelButton()
- {
- PushButton cancelButton = new PushButton();
- cancelButton.LabelText = "Cancel";
- cancelButton.Focusable = (true);
- cancelButton.Clicked += (obj, ee) =>
- {
- _popup.SetDisplayState(Popup.DisplayStateType.Hidden);
- return true;
- };
- return cancelButton;
- }
-
- void OnProgressBarValueChanged(object source, ProgressBar.ValueChangedEventArgs e)
- {
- PropertyMap labelVisual = new PropertyMap();
- labelVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text))
- .Add(TextVisualProperty.Text, new PropertyValue(Math.Round(e.ProgressBar.ProgressValue, 2) + " / " + Math.Round(e.ProgressBar.SecondaryProgressValue, 2)))
- .Add(TextVisualProperty.PointSize, new PropertyValue(10.0f));
- e.ProgressBar.LabelVisual = labelVisual;
- return;
- }
-
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
-
- [STAThread]
- static void _Main(string[] args)
- {
- Tizen.Log.Debug("NUI", "Hello Mono World");
-
- Example example = new Example("/home/owner/apps_rw/NUISamples.TizenTV/res/json/control-dashboard-theme.json");
-
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI;
-
-namespace CustomControlTest
-{
-
- // A custom control for star rating (draggable to change the rating)
- class StarRating : CustomView
- {
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private FlexContainer _container;
- private ImageView[] _images;
- private Vector3 _gestureDisplacement;
- private int _currentValue;
- private int _myRating;
- private bool _myDragEnabled;
-
- // Called by DALi Builder if it finds a StarRating control in a JSON file
- static CustomView CreateInstance()
- {
- return new StarRating();
- }
-
- // static constructor registers the control type (only runs once)
- static StarRating()
- {
- // ViewRegistry registers control type with DALi type registery
- // also uses introspection to find any properties that need to be registered with type registry
- CustomViewRegistry.Instance.Register(CreateInstance, typeof(StarRating) );
- }
-
- public StarRating() : base(typeof(StarRating).Name, CustomViewBehaviour.ViewBehaviourDefault)
- {
- }
-
- public override void OnInitialize()
- {
- // Create a container for the star images
- _container = new FlexContainer();
-
- _container.FlexDirection = FlexContainer.FlexDirectionType.Row;
- _container.WidthResizePolicy = ResizePolicyType.FillToParent;
- _container.HeightResizePolicy = ResizePolicyType.FillToParent;
-
- this.Add(_container);
-
- // Create the images
- _images = new ImageView[5];
-
- for(int i = 0; i < 5; i++)
- {
- _images[i] = new ImageView(resources+"/images/star-dim.png");
- _container.Add( _images[i] );
- }
-
- // Update the images according to the rating (dimmed star by default)
- _myRating = 0;
- UpdateStartImages(_myRating);
-
- // Enable pan gesture detection
- EnableGestureDetection(Gesture.GestureType.Pan);
- _myDragEnabled = true; // Allow dragging by default (can be disabled)
- }
-
- // Pan gesture handling
- public override void OnPan(PanGesture gesture)
- {
- // Only handle pan gesture if dragging is allowed
- if(_myDragEnabled)
- {
- switch (gesture.State)
- {
- case Gesture.StateType.Started:
- {
- _gestureDisplacement = new Vector3(0.0f, 0.0f, 0.0f);
- _currentValue = 0;
- break;
- }
- case Gesture.StateType.Continuing:
- {
- // Calculate the rating according to pan desture displacement
- _gestureDisplacement.X += gesture.Displacement.X;
- int delta = (int)Math.Ceiling(_gestureDisplacement.X / 40.0f);
- _currentValue = _myRating + delta;
-
- // Clamp the rating
- if(_currentValue < 0) _currentValue = 0;
- if(_currentValue > 5) _currentValue = 5;
-
- // Update the images according to the rating
- UpdateStartImages(_currentValue);
- break;
- }
- default:
- {
- _myRating = _currentValue;
- break;
- }
- }
- }
- }
-
- // Update the images according to the rating
- private void UpdateStartImages(int rating)
- {
- for(int i = 0; i < rating; i++)
- {
- _images[i].WidthResizePolicy = ResizePolicyType.UseNaturalSize;
- _images[i].HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- _images[i].SetImage(resources+"/images/star-highlight.png");
- }
-
- for(int i = rating; i < 5; i++)
- {
- _images[i].WidthResizePolicy = ResizePolicyType.UseNaturalSize;
- _images[i].HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- _images[i].SetImage(resources+"/images/star-dim.png");
- }
- }
-
- // Rating property of type int:
- public int Rating
- {
- get
- {
- return _myRating;
- }
- set
- {
- _myRating = value;
- UpdateStartImages(_myRating);
- }
- }
-
- // DragEnabled property of type bool:
- public bool DragEnabled
- {
- get
- {
- return _myDragEnabled;
- }
- set
- {
- _myDragEnabled = value;
- }
- }
- }
-
- class Example : NUIApplication
- {
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- delegate void CallbackDelegate();
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
-
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- // Create a container to layout the rows of image and rating vertically
- FlexContainer container = new FlexContainer();
-
- container.ParentOrigin = ParentOrigin.TopLeft;
- container.PivotPoint = PivotPoint.TopLeft;
- container.FlexDirection = (int)FlexContainer.FlexDirectionType.Column;
- container.WidthResizePolicy = ResizePolicyType.FillToParent;
- container.HeightResizePolicy = ResizePolicyType.FillToParent;
-
- window.Add(container);
-
- Random random = new Random();
-
- for(int i = 0; i < 6; i++) // 6 rows in total
- {
- // Create a container to layout the image and rating (in each row) horizontally
- FlexContainer imageRow = new FlexContainer();
- imageRow.ParentOrigin = ParentOrigin.TopLeft;
- imageRow.PivotPoint = PivotPoint.TopLeft;
- imageRow.FlexDirection = FlexContainer.FlexDirectionType.Row;
- imageRow.Flex = 1.0f;
- container.Add(imageRow);
-
- // Add the image view to the row
- ImageView image = new ImageView(resources+"/images/gallery-" + i + ".jpg");
- image.Size2D = new Size2D(120, 120);
- image.WidthResizePolicy = ResizePolicyType.Fixed;
- image.HeightResizePolicy = ResizePolicyType.Fixed;
- image.AlignSelf = (int)FlexContainer.Alignment.AlignCenter;
- image.Flex = 0.3f;
- image.FlexMargin = new Vector4(10.0f, 0.0f, 0.0f, 0.0f);
- imageRow.Add(image);
-
- // Create a rating control
- StarRating view = new StarRating();
-
- // Add the rating control to the row
- view.ParentOrigin = ParentOrigin.Center;
- view.PivotPoint = PivotPoint.Center;
- view.Size2D = new Size2D(200, 40);
- view.Flex = 0.7f;
- view.AlignSelf = (int)FlexContainer.Alignment.AlignCenter;
- view.FlexMargin = new Vector4(30.0f, 0.0f, 0.0f, 0.0f);
- imageRow.Add(view);
-
- // Set the initial rating randomly between 1 and 5
- view.Rating = random.Next(1, 6);
- }
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- //System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(MyCSharpExample.StarRating).TypeHandle);
-
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace DaliTest
-{
- class MyView : View
- {
- private string _myOwnName;
- public int _myCurrentValue;
-
- public MyView()
- {
- _myCurrentValue = 0;
- }
-
- public string MyOwnName
- {
- get
- {
- return _myOwnName;
- }
- set
- {
- _myOwnName = value;
- }
- }
- }
-
- class MyButton : PushButton
- {
- private string _myOwnName;
- public int _myCurrentValue;
-
- public MyButton()
- {
- _myCurrentValue = 0;
- }
-
- public string MyOwnName
- {
- get
- {
- return _myOwnName;
- }
- set
- {
- _myOwnName = value;
- }
- }
- }
-
- class MySpin : Spin
- {
- private string _myOwnName;
- public int _myCurrentValue;
-
- public MySpin()
- {
- _myCurrentValue = 0;
- }
-
- public string MyOwnName
- {
- get
- {
- return _myOwnName;
- }
- set
- {
- _myOwnName = value;
- }
- }
- }
-
- class Example : NUIApplication
- {
- //private const string _resPath = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private const string _resPath = "./res"; //for ubuntu
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- delegate void CallbackDelegate(IntPtr appPtr); // void, void delgate
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- DowncastTest();
-
- NavigationPropertiesTests();
-
- OperatorTests();
-
- CustomViewPropertyTest();
-
- VisibilityChangeTest();
-
- ResourceReadyTest();
-
- ViewFocusTest();
-
- WindowDevelPropertyTest();
-
- Animatable handle = new Animatable();
- int myPropertyIndex = handle.RegisterProperty("myProperty", new PropertyValue(10.0f), PropertyAccessMode.ReadWrite);
- float myProperty = 0.0f;
- handle.GetProperty(myPropertyIndex).Get(out myProperty);
- Tizen.Log.Debug("NUI", "myProperty value: " + myProperty );
-
- int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new PropertyValue(new Size(5.0f, 5.0f, 0.0f)), PropertyAccessMode.ReadWrite);
- Size2D myProperty2 = new Size2D(0, 0);
- handle.GetProperty(myPropertyIndex2).Get(myProperty2);
- Tizen.Log.Debug("NUI", "myProperty2 value: " + myProperty2.Width + ", " + myProperty2.Height );
-
- View view = new View();
- view.Size2D = new Size2D(200, 200);
- view.Name = "MyView";
- //view.MixColor = new Color(1.0f, 0.0f, 1.0f, 0.8f);
- Tizen.Log.Debug("NUI", "View size: " + view.Size2D.Width + ", " + view.Size2D.Height);
- Tizen.Log.Debug("NUI", "View name: " + view.Name);
-
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
- Size windowSize = new Size(window.Size.Width, window.Size.Height, 0.0f);
- Tizen.Log.Debug("NUI", "Window size: " + windowSize.Width + ", " + windowSize.Height);
- window.Add(view);
-
- TextLabel text = new TextLabel("Hello Mono World");
- text.ParentOrigin = ParentOrigin.Center;
- text.PivotPoint = PivotPoint.Center;
- text.HorizontalAlignment = HorizontalAlignment.Center;
- window.Add(text);
-
- Tizen.Log.Debug("NUI", "Text label text: " + text.Text );
-
- Tizen.Log.Debug("NUI", "Text label point size: " + text.PointSize );
- text.PointSize = 32.0f;
- Tizen.Log.Debug("NUI", "Text label new point size: " + text.PointSize );
-
- RectanglePaddingClassTest();
-
- Tizen.Log.Debug("NUI", " *************************" );
- Size Size = new Size(100, 50, 0);
- Tizen.Log.Debug("NUI", " Created " + Size );
- Tizen.Log.Debug("NUI", " Size x = " + Size.Width + ", y = " + Size.Height );
- Size += new Size(20, 20, 0);
- Tizen.Log.Debug("NUI", " Size x = " + Size.Width + ", y = " + Size.Height );
- Size.Width += 10;
- Size.Height += 10;
- Tizen.Log.Debug("NUI", " Size width = " + Size.Width + ", height = " + Size.Height );
-
- Tizen.Log.Debug("NUI", " *************************" );
- Position Position = new Position(20, 100, 50);
- Tizen.Log.Debug("NUI", " Created " + Position );
- Tizen.Log.Debug("NUI", " Position x = " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
- Position += new Position(20, 20, 20);
- Tizen.Log.Debug("NUI", " Position x = " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
- Position.X += 10;
- Position.Y += 10;
- Position.Z += 10;
- Tizen.Log.Debug("NUI", " Position width = " + Position.X + ", height = " + Position.Y + ", depth = " + Position.Z );
-
- Tizen.Log.Debug("NUI", " *************************" );
- Color color = new Color(20, 100, 50, 200);
- Tizen.Log.Debug("NUI", " Created " + color );
- Tizen.Log.Debug("NUI", " Color R = " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
- color += new Color(20, 20, 20, 20);
- Tizen.Log.Debug("NUI", " Color R = " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
- color.R += 10;
- color.G += 10;
- color.B += 10;
- color.A += 10;
- Tizen.Log.Debug("NUI", " Color r = " + color.R + ", g = " + color.G + ", b = " + color.B + ", a = " + color.A );
-
- ViewDownCastTest();
- }
-
- public void RectanglePaddingClassTest()
- {
- using (Rectangle r1 = new Rectangle(2, 5, 20, 30))
- {
- Tizen.Log.Debug("NUI", " Created " + r1 );
- Tizen.Log.Debug("NUI", " IsEmpty() = " + r1.IsEmpty() );
- Tizen.Log.Debug("NUI", " Left = " + r1.Left() );
- Tizen.Log.Debug("NUI", " Right = " + r1.Right() );
- Tizen.Log.Debug("NUI", " Top = " + r1.Top() );
- Tizen.Log.Debug("NUI", " Bottom = " + r1.Bottom() );
- Tizen.Log.Debug("NUI", " Area = " + r1.Area() );
- }
-
- Tizen.Log.Debug("NUI", " *************************" );
-
- using (Rectangle r2 = new Rectangle(2, 5, 20, 30))
- {
- Tizen.Log.Debug("NUI", " Created " + r2 );
- r2.Set(1,1,40,40);
- Tizen.Log.Debug("NUI", " IsEmpty() = " + r2.IsEmpty() );
- Tizen.Log.Debug("NUI", " Left = " + r2.Left() );
- Tizen.Log.Debug("NUI", " Right = " + r2.Right() );
- Tizen.Log.Debug("NUI", " Top = " + r2.Top() );
- Tizen.Log.Debug("NUI", " Bottom = " + r2.Bottom() );
- Tizen.Log.Debug("NUI", " Area = " + r2.Area() );
- }
-
- Tizen.Log.Debug("NUI", " *************************" );
-
- Rectangle r3 = new Rectangle(10, 10, 20, 20);
- Rectangle r4 = new Rectangle(10, 10, 20, 20);
-
- if (r3 == r4)
- {
- Tizen.Log.Debug("NUI", "r3 == r4");
- }
- else
- {
- Tizen.Log.Debug("NUI", "r3 != r4");
- }
-
- r4 = new Rectangle(12, 10, 20, 20);
-
- if (r3 == r4)
- {
- Tizen.Log.Debug("NUI", "r3 == r4");
- }
- else
- {
- Tizen.Log.Debug("NUI", "r3 != r4");
- }
-
- PaddingType p1 = new PaddingType(10.5f, 10.7f, 20.8f, 20.8f);
- PaddingType p2 = new PaddingType(10.5f, 10.7f, 20.8f, 20.8f);
-
- if (p1 == p2)
- {
- Tizen.Log.Debug("NUI", "p1 == p2");
- }
- else
- {
- Tizen.Log.Debug("NUI", "p1 != p2");
- }
-
- p2 = new PaddingType(12.0f, 10.7f, 20.2f, 20.0f);
-
- if (p1 == p2)
- {
- Tizen.Log.Debug("NUI", "p1 == p2");
- }
- else
- {
- Tizen.Log.Debug("NUI", "p1 != p2");
- }
- }
-
- public void NavigationPropertiesTests()
- {
- View view = new View();
- View leftView, rightView, upView, downView, tmpView;
-
- leftView = new View();
- leftView.Name = "leftView";
- rightView = new View();
- rightView.Name = "rightView";
- upView = new View();
- upView.Name = "upView";
- downView = new View();
- downView.Name = "downView";
-
- Window.Instance.Add(leftView);
- Window.Instance.Add(rightView);
- Window.Instance.Add(upView);
- Window.Instance.Add(downView);
-
- view.LeftFocusableView = leftView;
- tmpView = view.LeftFocusableView;
- if (string.Compare(tmpView.Name, "leftView") == 0)
- {
- Tizen.Log.Debug("NUI", "Passed: LeftFocusedView = " + tmpView.Name);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Failed: LeftFocusedView = " + tmpView.Name);
- }
-
- view.RightFocusableView = rightView;
- tmpView = view.RightFocusableView;
- if (string.Compare(tmpView.Name, "rightView") == 0)
- {
- Tizen.Log.Debug("NUI", "Passed: RightFocusedView = " + tmpView.Name);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Failed: RightFocusedView = " + tmpView.Name);
- }
-
- Window.Instance.Add(view);
-
- view.UpFocusableView = upView;
- tmpView = view.UpFocusableView;
- if (string.Compare(tmpView.Name, "upView") == 0)
- {
- Tizen.Log.Debug("NUI", "Passed: UpFocusedView = " + tmpView.Name);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Failed: UpFocusedView = " + tmpView.Name);
- }
-
- view.DownFocusableView = downView;
- tmpView = view.DownFocusableView;
- if (string.Compare(tmpView.Name, "downView") == 0)
- {
- Tizen.Log.Debug("NUI", "Passed: DownFocusedView = " + tmpView.Name);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Failed: DownFocusedView = " + tmpView.Name);
- }
-
- Window.Instance.Remove(leftView);
- tmpView = view.LeftFocusableView;
- if (!tmpView)
- {
- Tizen.Log.Debug("NUI", "Passed: NULL LeftFocusedView");
- }
- else
- {
- Tizen.Log.Debug("NUI", "Failed: LeftFocusedView = " + tmpView.Name);
- }
- }
-
- public void OperatorTests()
- {
- View view = new View();
- View differentView = new View();
- View viewSame = view;
- View nullView = null;
-
- // test the true operator
- if ( view )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator true (view) : test passed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator true (view): test failed ");
- }
-
- View parent = view.Parent;
-
- if ( parent )
- {
- Tizen.Log.Debug("NUI", "Handle with Empty body :failed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "Valid with Empty body :passed ");
- }
-
- view.Add( differentView );
-
- // here we test two different C# objects, which on the native side have the same body/ ref-object
- if ( view == differentView.Parent )
- {
- Tizen.Log.Debug("NUI", "view == differentView.GetParent() :passed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "view == differentView.GetParent() :failed ");
- }
-
- if ( differentView == differentView.Parent )
- {
- Tizen.Log.Debug("NUI", "differentView == differentView.GetParent() :failed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "differentView == differentView.GetParent() :passed ");
- }
-
- if ( nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator true (nullView) : test failed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator true (nullView): test passed ");
- }
-
- // ! operator
- if ( !view )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator !(view) : test failed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator !(view): test passed ");
- }
-
- if ( !nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator !(nullView) : test passed ");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator !(nullView): test failed ");
- }
-
- // Note: operator false only used inside & operator
- // test equality operator ==
- if ( view == viewSame )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view == viewSame) : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view == viewSame) : test failed");
- }
-
- if ( view == differentView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view == differentView) : test failed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view == differentView) : test passed");
- }
-
- if ( view == nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view == nullView) : test failed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view == nullView) : test passed");
- }
-
- if ( nullView == nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (nullView == nullView) : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (nullView == nullView) : test failed");
- }
-
- // test || operator
- if ( view || viewSame )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view || viewSame) : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view || viewSame) : test failed");
- }
-
- if ( view || nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view || nullView) : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view || nullView) : test failed");
- }
-
- if ( nullView || nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (nullView || nullView) : test failed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (nullView || nullView) : test passed");
- }
-
- // test && operator
- if ( view && viewSame )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view && viewSame) : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view && viewSame) : test failed");
- }
-
- if ( view && nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view && nullView) : test failed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (view && nullView) : test passed");
- }
-
- if ( nullView && nullView )
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (nullView && nullView) : test failed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "BaseHandle Operator (nullView && nullView) : test passed");
- }
- }
-
-
- private TextLabel label;
- public void VisibilityChangeTest()
- {
- label = new TextLabel();
- label.Text = "Visibility";
- label.TextColor = Color.Red;
- label.PointSize = 30.0f;
- label.ParentOrigin = ParentOrigin.TopLeft;
- label.PivotPoint = PivotPoint.TopLeft;
- label.Position = new Position(0.0f, 50.0f, 0.0f);
- Window.Instance.Add(label);
- label.VisibilityChanged += (sender, e) =>
- {
- if (e.Visibility)
- Tizen.Log.Debug("NUI", "VisibilityChanged, label show.");
- else
- Tizen.Log.Debug("NUI", "VisibilityChanged, label hide.");
- };
-
- PushButton button = new PushButton();
- button.LabelText = "Change Visibility";
- button.ParentOrigin = ParentOrigin.TopLeft;
- button.PivotPoint = PivotPoint.TopLeft;
- Window.Instance.Add(button);
- button.Clicked += (sender, e) =>
- {
- if (label.Visible)
- {
- label.Hide();
- }
- else
- {
- label.Show();
- }
-
- return true;
- };
- }
-
- public void ResourceReadyTest()
- {
- ImageView image = new ImageView();
- image.ResourceUrl = _resPath + "/images/dog-anim.gif";
- image.Size2D = new Size2D(150, 150);
- image.ParentOrigin = ParentOrigin.TopLeft;
- image.PivotPoint = PivotPoint.TopLeft;
- image.Position = new Position(0.0f, 150.0f, 0.0f);
- image.ResourceReady += (sender, e) =>
- {
- Tizen.Log.Debug("NUI", "Resource is ready!");
- };
- Window.Instance.Add(image);
- }
-
- public void ViewFocusTest()
- {
- View view1 = new View();
- view1.BackgroundColor = Color.Red;
- view1.Size2D = new Size2D(80, 50);
- view1.ParentOrigin = ParentOrigin.CenterLeft;
- view1.PivotPoint = PivotPoint.CenterLeft;
- view1.Position = new Position(10.0f, 50.0f, 0.0f);
- view1.Focusable = true;
- View view2 = new View();
- view2.BackgroundColor = Color.Cyan;
- view2.Size2D = new Size2D(80, 50);
- view2.ParentOrigin = ParentOrigin.CenterLeft;
- view2.PivotPoint = PivotPoint.CenterLeft;
- view2.Position = new Position(100.0f, 50.0f, 0.0f);
- view2.Focusable = true;
- view1.RightFocusableView = view2;
- view2.LeftFocusableView = view1;
- Window.Instance.Add(view1);
- Window.Instance.Add(view2);
- FocusManager.Instance.SetCurrentFocusView(view1);
-
- PushButton button = new PushButton();
- button.LabelText = "Focus Back";
- button.Size2D = new Size2D(150, 50);
- button.ParentOrigin = ParentOrigin.CenterLeft;
- button.PivotPoint = PivotPoint.CenterLeft;
- button.Position = new Position(190.0f, 50.0f, 0.0f);
-
- button.Focusable = true;
- view2.RightFocusableView = button;
-
- button.Pressed += (obj, e) =>
- {
- FocusManager.Instance.MoveFocusBackward();
- return true;
- };
- Window.Instance.Add(button);
- }
-
- public void WindowDevelPropertyTest()
- {
- Window window = Window.Instance;
- uint count = window.GetSupportedAuxiliaryHintCount();
- if (count > 0)
- {
- window.BackgroundColor = Color.Blue;
- }
- uint id = window.AddAuxiliaryHint("wm.policy.win.effect.disable", "1");
- window.RemoveAuxiliaryHint(id);
- window.RemoveAuxiliaryHint(2);
-
- id = window.AddAuxiliaryHint("wm.policy.win.effect.disable", "1");
- window.SetAuxiliaryHintValue(id, "0");
- string value = window.GetAuxiliaryHintValue(id);
- if(value.Length > 0)
- {
- window.BackgroundColor = Color.Red;
- }
-
- window.SetInputRegion(new Rectangle(0, 0, 0, 0));
- WindowType type = window.Type;
- Tizen.Log.Debug("NUI", "window type is "+type);
- window.Type = WindowType.Notification;
-
- NotificationLevel level = window.GetNotificationLevel();
- window.SetNotificationLevel(NotificationLevel.High);
- level = window.GetNotificationLevel();
- Tizen.Log.Debug("NUI", "window notification level is " + level);
-
- window.SetOpaqueState(true);
- Tizen.Log.Debug("NUI", "window is opaque? " + window.IsOpaqueState());
-
- window.SetScreenMode(ScreenMode.AlwaysOn);
- ScreenMode screenMode = window.GetScreenMode();
- Tizen.Log.Debug("NUI", "window screen mode is " + screenMode);
-
- bool ret = window.SetBrightness(50);
- int brightness = window.GetBrightness();
- Tizen.Log.Debug("NUI", "window brightness is " + brightness, ", return "+ret);
- }
-
- public void CustomViewPropertyTest()
- {
- // Create a Spin control
- Spin spin = new Spin();
-
- // Background property
- PropertyMap background = new PropertyMap();
- background.Add( Visual.Property.Type, new PropertyValue((int)Visual.Type.Color) )
- .Add( ColorVisualProperty.MixColor, new PropertyValue(Color.Red) );
- spin.Background = background;
-
- background = spin.Background;
- Color backgroundColor = new Color();
- background.Find(ColorVisualProperty.MixColor, "mixColor")?.Get(backgroundColor);
- if( backgroundColor == Color.Red )
- {
- Tizen.Log.Debug("NUI", "Custom View Background property : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "Custom View Background property : test failed");
- }
-
- // BackgroundColor property
- spin.BackgroundColor = Color.Yellow;
- if(spin.BackgroundColor == Color.Yellow)
- {
- Tizen.Log.Debug("NUI", "Custom View BackgroundColor property : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "Custom View BackgroundColor property : test failed");
- }
-
- // BackgroundImage property
- spin.BackgroundImage = "background-image.jpg";
- if(spin.BackgroundImage == "background-image.jpg")
- {
- Tizen.Log.Debug("NUI", "Custom View BackgroundImage property : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "Custom View BackgroundImage property : test failed");
- }
-
- // StyleName property
- spin.StyleName = "MyCustomStyle";
- if(spin.StyleName == "MyCustomStyle")
- {
- Tizen.Log.Debug("NUI", "Custom View StyleName property : test passed");
- }
- else
- {
- Tizen.Log.Debug("NUI", "Custom View StyleName property : test failed");
- }
- }
-
- public void ViewDownCastTest()
- {
- View container = new View();
- container.Position = new Position(-800.0f, -800.0f, 0.0f);
- Window.Instance.Add(container);
- Tizen.Log.Debug("NUI", "winow layer count is "+Window.Instance.LayerCount);
- Tizen.Log.Debug("NUI", "winow default layer child at 0 is "+Window.Instance.GetDefaultLayer().GetChildAt(0));
- // Test downcast for native control
- TextLabel myLabel = new TextLabel();
- myLabel.Name = "MyLabelName";
- myLabel.Text = "MyText";
-
- Tizen.Log.Debug("NUI", "myLabel.Name = " + myLabel.Name + ", Text = " + myLabel.Text);
-
- container.Add(myLabel);
-
- View myLabelView = container.FindChildByName("MyLabelName");
- if(myLabelView)
- {
- TextLabel newLabel = myLabelView as TextLabel;
- if(newLabel)
- {
- Tizen.Log.Debug("NUI", "Downcast to TextLabel successful: newLabel Name = " + newLabel.Name + ", Text = " + newLabel.Text);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Downcast to TextLabel failed!");
- }
- }
-
- // Test downcast for class directly inherited from View
- MyView myView = new MyView();
- myView.Name = "MyViewName";
- myView.MyOwnName = "MyOwnViewName";
- myView._myCurrentValue = 5;
-
- Tizen.Log.Debug("NUI", "myView.Name = " + myView.Name + ", MyOwnName = " + myView.MyOwnName + ", myCurrentValue = " + myView._myCurrentValue);
-
- container.Add(myView);
-
- View myViewView = container.FindChildByName("MyViewName");
- if(myViewView)
- {
- MyView newView = myViewView as MyView;
- if(newView)
- {
- Tizen.Log.Debug("NUI", "Downcast to MyView successful: newView Name = " + newView.Name + ", MyOwnName = " + newView.MyOwnName + ", myCurrentValue = " + newView._myCurrentValue);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Downcast to MyView failed!");
- }
- }
-
- // Test downcast for class directly inherited from native control
- MyButton myButton = new MyButton();
- myButton.Name = "MyButtonName";
- myButton.MyOwnName = "MyOwnViewName";
- myButton.LabelText = "MyLabelText";
- myButton._myCurrentValue = 5;
-
- Tizen.Log.Debug("NUI", "myButton.Name = " + myButton.Name + ", MyOwnName = " + myButton.MyOwnName + ", LabelText = " + myButton.LabelText + ", myCurrentValue = " + myButton._myCurrentValue);
-
- container.Add(myButton);
-
- View myButtonView = container.FindChildByName("MyButtonName");
- if(myButtonView)
- {
- MyButton newButton = myButtonView as MyButton;
- if(newButton)
- {
- Tizen.Log.Debug("NUI", "Downcast to MyButton successful: newButton Name = " + newButton.Name + ", MyOwnName = " + newButton.MyOwnName + ", LabelText = " + myButton.LabelText + ", myCurrentValue = " + newButton._myCurrentValue);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Downcast to MyButton failed!");
- }
- }
-
- // Test downcast for a CustomView
- Spin spin = new Spin();
- spin.Name = "SpinName";
- spin.MaxValue = 8888;
-
- Tizen.Log.Debug("NUI", "spin.Name = " + spin.Name + ", MaxValue = " + spin.MaxValue);
-
- container.Add(spin);
-
- View spinView = container.FindChildByName("SpinName");
- if(spinView)
- {
- Spin newSpin = spinView as Spin;
- if(newSpin)
- {
- Tizen.Log.Debug("NUI", "Downcast to Spin successful: newSpin Name = " + newSpin.Name + ", MaxValue = " + newSpin.MaxValue);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Downcast to Spin failed!");
- }
- }
-
- // Test downcast for class inherited from a CustomView
- MySpin mySpin = new MySpin();
- mySpin.Name = "MySpinName";
- mySpin.MyOwnName = "MyOwnSpinName";
- mySpin.MaxValue = 8888;
- mySpin._myCurrentValue = 5;
-
- Tizen.Log.Debug("NUI", "mySpin.Name = " + mySpin.Name + ", MyOwnName = " + mySpin.MyOwnName + ", MaxValue = " + mySpin.MaxValue + ", currentValue = " + mySpin._myCurrentValue);
-
- container.Add(mySpin);
-
- View mySpinView = container.FindChildByName("MySpinName");
- if(mySpinView)
- {
- MySpin newSpin = mySpinView as MySpin;
- if(newSpin)
- {
- Tizen.Log.Debug("NUI", "Downcast to MySpin successful: newSpin Name = " + newSpin.Name + ", MyOwnName = " + newSpin.MyOwnName + ", MaxValue = " + newSpin.MaxValue + ", currentValue = " + newSpin._myCurrentValue);
- }
- else
- {
- Tizen.Log.Debug("NUI", "Downcast to MySpin failed!");
- }
- }
- }
-
-
-
- public void DowncastTest()
- {
- //Create a View as a child of parent View, get it use parent.GetChildAt(i), then DownCast to View handle, but call BackgroundColor property will crash.
- View parent = new View();
- View[] childs = new View[5];
-
- for (int i = 0; i < 5; i++)
- {
- childs[i] = new View();
- childs[i].Name = "child_view_" + i;
- childs[i].BackgroundColor = Color.Red;
- parent.Add(childs[i]);
- }
-
- for (uint i = 0; i < parent.ChildCount; i++)
- {
- View childView = parent.GetChildAt(i);
- if (childView)
- {
- Tizen.Log.Debug("NUI", "Type[" + childView.GetTypeName() + "] BGColor[" + childView.BackgroundColor.R + "]" + " Name[" + childView.Name + "]");
- }
- }
-
- PushButton button = new PushButton();
- button.LabelText = "ButtonTest!";
- button.BackgroundColor = Color.White;
- View parentView = new View();
- parentView.Add(button);
- PushButton view = parentView.GetChildAt(0) as PushButton;
- if (view)
- {
- Tizen.Log.Debug("NUI", "NUI view GetTypeName= " + view.GetTypeName());
- Tizen.Log.Debug("NUI", "NUI view LabelText= " + view.LabelText);
- Tizen.Log.Debug("NUI", "NUI view color= " + view.BackgroundColor.R);
- }
- }
-
-
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Tizen.Log.Debug("NUI", "Hello Mono World");
-
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-using System;
-using Tizen.NUI;
-
-
-namespace DatePickerUsingJson
-{
- public class ViewRegistryHelper
- {
- static public void Initialize()
- {
- // Register all views with the type registry
- System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(Spin).TypeHandle);
- }
- }
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace DatePickerUsingJson
-{
- // A spin control (for continously changing values when users can easily predict a set of values)
-
- class Example : NUIApplication
- {
- private Spin _spinYear; // spin control for year
- private Spin _spinMonth; // spin control for month
- private Spin _spinDay; // spin control for day
- //private Builder _builder; // DALi Builder
-
- //private const string _resPath = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private const string _resPath = "./res"; //for ubuntu
-
- public Example() : base()
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- //This is required for the Application which uses JSON theme and style of Dali builder
- ViewRegistryHelper.Initialize();
- /*
- // load date JSON template...
- _builder = new Builder ();
-
- // Optional constant to see logging information coming out
- // of DALi JSON parser (builder)
- PropertyMap constants = new PropertyMap();
- constants.Insert( "CONFIG_SCRIPT_LOG_LEVEL", new PropertyValue( "Verbose") );
- _builder.AddConstants( constants );
-
- _builder.LoadFromFile(_resPath + "/json/date-picker-template.json" );
-
- // create the date-picker from the template in the json file
- View actorTree = _builder.Create( "date-picker");
-
- window.Add( actorTree );
-
- View year = actorTree.FindChildByName("Year");
- View month = actorTree.FindChildByName("Month" );
- View day = actorTree.FindChildByName("Day");
-
- // need to get the actual C# Spin object associated with the actor,
- _spinYear = year as Spin;
- _spinMonth = month as Spin;
- _spinDay = day as Spin;
-
- _spinYear.Value = 2099;
- _spinMonth.Value = 5;
- _spinDay.Value = 23;
-
- _spinYear.Focusable = (true);
- _spinMonth.Focusable = (true);
- _spinDay.Focusable = (true);
-
- FocusManager keyboardFocusManager = FocusManager.Instance;
- keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
- //keyboardFocusManager.FocusedViewActivated += OnFocusedViewActivated;
-
- StyleManager.Get().ApplyTheme(_resPath + "/json/date-picker-theme.json");
- */
- }
-
- private View OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
- {
- View nextFocusView = e.ProposedView;
-
- // When nothing has been focused initially, focus the text field in the first spin
- if (!e.CurrentView && !e.ProposedView)
- {
- nextFocusView = _spinYear.SpinText;
- }
- else if(e.Direction == View.FocusDirection.Left)
- {
- // Move the focus to the spin in the left of the current focused spin
- if(e.CurrentView == _spinMonth.SpinText)
- {
- nextFocusView = _spinYear.SpinText;
- }
- else if(e.CurrentView == _spinDay.SpinText)
- {
- nextFocusView = _spinMonth.SpinText;
- }
- }
- else if(e.Direction == View.FocusDirection.Right)
- {
- // Move the focus to the spin in the right of the current focused spin
- if(e.CurrentView == _spinYear.SpinText)
- {
- nextFocusView = _spinMonth.SpinText;
- }
- else if(e.CurrentView == _spinMonth.SpinText)
- {
- nextFocusView = _spinDay.SpinText;
- }
- }
-
- return nextFocusView;
- }
- /*
- private void OnFocusedViewActivated(object source, FocusManager.FocusedViewActivatedEventArgs e)
- {
- // Make the text field in the current focused spin to take the key input
- KeyInputFocusManager manager = KeyInputFocusManager.Get();
-
- if (e.View == _spinYear.SpinText)
- {
- if (manager.GetCurrentFocusControl() != _spinYear.SpinText)
- {
- manager.SetFocus(_spinYear.SpinText);
- }
- }
- else if (e.View == _spinMonth.SpinText)
- {
- if (manager.GetCurrentFocusControl() != _spinMonth.SpinText)
- {
- manager.SetFocus(_spinMonth.SpinText);
- }
- }
- else if (e.View == _spinDay.SpinText)
- {
- if (manager.GetCurrentFocusControl() != _spinDay.SpinText)
- {
- manager.SetFocus(_spinDay.SpinText);
- }
- }
- }
- */
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.UIComponents;
-
-
-namespace DatePickerTest
-{
- // A spin control (for continously changing values when users can easily predict a set of values)
-
- class Example : NUIApplication
- {
- private FlexContainer _container; // Flex container to hold spin controls
- private Spin _spinYear; // spin control for year
- private Spin _spinMonth; // spin control for month
- private Spin _spinDay; // spin control for day
-
- public Example() : base()
- {
-
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- // Create a container for the spins
- _container = new FlexContainer();
-
- _container.FlexDirection = FlexContainer.FlexDirectionType.Row;
- _container.Size2D = new Size2D(480, 150);
-
- window.Add(_container);
-
- // Create a Spin control for year
- _spinYear = new Spin();
- _spinYear.Flex = 0.3f;
- _spinYear.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
- _container.Add(_spinYear);
-
- _spinYear.MinValue = 1900;
- _spinYear.MaxValue = 2100;
- _spinYear.Value = 2016;
- _spinYear.Step = 1;
- _spinYear.MaxTextLength = 4;
- _spinYear.TextPointSize = 15;
- _spinYear.TextColor = Color.Red;
- _spinYear.Focusable = (true);
- _spinYear.Name = "_spinYear";
-
- // Create a Spin control for month
- _spinMonth = new Spin();
- _spinMonth.Flex = 0.3f;
- _spinMonth.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
- _container.Add(_spinMonth);
-
- _spinMonth.MinValue = 1;
- _spinMonth.MaxValue = 12;
- _spinMonth.Value = 10;
- _spinMonth.Step = 1;
- _spinMonth.MaxTextLength = 2;
- _spinMonth.TextPointSize = 15;
- _spinMonth.TextColor = Color.Green;
- _spinMonth.Focusable = (true);
- _spinMonth.Name = "_spinMonth";
-
- // Create a Spin control for day
- _spinDay = new Spin();
- _spinDay.Flex = 0.3f;
- _spinDay.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
- _container.Add(_spinDay);
-
- _spinDay.MinValue = 1;
- _spinDay.MaxValue = 31;
- _spinDay.Value = 26;
- _spinDay.Step = 1;
- _spinDay.MaxTextLength = 2;
- _spinDay.TextPointSize = 15;
- _spinDay.TextColor = Color.Blue;
- _spinDay.Focusable = (true);
- _spinDay.Name = "_spinDay";
-
- FocusManager keyboardFocusManager = FocusManager.Instance;
- keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
- keyboardFocusManager.FocusedViewActivated += OnFocusedViewActivated;
- }
-
- private View OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
- {
- View nextFocusView = e.ProposedView;
-
- // When nothing has been focused initially, focus the text field in the first spin
- if (!e.CurrentView && !e.ProposedView)
- {
- nextFocusView = _spinYear.SpinText;
- }
- else if(e.Direction == View.FocusDirection.Left)
- {
- // Move the focus to the spin in the left of the current focused spin
- if(e.CurrentView == _spinMonth.SpinText)
- {
- nextFocusView = _spinYear.SpinText;
- }
- else if(e.CurrentView == _spinDay.SpinText)
- {
- nextFocusView = _spinMonth.SpinText;
- }
- }
- else if(e.Direction == View.FocusDirection.Right)
- {
- // Move the focus to the spin in the right of the current focused spin
- if(e.CurrentView == _spinYear.SpinText)
- {
- nextFocusView = _spinMonth.SpinText;
- }
- else if(e.CurrentView == _spinMonth.SpinText)
- {
- nextFocusView = _spinDay.SpinText;
- }
- }
-
- return nextFocusView;
- }
-
- private void OnFocusedViewActivated(object source, FocusManager.FocusedViewActivatedEventArgs e)
- {
-
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace FeedKeyTest
-{
- class Example : NUIApplication
- {
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- View view1 = new View()
- {
- Position2D = new Position2D(10, 10),
- BackgroundColor = Color.Magenta,
- Size2D = new Size2D(200, 200),
- Focusable = true
- };
-
- View view2 = new View()
- {
- Position2D = new Position2D(10, 240),
- BackgroundColor = Color.Red,
- Size2D = new Size2D(200, 200),
- Focusable = true
- };
-
- window.Add(view1);
- window.Add(view2);
-
- FocusManager.Instance.SetCurrentFocusView(view1);
- view2.UpFocusableView = view1;
- view1.DownFocusableView = view2;
-
- view1.KeyEvent += (obj, e) =>
- {
- if (e.Key.State != Key.StateType.Down)
- {
- return false;
- }
- Tizen.Log.Debug("NUI", "View1 KeyPressedName: " + e.Key.KeyPressedName);
- Window.FeedKeyEvent(e.Key);
- return false;
- };
-
- view2.KeyEvent += (obj, e) =>
- {
- if (e.Key.State != Key.StateType.Down)
- {
- // Tizen.Log.Debug("NUI", "View2 key state != Down");
- return false;
- }
-
- // Tizen.Log.Debug("NUI", "View2 KeyPressedName: " + e.Key.KeyPressedName);
- View v = obj as View;
- if(v == view1)
- {
- Tizen.Log.Debug("NUI", "View2 received view1 feed event: " + e.Key.KeyPressedName);
- }
- if (v == view2)
- {
- Tizen.Log.Debug("NUI", "View2 received event: " + e.Key.KeyPressedName);
- }
- return false;
- };
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-
-using System;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-
-namespace FlexContainerTest
-{
- public class SampleMain : NUIApplication
- {
- public readonly static string[] samples = new string[]
- {
- "AnimationSample",
- "BasicElement",
- "TextSample",
- "ImageViewSample",
- "EventSample",
- "FlexContainer",
- "FrameAnimationSample"
- };
-
- TextLabel[] label;
- FlexContainer container;
- View focusIndicator;
- int numOfSamples;
- PushButton pushButton1, pushButton2;
- private int _cnt;
- private Animation _ani;
-
- protected override void OnCreate()
- {
- base.OnCreate();
-
- Window.Instance.BackgroundColor = new Color(0.1f, 0.8f, 0.1f, 1.0f);
-
- container = new FlexContainer();
- container.Size2D = new Size2D(Window.Instance.Size.Width, Window.Instance.Size.Height);
- container.PivotPoint = PivotPoint.TopLeft;
- container.Padding = new Vector4(100, 100, 100, 100);
-
- container.FlexWrap = FlexContainer.WrapType.Wrap;
- container.FlexDirection = FlexContainer.FlexDirectionType.Column;
-
- Window.Instance.Add(container);
-
- numOfSamples = samples.GetLength(0);
- Tizen.Log.Debug("NUI", "NUM = " + numOfSamples);
- label = new TextLabel[numOfSamples];
- for (int i = 0; i < numOfSamples; i++)
- {
- label[i] = new TextLabel();
- label[i].Focusable = true;
- label[i].BackgroundColor = Color.Red;
- //label[i].Size = new Size(100, 50, 0);
- label[i].Text = samples[i];
- label[i].FlexMargin = new Vector4(20, 20, 20, 20);
- label[i].PointSize = 10;
- label[i].Name = "label" + i.ToString();
- container.Add(label[i]);
- }
-
- //label[3].SetKeyInputFocus(); //removed
- FocusManager.Instance.SetCurrentFocusView(label[3]);
-
- FocusManager.Instance.PreFocusChange += Instance_PreFocusChange;
- //added
- FocusManager.Instance.FocusChanged += (sender, e) =>
- {
- if(e.CurrentView) Tizen.Log.Debug("NUI", "FocusManager FocusChanged signal callback! e.CurrentView.Name=" + e.CurrentView.Name);
- else Tizen.Log.Debug("NUI", "FocusManager FocusChanged signal callback! e.CurrentView is null!");
- if (e.NextView) Tizen.Log.Debug("NUI", "FocusManager FocusChanged signal callback! e.NextView.Name=" + e.NextView.Name);
- else Tizen.Log.Debug("NUI", "FocusManager FocusChanged signal callback! e.NextView is null!");
- };
- //added
- FocusManager.Instance.FocusedViewActivated += (sender, e) =>
- {
- if (e.View) Tizen.Log.Debug("NUI", "FocusManager FocusedViewEnterKeyPressed signal callback! e.View.Name=" + e.View.Name);
- else Tizen.Log.Debug("NUI", "FocusManager FocusChanged signal callback! e.View is null!");
- };
-
- //added
- Window.Instance.TouchEvent += (sender, e) =>
- {
- Tizen.Log.Debug("NUI", "Window Touch signal callback! To avoid crash, when losing key focus, set here again unless the NextView is null");
- FocusManager.Instance.SetCurrentFocusView(label[3]);
- };
-
- //added
- pushButton1 = new PushButton();
- pushButton1.MinimumSize = new Size2D(400, 200);
- pushButton1.LabelText = "+PreFocusChange";
- pushButton1.ParentOrigin = ParentOrigin.TopLeft;
- pushButton1.PivotPoint = PivotPoint.TopLeft;
- pushButton1.Position2D = new Position2D(200, 800);
- pushButton1.Clicked += (sender, e) =>
- {
- Tizen.Log.Debug("NUI", "pushbutton1 clicked! add handler!");
- _cnt++;
- FocusManager.Instance.PreFocusChange += Instance_PreFocusChange;
- _ani.Finished += _ani_Finished;
- pushButton1.LabelText = "Add Handler" + _cnt;
- pushButton2.LabelText = "Remove Handler" + _cnt;
- return true;
- };
- Window.Instance.Add(pushButton1);
-
- pushButton2 = new PushButton();
- pushButton2.MinimumSize = new Size2D(400, 200);
- pushButton2.LabelText = "-PreFocusChange";
- pushButton2.ParentOrigin = ParentOrigin.TopLeft;
- pushButton2.PivotPoint = PivotPoint.TopLeft;
- pushButton2.Position2D = new Position2D(800, 800);
- pushButton2.Clicked += (sender, e) =>
- {
- Tizen.Log.Debug("NUI", "pushbutton2 clicked! remove handler!");
- _cnt--;
- FocusManager.Instance.PreFocusChange -= Instance_PreFocusChange;
- _ani.Finished -= _ani_Finished;
- pushButton1.LabelText = "Add Handler" + _cnt;
- pushButton2.LabelText = "Remove Handler" + _cnt;
- return true;
- };
- Window.Instance.Add(pushButton2);
-
- //added
- _ani = new Animation(2000);
- _ani.AnimateTo(pushButton1, "Opacity", 0.0f);
- _ani.AnimateTo(pushButton2, "Opacity", 0.0f);
- _ani.EndAction = Animation.EndActions.Discard;
- _ani.Finished += _ani_Finished;
-
- }
-
- private void _ani_Finished(object sender, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "_ani finished! _cnt=" + _cnt);
- }
-
- private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
- {
- View nextView;
- Tizen.Log.Debug("NUI", "Instance_PreFocusChange = " + e.Direction.ToString());
-
- //added
- if (e.CurrentView == null) e.CurrentView = label[0];
- if (e.ProposedView == null) e.ProposedView = label[0];
-
- int index = Array.FindIndex(label, x => x == e.CurrentView);
-
- Tizen.Log.Debug("NUI", "index = " + index);
-
- switch (e.Direction)
- {
- case View.FocusDirection.Up:
- index = (index + numOfSamples - 2) % numOfSamples; //changed
- _ani.Play();
- break;
- case View.FocusDirection.Down:
- index = (index + 2) % numOfSamples; //changed
- Tizen.Log.Debug("NUI", "pushbutton1 Visible=" + pushButton1.Visible + " pushbutton2 Visible=" + pushButton2.Visible); //added
- break;
- case View.FocusDirection.Left:
- //added
- pushButton1.Show();
- pushButton2.Show();
- break;
- case View.FocusDirection.Right:
- //added
- pushButton1.Hide();
- pushButton2.Hide();
- break;
- default:
- break;
- }
-
- Tizen.Log.Debug("NUI", "next index = " + index);
- nextView = label[index];
-
- if (e.CurrentView.HasFocus())
- {
- //currentView?.ClearKeyInputFocus(); //removed
- }
- //nextView?.SetKeyInputFocus(); //removed
-
- return nextView;
- }
-
- static void _Main(string[] args)
- {
-
- SampleMain sample = new SampleMain();
- sample.Run(args);
- }
- }
-}
-
+++ /dev/null
-
-using System.Collections.Generic;
-using System;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.UIComponents;
-
-namespace TizenVDUIApplication19
-{
- using Tizen.NUI;
-
- internal class Program : NUIApplication
- {
- private Timer myTimer;
- private List<View> myViewList;
- private const int numberOfObjects = 500;
- private Random myRandom;
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
-
- protected override void OnCreate()
- {
- base.OnCreate();
-
- Window.Instance.BackgroundColor = Color.White;
-
- myViewList = new List<View>();
-
- myRandom = new Random();
-
- for (int i = 0; i < numberOfObjects; i++)
- {
- View v = new View();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- myTimer = new Timer(1000);
-
- myTimer.Tick += MyTimer_Tick;
-
- myTimer.Start();
- }
-
- private bool MyTimer_Tick(object source, System.EventArgs e)
- {
- //Remove current Scene,
- foreach (View v in myViewList)
- {
- Window.Instance.GetDefaultLayer().Remove(v);
- }
-
- myViewList.Clear();
-
- ////Add View
-
- GC.Collect();
- GC.WaitForPendingFinalizers();
-
- for (int i = 0; i < 50; i++)
- {
- TextLabel v = new TextLabel();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
- v.Text = "label " + i;
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 50; i < 100; i++)
- {
- PushButton v = new PushButton();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
- v.LabelText = "button " + i;
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 100; i < 150; i++)
- {
- ImageView v = new ImageView();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
- v.ResourceUrl = resources + "/images/gallery-3.jpg";
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 150; i < 200; i++)
- {
- TextEditor v = new TextEditor();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
- v.Text = "editor" + i;
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 200; i < 250; i++)
- {
- TextField v = new TextField();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
- v.Text = "field " + i;
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 250; i < 300; i++)
- {
- CheckBoxButton v = new CheckBoxButton();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
- v.LabelText = "check " + i;
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 300; i < 350; i++)
- {
- ScrollBar v = new ScrollBar();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 350; i < 400; i++)
- {
- Slider v = new Slider();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 400; i < 450; i++)
- {
- TableView v = new TableView(1, 1);
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- for (int i = 450; i < numberOfObjects; i++)
- {
- View v = new View();
-
- float intensity = myRandom.Next(0, 255) / 255.0f;
- v.BackgroundColor = new Color(intensity, intensity, intensity, 1);
- v.Position = new Position(myRandom.Next(0, 1820), myRandom.Next(0, 980), 0);
- v.PivotPoint = PivotPoint.TopLeft;
- v.Size2D = new Size2D(100, 100);
-
- myViewList.Add(v);
-
- Window.Instance.GetDefaultLayer().Add(v);
- }
-
- return true;
- }
-
- protected override void OnPause()
- {
- //This function is called when the window's visibility is changed from visible to invisible.
- base.OnPause();
- }
-
- protected override void OnResume()
- {
- //This function is called when the window's visibility is changed from invisible to visible.
- base.OnResume();
- }
-
- protected override void OnTerminate()
- {
- //This function is called when the app exit normally.
- base.OnTerminate();
- }
- /*
- protected override void OnLowMemory(LowMemoryEventArgs e)
- {
- //This function is called when the system is low on memory.
- base.OnLowMemory(e);
- }
- protected override void OnLocaleChanged(LocaleChangedEventArgs e)
- {
- //This function is called when the language is changed.
- base.OnLocaleChanged(e);
- }
- */
- private static void _Main(string[] args)
- {
- //Create an Application
- Program myProgram = new Program();
- myProgram.Run(args);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-//using Tizen.Applications;
-
-//------------------------------------------------------------------------------
-// <manual-generated />
-//
-// This file can only run on Tizen target. You should compile it with DaliApplication.cs, and
-// add tizen c# application related library as reference.
-//------------------------------------------------------------------------------
-namespace HelloTest
-{
- class Example : NUIApplication
- {
- private Animation _animation;
- private TextLabel _text;
- private Window _window;
-
- public Example():base()
- {
- }
-
- public Example(string stylesheet):base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode):base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private void Initialize()
- {
- // Connect the signal callback for window touched signal
- _window = Window.Instance;
- _window.TouchEvent += OnWindowTouched;
-
- // Add a _text label to the window
- _text = new TextLabel("Hello Mono World");
- _text.ParentOrigin = ParentOrigin.Center;
- _text.PivotPoint = PivotPoint.Center;
- _text.HorizontalAlignment = HorizontalAlignment.Center;
- _text.PointSize = 32.0f;
-
- _window.Add(_text);
- }
-
- // Callback for _animation finished signal handling
- private void AnimationFinished(object sender, EventArgs e)
- {
- if (_animation)
- {
- Tizen.Log.Debug("NUI", "Duration= " + _animation.Duration);
- Tizen.Log.Debug("NUI", "EndAction= " + _animation.EndAction);
- }
- }
-
- // Callback for window touched signal handling
- private void OnWindowTouched(object sender, Window.TouchEventArgs e)
- {
- // Only animate the _text label when touch down happens
- if (e.Touch.GetState(0) == PointStateType.Down)
- {
- // Create a new _animation
- if (_animation)
- {
- _animation.Reset();
- }
-
- _animation = new Animation(1000); // 1 second of duration
-
- _animation.AnimateTo(_text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), Vector3.XAxis), 0, 500);
- _animation.AnimateTo(_text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), Vector3.XAxis), 500, 1000);
- _animation.EndAction = Animation.EndActions.Discard;
-
- // Connect the signal callback for animaiton finished signal
- _animation.Finished += AnimationFinished;
-
- // Play the _animation
- _animation.Play();
- }
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
-
- [STAThread]
- static void _Main(string[] args)
- {
- Tizen.Log.Debug("NUI", "Hello mono world.");
- //Example example = new Example();
- //Example example = new Example("stylesheet");
- Example example = new Example("stylesheet", WindowMode.Transparent);
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2017 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.Threading.Tasks;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace HelloWorldTest
-{
- class Example : NUIApplication
- {
- private Animation _animation;
- private TextLabel _text;
- private int cnt;
- private View _view;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- TextLabel pixelLabel;
- TextLabel pointLabel;
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
- window.TouchEvent += OnWindowTouched;
- window.KeyEvent += OnWindowKeyEvent;
- window.Resized += (obj, e) =>
- {
- Tizen.Log.Debug("NUI", "Height: " + e.WindowSize.Height);
- Tizen.Log.Debug("NUI", "Width: " + e.WindowSize.Width);
- };
-
- pixelLabel = new TextLabel("Test Pixel Size 32.0f");
- pixelLabel.Position2D = new Position2D(10, 10);
- pixelLabel.PixelSize = 32.0f;
- window.Add(pixelLabel);
-
- pointLabel = new TextLabel("Test Point Size 32.0f");
- pointLabel.Position2D = new Position2D(10, 100);
- pointLabel.PointSize = 32.0f;
- window.Add(pointLabel);
-
- Task.Factory.StartNew(() =>
- {
- try
- {
- TextLabel ellipsis = new TextLabel("Ellipsis of TextLabel is enabled.");
- ellipsis.Size2D = new Size2D(100, 100);
- ellipsis.Position2D = new Position2D(10, 250);
- ellipsis.PointSize = 20.0f;
- ellipsis.Ellipsis = true;
- window.Add(ellipsis);
- }
- catch (Exception e)
- {
- Tizen.Log.Debug("NUI", $"exception caught! e={e}");
- }
- }).Wait();
-
- TextLabel autoScrollStopMode = new TextLabel("AutoScrollStopMode is finish-loop.");
- autoScrollStopMode.Size2D = new Size2D(400, 100);
- autoScrollStopMode.Position2D = new Position2D(10, 400);
- autoScrollStopMode.PointSize = 15.0f;
- autoScrollStopMode.AutoScrollStopMode = AutoScrollStopMode.FinishLoop;
- autoScrollStopMode.AutoScrollLoopDelay = 10.0f;
- autoScrollStopMode.EnableAutoScroll = true;
- window.Add(autoScrollStopMode);
-
- _text = new TextLabel("Hello NUI World");
- _text.Position2D = new Position2D(10, 500);
- _text.HorizontalAlignment = HorizontalAlignment.Center;
- _text.PointSize = 20.0f;
- _text.TextColor = Color.Magenta;
- window.Add(_text);
-
- _view = new View();
- _view.Size2D = new Size2D(100, 100);
- _view.SizeWidth = 50;
- Tizen.Log.Debug("NUI", "[1]_view SizeWidth=" + _view.SizeWidth);
-
- _animation = new Animation
- {
- Duration = 2000
- };
- _animation.AnimateTo(_text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 0, 500);
- _animation.AnimateTo(_text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000);
- _animation.AnimateBy(_text, "ScaleX", 3, 1000, 1500);
- _animation.AnimateBy(_text, "ScaleY", 4.0f, 1500, 2000);
- _animation.EndAction = Animation.EndActions.Discard;
- _animation.Finished += AnimationFinished;
-
- _view.SizeWidth = 50;
- Tizen.Log.Debug("NUI", "[2]_view SizeWidth=" + _view.SizeWidth);
-
- TextLabelLineWrapModeTest();
- ViewLayoutDirectionTest();
- }
-
-
- private View view1, view11, view12, view111, view121;
- public void ViewLayoutDirectionTest()
- {
- view1 = new View();
- view1.Name = "view 1";
- view1.LayoutDirection = ViewLayoutDirectionType.RTL;
- Window.Instance.GetDefaultLayer().Add(view1);
- view1.LayoutDirectionChanged += View1_LayoutDirectionChanged;
-
- view11 = new View();
- view11.Name = "view 11";
- view11.InheritLayoutDirection = true;
- view1.Add(view11);
-
- view12 = new View();
- view12.Name = "view 12";
- view12.LayoutDirection = ViewLayoutDirectionType.LTR;
- view1.Add(view12);
-
- view111 = new View();
- view111.Name = "view 111";
- view111.InheritLayoutDirection = true;
- view11.Add(view111);
-
- view121 = new View();
- view121.Name = "view 121";
- view121.InheritLayoutDirection = true;
- view12.Add(view121);
- }
-
- private void View1_LayoutDirectionChanged(object sender, View.LayoutDirectionChangedEventArgs e)
- {
- NUILog.Error("View1_LayoutDirectionChanged()! e.Type=" + e.Type);
- }
-
- public void AnimationFinished(object sender, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "AnimationFinished()! cnt=" + (cnt));
- if (_animation)
- {
- Tizen.Log.Debug("NUI", "Duration= " + _animation.Duration + "EndAction= " + _animation.EndAction);
- }
- _view.SizeWidth = 50;
- Tizen.Log.Debug("NUI", "[3]_view SizeWidth=" + _view.SizeWidth);
- }
-
- int win_test;
- public void OnWindowKeyEvent(object sender, Window.KeyEventArgs e)
- {
- Tizen.Log.Debug("NUI", "e.Key.KeyPressedName=" + e.Key.KeyPressedName);
-
- if (e.Key.State == Key.StateType.Down)
- {
- if (e.Key.KeyPressedName == "Up")
- {
- if (_animation)
- {
- _animation.Finished += AnimationFinished;
- cnt++;
- Tizen.Log.Debug("NUI", "AnimationFinished added!");
- }
- pointLabel.TextColorAnimatable = Color.Blue;
- pixelLabel.TextColorAnimatable = Color.Blue;
-
- Tizen.Log.Debug("NUI", $"LineWrapMode 1st={ myTextLabel?.LineWrapMode} 2nd={ myTextLabel2?.LineWrapMode}");
- }
- else if (e.Key.KeyPressedName == "Down")
- {
- if (_animation)
- {
- _animation.Finished -= AnimationFinished;
- cnt--;
- Tizen.Log.Debug("NUI", "AnimationFinished removed!");
- }
- pointLabel.TextColorAnimatable = Color.Red;
- pixelLabel.TextColorAnimatable = Color.Red;
-
- Window.Instance.SetClass($"Window.SetClass() Test #{win_test++}", "");
- Tizen.Log.Debug("NUI", $"Check with enlightenment_info -topwins ! Window.SetClass() Test #{win_test}");
- }
- else if (e.Key.KeyPressedName == "Return")
- {
- _animation.Play();
- Tizen.Log.Debug("NUI", "_animation play here!");
- }
- }
- }
-
- public void OnWindowTouched(object sender, Window.TouchEventArgs e)
- {
- if (e.Touch.GetState(0) == PointStateType.Down)
- {
- _animation.Play();
- }
- }
-
- private TextLabel myTextLabel;
- private TextLabel myTextLabel2;
- private TextEditor myTextEditor;
- private TextEditor myTextEditor2;
- public void TextLabelLineWrapModeTest()
- {
- Tizen.Log.Debug("NUI", "WrapModeTest START!");
- myTextLabel = new TextLabel();
- myTextLabel.Position2D = new Position2D(10, 600);
- myTextLabel.Size2D = new Size2D(400, 90);
- myTextLabel.BackgroundColor = Color.Blue;
- myTextLabel.PointSize = 20;
- myTextLabel.TextColor = Color.White;
- myTextLabel.MultiLine = true;
- myTextLabel.LineWrapMode = LineWrapMode.Character;
- myTextLabel.Text = $"[TextLabel LineWrapMode.Character] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name.";
- Window.Instance.GetDefaultLayer().Add(myTextLabel);
-
- myTextLabel2 = new TextLabel();
- myTextLabel2.Position2D = new Position2D(450, 600);
- myTextLabel2.Size2D = new Size2D(400, 90);
- myTextLabel2.BackgroundColor = Color.Blue;
- myTextLabel2.PointSize = 20;
- myTextLabel2.TextColor = Color.White;
- myTextLabel2.MultiLine = true;
- myTextLabel2.LineWrapMode = LineWrapMode.Word;
- myTextLabel2.Text = $"[TextLabel LineWrapMode.Word] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name.";
- Window.Instance.GetDefaultLayer().Add(myTextLabel2);
-
- Tizen.Log.Debug("NUI", $"TextLabel LineWrapMode 1st={ myTextLabel?.LineWrapMode} 2nd={ myTextLabel2?.LineWrapMode}");
-
- myTextEditor = new TextEditor();
- myTextEditor.Position2D = new Position2D(10, 700);
- myTextEditor.Size2D = new Size2D(400, 90);
- myTextEditor.BackgroundColor = Color.Red;
- myTextEditor.PointSize = 20;
- myTextEditor.TextColor = Color.White;
- //myTextEditor.MultiLine = true;
- myTextEditor.LineWrapMode = LineWrapMode.Character;
- myTextEditor.Text = $"[TextEditor LineWrapMode.Character] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name.";
- Window.Instance.GetDefaultLayer().Add(myTextEditor);
-
- myTextEditor2 = new TextEditor();
- myTextEditor2.Position2D = new Position2D(450, 700);
- myTextEditor2.Size2D = new Size2D(400, 90);
- myTextEditor2.BackgroundColor = Color.Red;
- myTextEditor2.PointSize = 20;
- myTextEditor2.TextColor = Color.White;
- //myTextEditor2.MultiLine = true;
- myTextEditor2.LineWrapMode = LineWrapMode.Word;
- myTextEditor2.Text = $"[TextEditor LineWrapMode.Word] hello ABCDEFGHI is my name, it is very very long beautiful hansome awesome name.";
- Window.Instance.GetDefaultLayer().Add(myTextEditor2);
-
- Tizen.Log.Debug("NUI", $"TextEditor LineWrapMode 1st={ myTextEditor?.LineWrapMode} 2nd={ myTextEditor2?.LineWrapMode}");
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace ImageViewTest
-{
- class Example : NUIApplication
- {
-
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- public static void Log(string str)
- {
- Tizen.Log.Debug("NUI", "[DALI C# SAMPLE] " + str);
- }
-
- private Animation _animation;
- private ImageView _imageView;
- private bool _isAniFinised = true;
- private Layer layer, _layer1, _layer2;
- private PushButton _pushButton1, _pushButton2;
- private Window window;
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Log("Customized Application Initialize event handler");
- window = Window.Instance;
- window.BackgroundColor = Color.Cyan;
- window.TouchEvent += OnWindowTouched;
- window.WheelEvent += OnWindowWheelMoved;
- window.KeyEvent += OnWindowKeyPressed;
- //window.EventProcessingFinished += OnWindowEventProcessingFinished;
-
- layer = window.GetDefaultLayer();
- _layer1 = new Layer();
- _layer2 = new Layer();
- window.AddLayer(_layer1);
- window.AddLayer(_layer2);
- Log("_layer1.Behavior =" + _layer1.Behavior);
- if (_layer1.Behavior == Layer.LayerBehavior.LayerUI)
- {
- _layer1.Behavior = Layer.LayerBehavior.Layer2D;
- Log("again _layer1.Behavior =" + _layer1.Behavior);
- }
- // Add a ImageView to the window
- // PropertyMap map = new PropertyMap();
- // map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch));
- // map.Add(NpatchImageVisualProperty.URL, new PropertyValue(resources+"/images/00_popup_bg.9.png"));
- // map.Add(NpatchImageVisualProperty.Border, new PropertyValue(new Rectangle(100, 100, 100, 100)));
- _imageView = new ImageView();
- //_imageView.ImageMap = map;
- _imageView.ResourceUrl = resources+"/images/00_popup_bg.9.png";
- //_imageView.Border = new Rectangle(100, 100, 100, 100);
- _imageView.ParentOrigin = ParentOrigin.TopLeft;
- _imageView.PivotPoint = PivotPoint.TopLeft;
- _imageView.Position = new Position(5.0f, 5.0f, 0.0f);
- _imageView.PixelArea = new Vector4(0.0f, 0.0f, 0.5f, 0.5f);
- _imageView.Size2D = new Size2D(200, 80);
- //_imageView.SetResizePolicy(ResizePolicyType.USE_NATURAL_SIZE, DimensionType.ALL_DIMENSIONS);
- layer.Add(_imageView);
-
- _pushButton1 = new PushButton();
- _pushButton1.ParentOrigin = ParentOrigin.BottomLeft;
- _pushButton1.PivotPoint = PivotPoint.BottomLeft;
- _pushButton1.LabelText = "start animation";
- _pushButton1.Position = new Vector3(0.0f, window.Size.Height * 0.1f, 0.0f);
- _pushButton1.Clicked += OnPushButtonClicked1;
- _layer1.Add(_pushButton1);
-
- _pushButton2 = new PushButton();
- _pushButton2.ParentOrigin = ParentOrigin.BottomLeft;
- _pushButton2.PivotPoint = PivotPoint.BottomLeft;
- _pushButton2.LabelText = "reload image with same URL";
- _pushButton2.Position = new Vector3(0.0f, window.Size.Height * 0.2f, 0.0f);
- _pushButton2.Clicked += OnPushButtonClicked2;
- _layer2.Add(_pushButton2);
-
- ImageView syncImage = new ImageView();
- syncImage.ParentOrigin = ParentOrigin.CenterLeft;
- syncImage.PivotPoint = PivotPoint.CenterLeft;
- syncImage.PositionUsesPivotPoint = true;
- syncImage.Size2D = new Size2D(150, 150);
- syncImage.ResourceUrl = resources+"/images/gallery-3.jpg";
- syncImage.SynchronosLoading = true;
- layer.Add(syncImage);
-
- PropertyMap _map = new PropertyMap();
- _map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch));
- _map.Add(NpatchImageVisualProperty.URL, new PropertyValue(resources+"/images/00_popup_bg.9.png"));
- _map.Add(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue(true));
- ImageView nPatchImage = new ImageView();
- nPatchImage.ParentOrigin = ParentOrigin.BottomLeft;
- nPatchImage.PivotPoint = PivotPoint.BottomLeft;
- nPatchImage.PositionUsesPivotPoint = true;
- nPatchImage.Size2D = new Size2D(300, 100);
- nPatchImage.ImageMap = _map;
- layer.Add(nPatchImage);
-
- ImageView syncNineImage = new ImageView();
- syncNineImage.ParentOrigin = ParentOrigin.CenterLeft;
- syncNineImage.PivotPoint = PivotPoint.CenterLeft;
- syncNineImage.Position2D = new Position2D(0, 200);
- syncNineImage.PositionUsesPivotPoint = true;
- syncNineImage.Size2D = new Size2D(150, 150);
- syncNineImage.ResourceUrl = resources+"/images/00_popup_bg.9.png";
- syncNineImage.SynchronosLoading = true;
- syncNineImage.Border = new Rectangle(0, 0, 0, 0);
- layer.Add(syncNineImage);
- }
-
- public bool OnPushButtonClicked2(object sender, EventArgs e)
- {
- if (_imageView)
- {
- Log("OnPushButtonClicked2()!");
- layer.Remove(_imageView);
- _imageView = new ImageView();
- _imageView.ResourceUrl = resources+"/images/gallery-3.jpg";
- _imageView.ParentOrigin = ParentOrigin.Center;
- _imageView.PivotPoint = PivotPoint.Center;
- _imageView.PixelArea = new Vector4(0.0f, 0.0f, 0.5f, 0.5f);
- //_imageView.SetResizePolicy(ResizePolicyType.USE_NATURAL_SIZE, DimensionType.ALL_DIMENSIONS);
- layer.Add(_imageView);
- }
-
- return true;
- }
-
- public bool OnPushButtonClicked1(object sender, EventArgs e)
- {
- if (_isAniFinised == true)
- {
- _isAniFinised = false;
- Log("OnPushButtonClicked1()!");
-
- // Create a new _animation
- if (_animation)
- {
- //_animation.Stop(Tizen.NUI.Constants.Animation.EndAction.Stop);
- _animation.Reset();
- }
-
- _animation = new Animation();
- _animation.AnimateTo(_imageView, "PixelArea", new Vector4(0.5f, 0.0f, 0.5f, 0.5f), 0, 1000);
- _animation.AnimateTo(_imageView, "PixelArea", new Vector4(0.5f, 0.5f, 0.5f, 0.5f), 1000, 2000);
- _animation.AnimateTo(_imageView, "PixelArea", new Vector4(0.0f, 0.0f, 1.0f, 1.0f), 2000, 3000);
- _animation.AnimateTo(_imageView, "PixelArea", new Vector4(0.5f, 0.5f, 0.5f, 0.5f), 3000, 4000);
-
- KeyFrames _keyFrames = new KeyFrames();
- _keyFrames.Add(0.0f, new Size(0.0f, 0.0f, 0.0f));
- _keyFrames.Add(0.3f, new Size(window.Size.Width * 0.7f, window.Size.Height * 0.7f, 0.0f));
- _keyFrames.Add(1.0f, new Size(window.Size));
- _animation.AnimateBetween(_imageView, "Size", _keyFrames, 4000, 6000, Animation.Interpolation.Linear);
-
- _animation.EndAction = Animation.EndActions.Discard;
-
- // Connect the signal callback for animaiton finished signal
- _animation.Finished += AnimationFinished;
- _animation.Finished += AnimationFinished2;
-
- // Play the _animation
- _animation.Play();
- }
-
- return true;
- }
-
- // Callback for _animation finished signal handling
- public void AnimationFinished(object sender, EventArgs e)
- {
- Log("AnimationFinished()!");
- }
-
- // Callback for second _animation finished signal handling
- public void AnimationFinished2(object sender, EventArgs e)
- {
- Log("AnimationFinished2()!");
- if (_animation)
- {
- Log("Duration= " + _animation.Duration);
- Log("EndAction= " + _animation.EndAction);
- _isAniFinised = true;
- }
- }
-
- public void OnWindowEventProcessingFinished(object sender, EventArgs e)
- {
- Log("OnWindowEventProcessingFinished()!");
- if (e != null)
- {
- Log("e != null !");
- }
- }
-
- public void OnWindowKeyPressed(object sender, Window.KeyEventArgs e)
- {
- Log("OnWindowKeyEventOccured()!");
- Log("keyPressedName=" + e.Key.KeyPressedName);
- Log("state=" + e.Key.State);
- }
-
- public void OnWindowWheelMoved(object sender, Window.WheelEventArgs e)
- {
- Log("OnWindowWheelEventOccured()!");
- Log("direction=" + e.Wheel.Direction);
- Log("type=" + e.Wheel.Type);
- }
-
- // Callback for window touched signal handling
- public void OnWindowTouched(object sender, Window.TouchEventArgs e)
- {
- Log("OnWindowTouched()! e.TouchData.GetState(0)=" + e.Touch.GetState(0));
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Log("Main() called!");
-
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-//using Tizen.Applications;
-
-//------------------------------------------------------------------------------
-// <manual-generated />
-//
-// This file can only run on Tizen target. You should compile it with DaliApplication.cs, and
-// add tizen c# application related library as reference.
-//------------------------------------------------------------------------------
-namespace PositionUsesPivotPointTest
-{
- class Example : NUIApplication
- {
- private TextLabel _text1;
- private TextLabel _text2;
- private Window _window;
-
- public Example():base()
- {
- }
-
- public Example(string stylesheet):base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode):base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private void Initialize()
- {
- // Connect the signal callback for window touched signal
- _window = Window.Instance;
- _text1 = new TextLabel("PositionUsesPivotPoint");
- _text1.ParentOrigin = ParentOrigin.Center;
- _text1.PivotPoint = PivotPoint.Center;
- _text1.Position = new Position(0, 0, 0);
- _text1.PositionUsesPivotPoint = true;
- _text1.HorizontalAlignment = HorizontalAlignment.Center;
- _text1.Size2D = new Size2D(200, 100);
- _text1.PointSize = 10.0f;
- _text1.BackgroundColor = Color.Blue;
- _window.Add(_text1);
-
- _text2 = new TextLabel("PositionNotUsesPivotPoint");
- _text2.ParentOrigin = ParentOrigin.Center;
- _text2.PivotPoint = PivotPoint.Center;
- _text2.Position = new Position(0, 0, 0);
- _text2.PositionUsesPivotPoint = false;
- _text2.HorizontalAlignment = HorizontalAlignment.Center;
- _text2.Size2D = new Size2D(200, 100);
- _text2.PointSize = 10.0f;
- _text2.BackgroundColor = Color.Red;
- _window.Add(_text2);
- }
-
-
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Tizen.Log.Debug("NUI", "Hello mono world.");
- Example example = new Example("stylesheet", WindowMode.Transparent);
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-//using Tizen.Applications;
-
-//------------------------------------------------------------------------------
-// <manual-generated />
-//
-// This file can only run on Tizen target. You should compile it with DaliApplication.cs, and
-// add tizen c# application related library as reference.
-//------------------------------------------------------------------------------
-namespace RelativeVectorTest
-{
- class Example : NUIApplication
- {
- private Animation _animation;
- private ImageView _imageView;
- private Window _window;
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
-
- public Example():base()
- {
- }
-
- public Example(string stylesheet):base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode):base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private void Initialize()
- {
- _window = Window.Instance;
- _window.TouchEvent += OnWindowTouched;
-
- _imageView = new ImageView();
- _imageView.ResourceUrl = resources+"/images/gallery-3.jpg";
- _imageView.ParentOrigin = ParentOrigin.Center;
- _imageView.PivotPoint = PivotPoint.Center;
- _imageView.PixelArea = new RelativeVector4(0.0f, 0.0f, 0.0f, 0.0f);
-
- _window.Add(_imageView);
- }
-
- // Callback for window touched signal handling
- private void OnWindowTouched(object sender, Window.TouchEventArgs e)
- {
- // Only animate the _text label when touch down happens
- if (e.Touch.GetState(0) == PointStateType.Down)
- {
- // Create a new _animation
- if (_animation)
- {
- _animation.Reset();
- }
-
- _animation = new Animation(1000); // 1 second of duration
- _animation.AnimateTo(_imageView, "PixelArea", new RelativeVector4(0.0f, 0.0f, 1.0f, 1.0f), 0, 1000);
- _animation.EndAction = Animation.EndActions.Discard;
- _animation.PlayRange = new RelativeVector2(0.2f, 0.8f);
-
- // Play the _animation
- _animation.Play();
- }
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
-
- [STAThread]
- static void _Main(string[] args)
- {
- Tizen.Log.Debug("NUI", "Hello mono world.");
- Example example = new Example("stylesheet", WindowMode.Transparent);
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace ScrollViewTest
-{
- class Example : NUIApplication
- {
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- delegate void CallbackDelegate(IntPtr data);
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- delegate void ActorCallbackDelegate(IntPtr data);
-
- private ScrollView _scrollView;
- private ScrollBar _scrollBar;
- private Animation _animation;
- private TextLabel _text;
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- CreateScrollView();
- }
-
- private void CreateScrollView()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- // Create a scroll view
- _scrollView = new ScrollView();
- Size windowSize = new Size(window.Size.Width, window.Size.Height, 0.0f);
- _scrollView.Size2D = new Size2D((int)windowSize.Width, (int)windowSize.Height);
- _scrollView.ParentOrigin = ParentOrigin.Center;
- _scrollView.PivotPoint = PivotPoint.Center;
- window.Add(_scrollView);
-
- // Add actors to a scroll view with 3 pages
- int pageRows = 1;
- int pageColumns = 3;
- for(int pageRow = 0; pageRow < pageRows; pageRow++)
- {
- for(int pageColumn = 0; pageColumn < pageColumns; pageColumn++)
- {
- View pageActor = new View();
- pageActor.WidthResizePolicy = ResizePolicyType.FillToParent;
- pageActor.HeightResizePolicy = ResizePolicyType.FillToParent;
- pageActor.ParentOrigin = ParentOrigin.Center;
- pageActor.PivotPoint = PivotPoint.Center;
- pageActor.Position = new Position(pageColumn * windowSize.Width, pageRow * windowSize.Height, 0.0f);
-
- // Add images in a 3x4 grid layout for each page
- int imageRows = 4;
- int imageColumns = 3;
- float margin = 10.0f;
- Position imageSize = new Position((windowSize.Width / imageColumns) - margin, (windowSize.Height / imageRows) - margin, 0.0f);
-
- for(int row = 0; row < imageRows; row++)
- {
- for(int column = 0; column < imageColumns;column++)
- {
- int imageId = (row * imageColumns + column) % 2 + 1;
- ImageView imageView = new ImageView(resources+"/images/image-" + imageId + ".jpg");
- imageView.ParentOrigin = ParentOrigin.Center;
- imageView.PivotPoint = PivotPoint.Center;
- imageView.Size2D = new Size2D((int)imageSize.X, (int)imageSize.Y);
- imageView.Position = new Position( margin * 0.5f + (imageSize.X + margin) * column - windowSize.Width * 0.5f + imageSize.X * 0.5f,
- margin * 0.5f + (imageSize.Y + margin) * row - windowSize.Height * 0.5f + imageSize.Y * 0.5f, 0.0f );
- pageActor.Add(imageView);
- }
- }
-
- _scrollView.Add(pageActor);
- }
- }
-
- _scrollView.SetAxisAutoLock(true);
-
- // Set scroll view to have 3 pages in X axis and allow page snapping,
- // and also disable scrolling in Y axis.
- PropertyMap rulerMap = new PropertyMap();
- rulerMap.Add((int)ScrollModeType.XAxisScrollEnabled, new PropertyValue(true));
- rulerMap.Add((int)ScrollModeType.XAxisSnapToInterval, new PropertyValue(windowSize.Width));
- rulerMap.Add((int)ScrollModeType.XAxisScrollBoundary, new PropertyValue(windowSize.Width * pageColumns ) );
- rulerMap.Add((int)ScrollModeType.YAxisScrollEnabled, new PropertyValue( false ) );
- _scrollView.ScrollMode = rulerMap;
-
- // Create a horizontal scroll bar in the bottom of scroll view (which is optional)
- _scrollBar = new ScrollBar(ScrollBar.Direction.Horizontal);
- _scrollBar.ParentOrigin = ParentOrigin.BottomLeft;
- _scrollBar.PivotPoint = PivotPoint.TopLeft;
- _scrollBar.WidthResizePolicy = ResizePolicyType.FitToChildren;
- _scrollBar.HeightResizePolicy = ResizePolicyType.FillToParent;
- _scrollBar.Orientation = new Rotation( new Radian( new Degree( 270.0f ) ), Vector3.ZAxis );
- _scrollView.Add(_scrollBar);
-
- // Connect to the OnRelayout signal
- _scrollView.Relayout += OnScrollViewRelayout;
- //_scrollView.Touched += OnTouch;
- _scrollView.WheelEvent += Onwheel;
- _scrollView.FocusGained += OnKey;
- _text = new TextLabel("View Touch Event Handler Test");
- _text.ParentOrigin = ParentOrigin.Center;
- _text.PivotPoint = PivotPoint.Center;
- _text.HorizontalAlignment = HorizontalAlignment.Center;
- _text.PointSize = 20.0f;
-
- _scrollView.Add(_text);
- }
-
- // Callback for _animation finished signal handling
- public void AnimationFinished(object sender, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "Customized Animation Finished Event handler");
- }
- private void OnKey(object source, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "View Keyevent EVENT callback....");
- }
-
- private bool Onwheel(object source, View.WheelEventArgs e)
- {
- Tizen.Log.Debug("NUI", "View Wheel EVENT callback....");
- return true;
- }
-
- private bool OnTouch(object source, View.TouchEventArgs e)
- {
- Tizen.Log.Debug("NUI", "View TOUCH EVENT callback....");
-
- // Only animate the _text label when touch down happens
- if( e.Touch.GetState(0) == PointStateType.Down )
- {
- Tizen.Log.Debug("NUI", "Customized Window Touch event handler");
- // Create a new _animation
- if( _animation )
- {
- _animation.Reset();
- }
-
- _animation = new Animation(1); // 1 second of duration
-
- _animation.AnimateTo(_text, "Orientation", new Rotation( new Radian( new Degree( 180.0f ) ), Vector3.XAxis ), 0, 500);
- _animation.AnimateTo(_text, "Orientation", new Rotation( new Radian( new Degree( 0.0f ) ), Vector3.XAxis ), 500, 1000);
-
- // Connect the signal callback for animaiton finished signal
- _animation.Finished += AnimationFinished;
-
- // Play the _animation
- _animation.Play();
- }
- return true;
- }
-
- private void OnScrollViewRelayout(object source, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "View OnRelayoutEventArgs EVENT callback....");
-
- // Set the correct scroll bar size after size negotiation of scroll view is done
- _scrollBar.Size2D = new Size2D(0, (int)_scrollView.GetRelayoutSize(DimensionType.Width));
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-// Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using System.Collections.Generic;
-
-
-// 1) sibling order test
-namespace SiblingOrderTest
-{
- class Example : NUIApplication
- {
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- Window _window;
-
- public void Initialize()
- {
- _window = Window.Instance;
- _window.BackgroundColor = Color.White;
-
- // sibling order test
- // By default, the SiblingOrder is 0.
- SiblingTest1();
-
- // sibling order test
- // Set the SiblingOrder 0 -> 9
- SiblingTest2();
-
- // sibling order test
- // Set the SiblingOrder 10 -> 1
- SiblingTest3();
-
- // sibling order test
- // Set the SiblingOrder 5 -> 1 & 0 -> 4
- SiblingTest4();
-
- // sibling order test
- // Set the SiblingOrder 0 -> 4 & 5 -> 1
- SiblingTest5();
- }
-
- public void SiblingTest1()
- {
- Position2D _myPos = new Position2D(100, 30);
-
- for (int i = 0; i < 10; i++)
- {
- PushButton _view = new PushButton();
-
- _view.Name = "sibling" + i;
- _view.LabelText = "view" + i;
- _view.MinimumSize = new Size2D(100, 50);
- _view.ParentOrigin = ParentOrigin.TopLeft;
- _view.PivotPoint = PivotPoint.TopLeft;
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
-
- _window.Add(_view);
- }
- }
-
- public void SiblingTest2()
- {
- Position2D _myPos = new Position2D(100, 180);
-
- for (int i = 0; i < 10; i++)
- {
- PushButton _view = new PushButton();
-
- _view.Name = "sibling" + i;
- _view.LabelText = "view" + i;
- _view.MinimumSize = new Size2D(100, 50);
- _view.ParentOrigin = ParentOrigin.TopLeft;
- _view.PivotPoint = PivotPoint.TopLeft;
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
-
- _window.Add(_view);
- _view.SiblingOrder = i;
- }
- }
-
- public void SiblingTest3()
- {
- Position2D _myPos = new Position2D(100, 330);
-
- for (int i = 0; i < 10; i++)
- {
- PushButton _view = new PushButton();
-
- _view.Name = "sibling" + i;
- _view.LabelText = "view" + i;
- _view.MinimumSize = new Size2D(100, 50);
- _view.ParentOrigin = ParentOrigin.TopLeft;
- _view.PivotPoint = PivotPoint.TopLeft;
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
-
- _window.Add(_view);
- _view.SiblingOrder = 10-i;
- }
- }
-
- public void SiblingTest4()
- {
- Position2D _myPos = new Position2D(100, 480);
-
- for (int i = 0; i < 10; i++)
- {
- PushButton _view = new PushButton();
-
- _view.Name = "sibling" + i;
- _view.LabelText = "view" + i;
- _view.MinimumSize = new Size2D(100, 50);
- _view.ParentOrigin = ParentOrigin.TopLeft;
- _view.PivotPoint = PivotPoint.TopLeft;
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
-
- _window.Add(_view);
-
- if (i<5)
- {
- _view.SiblingOrder = 5-i;
- }
- else
- {
- _view.SiblingOrder = i-5;
- }
- }
- }
-
- public void SiblingTest5()
- {
- Position2D _myPos = new Position2D(100, 630);
-
- for (int i = 0; i < 10; i++)
- {
- PushButton _view = new PushButton();
-
- _view.Name = "sibling" + i;
- _view.LabelText = "view" + i;
- _view.MinimumSize = new Size2D(100, 50);
- _view.ParentOrigin = ParentOrigin.TopLeft;
- _view.PivotPoint = PivotPoint.TopLeft;
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
-
- _window.Add(_view);
-
- if (i<5)
- {
- _view.SiblingOrder = i;
- }
- else
- {
- _view.SiblingOrder = 10-i;
- }
- }
- }
-
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-// Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using System.Collections.Generic;
-
-
-// 1) sibling order test
-namespace Test1
-{
- class Example : NUIApplication
- {
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- Window _window;
- StyleManager _style;
-
- public void Initialize()
- {
- _window = Window.Instance;
- _window.BackgroundColor = Color.White;
-
- // 1) sibling order test
- SiblingTest();
- // 2) text visual test
- dali_VisualBase_Creation_test();
-
- // 3) visual creation test
- VisualTest2();
-
- _style = StyleManager.Get();
- //_style.StyleChanged += _style_StyleChanged;
- _style.StyleChanged += (obj, e) =>
- {
- Tizen.Log.Debug("NUI", "in stylechanged.. C#side..\n");
- //flag = true;
- };
-
- _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/date-picker-theme.json");
- Tizen.Log.Debug("NUI", "#### 1) first change!");
-
-
- AnimatePath_1();
- }
-
- private void _style_StyleChanged(object sender, StyleManager.StyleChangedEventArgs e)
- {
- Tizen.Log.Debug("NUI", "style changed event handler comes");
- }
-
- public void SiblingTest()
- {
- View _prev = null;
- Position2D _myPos = new Position2D(100, 100);
- List<View> list_view = new List<View>();
- TextLabel _txt = new TextLabel();
-
- for (int i = 0; i < 10; i++)
- {
- View _view0 = new PushButton();
- PushButton _view = _view0 as PushButton;
-
- _view.Name = "sibling" + i;
- _view.MinimumSize = new Size2D(100, 50);
- _view.LabelText = "sibling" + i;
- _view.ParentOrigin = ParentOrigin.TopLeft;
- _view.PivotPoint = PivotPoint.TopLeft;
- _view.Position2D = _myPos + new Position2D(20 * i, 10 * i);
- _view.Clicked += (sender, ee) =>
- {
- View curr = sender as View;
- Tizen.Log.Debug("NUI", "clicked curr view name=" + curr.Name + " sibling=" + curr.SiblingOrder);
- curr.RaiseToTop();
- if (_prev)
- {
- _prev.LowerToBottom();
- Tizen.Log.Debug("NUI", "raise on top is called!curr sibling=" + curr.SiblingOrder + " prev name=" + _prev.Name + " sibling=" + _prev.SiblingOrder);
- }
- _prev = curr;
- _txt.Text = "on top: " + curr.Name + ", sibling order=" + curr.SiblingOrder;
-
- _style.ApplyTheme("/home/owner/apps_rw/NUISamples.TizenTV/res/json/style-example-theme-one.json");
- Tizen.Log.Debug("NUI", "#### 2) second change!");
-
- return true;
- };
- list_view.Add(_view);
- }
-
- for (int i = 0; i < 10; i++)
- {
- _window.Add(list_view[i]);
- Tizen.Log.Debug("NUI", list_view[i].Name + "'s sibling order=" + list_view[i].SiblingOrder);
- }
-
- _txt.ParentOrigin = ParentOrigin.TopLeft;
- _txt.PivotPoint = PivotPoint.TopLeft;
- _txt.Text = "on top: sibling#, sibling order=?";
- _txt.Position2D = _myPos + new Position2D(-50, 200);
- _txt.TextColor = Color.Blue;
- _window.Add(_txt);
-
- }
-
- public class VisualTest : CustomView
- {
- private int TextVisualPropertyIndex = -1;
- private VisualBase _textVisual;
- private string _string;
-
- public VisualTest() : base(typeof(VisualTest).Name, CustomViewBehaviour.RequiresKeyboardNavigationSupport)
- {
- }
- public string TextVisual
- {
- get
- {
- return _string;
- }
- set
- {
- _string = value;
-
- TextVisualPropertyIndex = RegisterProperty("textvisualtest", new PropertyValue("textvisualtest"), PropertyAccessMode.ReadWrite);
-
- PropertyMap textVisual = new PropertyMap();
- textVisual.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text))
- .Add(TextVisualProperty.Text, new PropertyValue(_string))
- .Add(TextVisualProperty.TextColor, new PropertyValue(Color.Blue))
- .Add(TextVisualProperty.PointSize, new PropertyValue(10))
- .Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER"))
- .Add(TextVisualProperty.VerticalAlignment, new PropertyValue("CENTER"));
- _textVisual = VisualFactory.Instance.CreateVisual(textVisual);
- RegisterVisual(TextVisualPropertyIndex, _textVisual);
- _textVisual.DepthIndex = TextVisualPropertyIndex;
- }
- }
- }
-
- //when use belowing testcase, Time is out and this case is BLOCK
- public void dali_VisualBase_Creation_test()
- {
- try
- {
- Tizen.Log.Debug("NUI", "##### start! ######");
-
- VisualTest _visualTest = new VisualTest();
- _visualTest.TextVisual = "Hello NUI Text Visual!";
- _visualTest.ParentOrigin = ParentOrigin.TopLeft;
- _visualTest.PivotPoint = PivotPoint.TopLeft;
- _visualTest.Size2D = new Size2D(600, 200);
- _visualTest.Position2D = new Position2D(50, 400);
- _visualTest.BackgroundColor = Color.Yellow;
- _window.Add(_visualTest);
- }
- catch (Exception e)
- {
- Tizen.Log.Error("NUI", "##### Caught Exception" + e.ToString());
- throw new System.InvalidOperationException("visual test error!!!");
- }
- }
-
- public void VisualTest2()
- {
- try
- {
- Tizen.Log.Debug("NUI", "##### VisualTest2() start! ######");
-
- VisualFactory visualfactory = VisualFactory.Instance;
- PropertyMap textMap1 = new PropertyMap();
- textMap1.Insert(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
- textMap1.Insert(TextVisualProperty.Text, new PropertyValue("Hello"));
- textMap1.Insert(TextVisualProperty.PointSize, new PropertyValue(10.0f));
-
- PropertyMap textMap2 = new PropertyMap();
- VisualBase textVisual1 = visualfactory.CreateVisual(textMap1);
- textVisual1.Creation = textMap2;
- }
- catch (Exception e)
- {
- Tizen.Log.Error("NUI", "Caught Exception" + e.ToString());
- throw new System.InvalidOperationException("visual test2 error!!!");
- //LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
- //Assert.IsTrue(e is ArgumentException, "Argument Exception Not Recieved");
- }
- }
-
- //[Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")]
- public void AnimatePath_1()
- {
- Tizen.Log.Debug("NUI", "#### 1) animate path test !");
- /* TEST CODE */
- View view = new View();
- view.ParentOrigin = ParentOrigin.TopLeft;
- view.PivotPoint = PivotPoint.TopLeft;
- view.MinimumSize = new Size2D(100, 100);
- view.BackgroundColor = Color.Red;
- _window.Add(view);
-
- Position position0 = new Position(200.0f, 200.0f, 0.0f);
- Position position1 = new Position(300.0f, 300.0f, 0.0f);
- Position position2 = new Position(400.0f, 400.0f, 0.0f);
-
- Path path = new Path();
- path.AddPoint(position0);
- path.AddPoint(position1);
- path.AddPoint(position2);
- //Control points for first segment
- path.AddControlPoint(new Vector3(39.0f, 90.0f, 0.0f));
- path.AddControlPoint(new Vector3(56.0f, 119.0f, 0.0f));
- //Control points for second segment
- path.AddControlPoint(new Vector3(78.0f, 120.0f, 0.0f));
- path.AddControlPoint(new Vector3(93.0f, 104.0f, 0.0f));
-
- Animation animation = new Animation();
- animation.AnimatePath(view, path, Vector3.XAxis, 0, 5000, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
- animation.Play();
- Vector3 position = new Vector3();
- Vector3 tangent = new Vector3();
-
- path.Sample(0.0f, position, tangent);
- Rotation rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
- Tizen.Log.Debug("NUI", "################ progress = 0! ");
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
- //Assert.AreEqual(position.X, view.PositionX, "The actor's PositionX of is not correct");
- //Assert.AreEqual(position.Y, actor.PositionY, "The actor's PositionY of is not correct");
- //Assert.AreEqual(position.Z, actor.PositionZ, "The actor's PositionZ of is not correct");
- //Assert.IsTrue(rotation.Equals(actor.Orientation));
- //await Task.Delay(250);
- path.Sample(0.25f, position, tangent);
- rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
- Tizen.Log.Debug("NUI", "################ progress = 0.25! ");
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
- //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct");
- //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct");
- //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct");
- //Assert.IsTrue(rotation.Equals(actor.Orientation));
- //await Task.Delay(500);
- path.Sample(0.75f, position, tangent);
- rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
- Tizen.Log.Debug("NUI", "################ progress = 0.75! ");
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
- //Assert.AreEqual(position.X, actor.PositionX, "The PositionX of actor is not correct here");
- //Assert.AreEqual(position.Y, actor.PositionY, "The PositionY of actor is not correct here");
- //Assert.AreEqual(position.Z, actor.PositionZ, "The PositionZ of actor is not correct here");
- //Assert.IsTrue(rotation.Equals(actor.Orientation));
-
- path.Sample(1.0f, position, tangent);
- rotation = new Rotation(new Radian(new Degree(0.0f)), tangent);
- Tizen.Log.Debug("NUI", "################ progress = 1.0! ");
- Tizen.Log.Debug("NUI", "position=(" + position.X + "," + position.Y + "," + position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.Position.X + "," + view.Position.Y + "," + view.Position.Z + ")");
- Tizen.Log.Debug("NUI", "view position=(" + view.PositionX + "," + view.PositionY + "," + view.PositionZ + ")");
- Tizen.Log.Debug("NUI", "view cur position=(" + view.CurrentPosition.X + "," + view.CurrentPosition.Y + "," + view.CurrentPosition.Z + ")");
- Tizen.Log.Debug("NUI", "tangent=(" + tangent.X + "," + tangent.Y + "," + tangent.Z + ")");
- Tizen.Log.Debug("NUI", "angle between=" + Rotation.AngleBetween(view.Orientation, rotation) + " view orientation length=" + view.Orientation.Length() + " rotation length=" + rotation.Length());
-
-
- Tizen.Log.Debug("NUI", "#### 2) animate path test end!");
- }
-
-
-
-
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace TextTest
-{
- class Example : NUIApplication
- {
- TextLabel _pointLabel;
- Boolean _colorToggle;
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private bool LabelTouched(object sender, View.TouchEventArgs e)
- {
- if (e.Touch.GetState(0) == PointStateType.Down)
- {
- Animation textColorAnimation = new Animation(1000);
- if (_colorToggle)
- {
- textColorAnimation.AnimateTo(_pointLabel, "TextColorAnimatable", Color.Blue );
- _colorToggle = false;
- }
- else
- {
- textColorAnimation.AnimateTo(_pointLabel, "TextColorAnimatable", Color.Green );
- _colorToggle = true;
- }
- textColorAnimation.Play();
- }
- return true;
- }
-
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TextLabel pixelLabel = new TextLabel("Test Pixel Size 32.0f");
- pixelLabel.Position2D = new Position2D(10, 10);
- pixelLabel.PixelSize = 32.0f;
- pixelLabel.BackgroundColor = Color.Magenta;
- window.Add(pixelLabel);
-
- _pointLabel = new TextLabel("Test Point Size 32.0f");
- _pointLabel.Position2D = new Position2D(10, 100);
- _pointLabel.PointSize = 32.0f;
- _pointLabel.BackgroundColor = Color.Red;
- _pointLabel.TextColorAnimatable = Color.Green; // Set initial text color using animatable property
- _pointLabel.TouchEvent += LabelTouched;
- _colorToggle = true;
-
- window.Add(_pointLabel);
-
-
- TextLabel ellipsis = new TextLabel("Ellipsis of TextLabel is enabled.");
- ellipsis.Size2D = new Size2D(100, 80);
- ellipsis.Position2D = new Position2D(10, 200);
- ellipsis.PointSize = 20.0f;
- ellipsis.Ellipsis = true;
- ellipsis.BackgroundColor = Color.Cyan;
- window.Add(ellipsis);
-
- TextLabel autoScrollStopMode = new TextLabel("AutoScrollStopMode is finish-loop.");
- autoScrollStopMode.Size2D = new Size2D(400, 50);
- autoScrollStopMode.Position2D = new Position2D(10, 300);
- autoScrollStopMode.PointSize = 15.0f;
- autoScrollStopMode.BackgroundColor = Color.Green;
- autoScrollStopMode.AutoScrollStopMode = AutoScrollStopMode.FinishLoop;
- autoScrollStopMode.EnableAutoScroll = true;
- window.Add(autoScrollStopMode);
-
- TextField field = new TextField();
- field.Size2D = new Size2D(400, 100);
- field.Position2D = new Position2D(10, 400);
- field.BackgroundColor = Color.Cyan;
- field.PlaceholderText = "input someth...";
- field.PlaceholderTextFocused = "input someth... focused";
- field.Focusable = true;
- PropertyMap hiddenMap = new PropertyMap();
- hiddenMap.Add(HiddenInputProperty.Mode, new PropertyValue((int)HiddenInputModeType.ShowLastCharacter));
- hiddenMap.Add(HiddenInputProperty.ShowDuration, new PropertyValue(2));
- hiddenMap.Add(HiddenInputProperty.SubstituteCount, new PropertyValue(4));
- hiddenMap.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x23));
- field.HiddenInputSettings = hiddenMap;
- field.EnableSelection = true;
- window.Add(field);
-
- InputMethod inputMethod = new InputMethod();
- inputMethod.PanelLayout = InputMethod.PanelLayoutType.Number;
- inputMethod.ActionButton = InputMethod.ActionButtonTitleType.Go;
- inputMethod.AutoCapital = InputMethod.AutoCapitalType.Word;
- inputMethod.Variation = 1;
-
- field.InputMethodSettings = inputMethod.OutputMap;
-
- PropertyMap propertyMap = new PropertyMap();
- propertyMap.Add("placeholderText", new PropertyValue("Placeholder Text"));
- propertyMap.Add("placeholderTextFocused", new PropertyValue("Placeholder Text Focused"));
- propertyMap.Add("placeholderColor", new PropertyValue(Color.Red));
- propertyMap.Add("placeholderPointSize", new PropertyValue(15.0f));
-
- PropertyMap fontStyleMap = new PropertyMap();
- fontStyleMap.Add("weight", new PropertyValue("bold"));
- fontStyleMap.Add("width", new PropertyValue("condensed"));
- fontStyleMap.Add("slant", new PropertyValue("italic"));
- propertyMap.Add("placeholderFontStyle", new PropertyValue(fontStyleMap));
-
- TextEditor editor = new TextEditor();
- editor.Size2D = new Size2D(400, 100);
- editor.Position2D = new Position2D(10, 550);
- editor.BackgroundColor = Color.Magenta;
- editor.EnableScrollBar = true;
- editor.EnableSelection = true;
- editor.Focusable = true;
- editor.Placeholder = propertyMap;
- window.Add(editor);
- editor.TextChanged += (obj, e) => {
- Tizen.Log.Debug("NUI", "editor line count: " + e.TextEditor.LineCount);
- };
-
- editor.ScrollStateChanged += (obj, e)=> {
- Tizen.Log.Debug("NUI", "editor scroll state:" + e.ScrollState);
- };
-
- Tizen.Log.Debug("NUI", "editor id: " + editor.ID);
-
- FocusManager.Instance.SetCurrentFocusView(editor);
- editor.UpFocusableView = field;
- field.DownFocusableView = editor;
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace TextTest2
-{
- class Example : NUIApplication
- {
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private PushButton button;
- private TextEditor editor;
- private ImfManager imfManager;
-
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- PropertyMap propertyMap = new PropertyMap();
- propertyMap.Add("placeholderText", new PropertyValue("TextEditor Placeholder Text"));
- propertyMap.Add("placeholderColor", new PropertyValue(Color.Red));
- propertyMap.Add("placeholderPointSize", new PropertyValue(12.0f));
-
- PropertyMap fontStyleMap = new PropertyMap();
- fontStyleMap.Add("weight", new PropertyValue("bold"));
- fontStyleMap.Add("width", new PropertyValue("condensed"));
- fontStyleMap.Add("slant", new PropertyValue("italic"));
- propertyMap.Add("placeholderFontStyle", new PropertyValue(fontStyleMap));
-
-
- editor = new TextEditor()
- {
- Size2D = new Size2D(500, 300),
- Position2D = new Position2D(10, 550),
- BackgroundColor = Color.Magenta,
- Focusable = true,
- Placeholder = propertyMap
- };
-
- window.Add(editor);
-
- editor.TextChanged += (obj, e) => {
- Tizen.Log.Fatal("NUI", "editor line count: " + e.TextEditor.LineCount);
- };
-
- editor.ScrollStateChanged += (obj, e) => {
- Tizen.Log.Fatal("NUI", "editor scroll state:" + e.ScrollState);
- };
-
- editor.KeyEvent += OnKeyEvent;
-
-
- Tizen.Log.Debug("NUI", "editor id: " + editor.ID);
-
- imfManager = ImfManager.Get();
- imfManager.AutoEnableInputPanel(false);
- imfManager.SetInputPanelUserData("layouttype = 1 & entrylimit = 255 & action = clearall_for_voice_commit & caller = org.volt.search - all");
-
-
- // send privatecommand event
- ImfManager.ImfEventData imfevent = new ImfManager.ImfEventData(ImfManager.ImfEvent.PrivateCommand, "", 0, 0);
- imfManager.EventReceived += ImfManager_ImfManagerEventReceived;
-
- imfManager.LanguageChanged += ImfManager_LanguageChanged;
-
- imfManager.Activated += (obj, e) => {
- Tizen.Log.Debug("NUI", "ImfManager Activated !!!!!");
- };
- imfManager.StatusChanged += (obj, e) => {
- Tizen.Log.Debug("NUI", "ImfManager StatusChanged: !!!!!" + e.StatusChanged);
- };
- imfManager.Resized += (obj, e) =>
- {
- Tizen.Log.Debug("NUI", "ImfManager Resized !!!!!");
- };
- imfManager.KeyboardTypeChanged += (obj, e) => {
- Tizen.Log.Debug("NUI", "ImfManager KeyboardTypeChanged: !!!!!" + e.KeyboardType);
- };
-
- button = new PushButton()
- {
- LabelText = "Button",
- Size2D = new Size2D(400, 200),
- Position2D = new Position2D(10, -10),
- ParentOrigin = ParentOrigin.BottomLeft,
- PivotPoint = PivotPoint.BottomLeft,
- PositionUsesPivotPoint = true,
- Focusable = true
- };
-
- window.Add(button);
-
- button.UpFocusableView = editor;
- editor.DownFocusableView = button;
-
- FocusManager.Instance.SetCurrentFocusView(button);
- }
-
- private bool OnKeyEvent(object source, View.KeyEventArgs e)
- {
- Tizen.Log.Debug("NUI", "KeyEvent called !!!!!");
- if (e.Key.State != Key.StateType.Down || editor.Focusable == false)
- {
- Tizen.Log.Debug("NUI", "KeyEvent ignored !!!!!");
- return false;
- }
- switch (e.Key.KeyPressedName)
- {
- case "Return":
- Tizen.Log.Debug("NUI", "KeyPressedName: Return !!!!!");
- ShowImf();
- return true;
- case "Select":
- Tizen.Log.Debug("NUI", "KeyPressedName: Select !!!!!");
- HideImf();
- return true;
- case "Cancel":
- Tizen.Log.Debug("NUI", "KeyPressedName: Cancel !!!!!");
- HideImf();
- return true;
- case "Down":
- Tizen.Log.Debug("NUI", "KeyPressedName: Down !!!!!");
- HideImf();
- return MoveFocusTo(button);
- }
- return false;
- }
-
- private void ShowImf()
- {
- imfManager.Activate();
- imfManager.ShowInputPanel();
- Tizen.Log.Debug("NUI", "IME showed !!!!!");
- }
-
- private bool MoveFocusTo(View view)
- {
- if (view == null) return false;
- return FocusManager.Instance.SetCurrentFocusView(view);
- }
-
- private void HideImf()
- {
- imfManager.Deactivate();
- imfManager.HideInputPanel();
- Tizen.Log.Debug("NUI", "IME hided !!!!!");
- }
-
- public ImfManager.ImfCallbackData ImfManager_ImfManagerEventReceived(object sender, ImfManager.EventReceivedEventArgs e)
- {
- Tizen.Log.Debug("NUI", "ImfManager_ImfManagerEventReceived()!");
-
- Tizen.Log.Debug("NUI", "e.ImfEventData.PredictiveString= " + e?.ImfEventData?.PredictiveString);
- Tizen.Log.Debug("NUI", "e.ImfEventData.CursorOffset= " + e?.ImfEventData?.CursorOffset);
- Tizen.Log.Debug("NUI", "e.ImfEventData.EventName= " + e?.ImfEventData?.EventName);
- Tizen.Log.Debug("NUI", "e.ImfEventData.NumberOfChars= " + e?.ImfEventData?.NumberOfChars);
-
- //Be able to compare VD specific private command with ImfEventData.predictiveString
- if (e.ImfEventData.PredictiveString == "IME_F31")
- {
- ImfManager.Get().Deactivate();
- ImfManager.Get().HideInputPanel();
- // Do Something the user wants
- Tizen.Log.Debug("NUI", "ImfManager ImfEventData.PredictiveString: IME_F31!!!");
- }
- ImfManager.ImfCallbackData callbackData = new ImfManager.ImfCallbackData(true, 0, e.ImfEventData.PredictiveString, false);
- Tizen.Log.Debug("NUI", "ImfManager return callbackData!!!");
- return callbackData;
- }
-
- public void ImfManager_LanguageChanged(object sender, EventArgs args)
- {
- Tizen.Log.Debug("NUI", "ImfManager LanguageChanged!!!");
- return;
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-using System;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.Constants;
-
-namespace TimerTest
-{
- // An example of Visual View control.
- class Example : NUIApplication
- {
- private static int i = 0;
-
- public Example() : base()
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- protected override void OnTerminate()
- {
- NUILog.Debug("OnTerminate() is called!");
- base.OnTerminate();
- }
-
- public void Initialize()
- {
- NUILog.Debug("Initialize() is called!");
-
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TextLabel label = new TextLabel()
- {
- Text = "Steps: 0",
- Size2D = new Size2D(460, 80),
- Position2D = new Position2D(10, 10)
- };
-
- RadioButton radio1 = new RadioButton()
- {
- LabelText = "Set interval 500",
- Size2D = new Size2D(300, 50),
- Position2D = new Position2D(10, 100),
- };
- RadioButton radio2 = new RadioButton()
- {
- LabelText = "Set interval 1000",
- Size2D = new Size2D(300, 50),
- Position2D = new Position2D(10, 160),
- Selected = true
- };
- RadioButton radio3 = new RadioButton()
- {
- LabelText = "Set interval 3000",
- Size2D = new Size2D(300, 50),
- Position2D = new Position2D(10, 220),
- };
-
- PushButton button1 = new PushButton()
- {
- LabelText = "Start",
- Size2D = new Size2D(100, 50),
- Position2D = new Position2D(10, 300),
- Focusable = true
- };
-
- PushButton button2 = new PushButton()
- {
- LabelText = "Stop",
- Size2D = new Size2D(100, 50),
- Position2D = new Position2D(140, 300),
- Focusable = true
- };
-
- window.Add(label);
- window.Add(radio1);
- window.Add(radio2);
- window.Add(radio3);
- window.Add(button1);
- window.Add(button2);
-
- FocusManager.Instance.SetCurrentFocusView(button1);
- button1.LeftFocusableView = button1.RightFocusableView = button2;
- button2.RightFocusableView = button2.LeftFocusableView = button1;
- button1.UpFocusableView = button2.UpFocusableView = radio3;
- radio3.UpFocusableView = radio2;
- radio2.UpFocusableView = radio1;
- radio1.DownFocusableView = radio2;
- radio2.DownFocusableView = radio3;
- radio3.DownFocusableView = button1;
-
- Timer timer = new Timer(1000);
- timer.Tick += (obj, e) =>
- {
- Tizen.Log.Fatal("NUI", "NUI Timer tick called!");
- label.Text = "Steps: " + (i++);
- return true;
- };
-
- button1.Clicked += (obj, e) =>
- {
- if (radio1.Selected == true) timer.Interval = 500;
- if (radio2.Selected == true) timer.Interval = 1000;
- if (radio3.Selected == true) timer.Interval = 3000;
- timer.Start();
- return true;
- };
- button2.Clicked += (obj, e) =>
- {
- timer.Stop();
- return true;
- };
-
- window.KeyEvent += Instance_Key;
- }
- private void Instance_Key(object sender, Window.KeyEventArgs e)
- {
- NUILog.Debug("Instance_Key: " + e.Key.KeyPressedName);
-
- if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "BackSpace" || e.Key.KeyPressedName == "XF86Back"))
- {
- Exit();
- }
- }
-
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
-* Copyright (c) 2017 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 Tizen.NUI;
-
-namespace TTSPlayerTest
-{
- class Example : NUIApplication
- {
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TTSPlayer ttsPlayer = TTSPlayer.Get(TTSPlayer.TTSMode.Default);
- ttsPlayer.Play("tts player test");
-
- ttsPlayer.StateChanged += (s, e) =>
- {
- Tizen.Log.Debug("NUI", "TTS state changed!!!");
- };
- ttsPlayer.Pause();
- ttsPlayer.Resume();
- ttsPlayer.Stop();
- Tizen.Log.Debug("NUI", "TTS state: " + ttsPlayer.GetState());
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
-* Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace UserAlphaFunctionTest
-{
- class Example : NUIApplication
- {
- private Animation _animation;
- private TextLabel _text;
- private View _view1, _view2, _view3;
- private UserAlphaFunctionDelegate _user_alpha_func;
- private int myCount;
-
- public static void Log(string str)
- {
- Tizen.Log.Debug("NUI", "[DALI C# SAMPLE] " + str);
- }
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- // Declare user alpha function delegate
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- delegate float UserAlphaFunctionDelegate(float progress);
-
- public void Initialize()
- {
- Log("Initialize() is called!");
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
- window.TouchEvent += OnWindowTouched;
- window.TouchEvent += OnWindowTouched2;
- //window.EventProcessingFinished += OnEventProcessingFinished;
- window.WheelEvent += OnWindowWheelEvent;
-
- // Add a _text label to the window
- _text = new TextLabel("Hello Mono World");
- _text.ParentOrigin = ParentOrigin.BottomCenter;
- _text.PivotPoint = PivotPoint.BottomCenter;
- _text.HorizontalAlignment = HorizontalAlignment.Center;
- _text.PointSize = 32.0f;
- window.Add(_text);
-
- _view1 = new View();
- _view1.Size2D = new Size2D(200, 200);
- _view1.BackgroundColor = Color.Green;
- _view1.ParentOrigin = ParentOrigin.Center;
- _view1.PivotPoint = PivotPoint.Center;
- _view1.WidthResizePolicy = ResizePolicyType.Fixed;
- _view1.HeightResizePolicy = ResizePolicyType.Fixed;
- _view1.AddedToWindow += OnWindow;
- window.Add(_view1);
-
- _view2 = new View();
- _view2.BackgroundColor = Color.Red;
- _view2.Size2D = new Size2D(50, 50);
- _view2.ParentOrigin = ParentOrigin.TopLeft;
- _view2.PivotPoint = PivotPoint.TopLeft;
- _view2.WidthResizePolicy = ResizePolicyType.Fixed;
- _view2.HeightResizePolicy = ResizePolicyType.Fixed;
- _view1.Add(_view2);
-
- _view3 = new View();
- _view3.BackgroundColor = Color.Blue;
- _view3.Size2D = new Size2D(50, 50);
- _view3.ParentOrigin = ParentOrigin.TopLeft;
- _view3.PivotPoint = PivotPoint.TopLeft;
- _view3.WidthResizePolicy = ResizePolicyType.Fixed;
- _view3.HeightResizePolicy = ResizePolicyType.Fixed;
- _view1.Add(_view3);
-
- _user_alpha_func = new UserAlphaFunctionDelegate(body);
-
- MyAnimating();
- }
-
- // User defines alpha function as custom alpha function
- // Important Notification : when this custom alpha-function is implemented,
- // the other function call nor other data excess is prevented.
- // this method must be implemented to calculate the values of input and output purely.
- // unless, this will cause application crash.
- float body(float progress)
- {
- if (progress > 0.2f && progress < 0.7f)
- {
- return progress + 0.8f;
- }
- return progress;
- }
-
- // Callback for _animation finished signal handling
- public void AnimationFinished(object sender, EventArgs e)
- {
- Log("AnimationFinished() is called!");
- myCount = 0;
- }
-
- public void MyAnimating()
- {
- // Create a new _animation
- if (_animation)
- {
- _animation.Clear();
- _animation.Reset();
- }
-
- _animation = new Animation(10000); // 10000 milli-second of duration
- _animation.AnimateTo(_view2, "Position", new Vector3(150.0f, 150.0f, 0.0f), 5000, 10000, new AlphaFunction(_user_alpha_func));
- // Connect the signal callback for animaiton finished signal
- _animation.Finished += AnimationFinished;
- _animation.EndAction = Animation.EndActions.Discard;
- // Play the _animation
- _animation.Play();
- }
-
- // Callback for window touched signal handling
- public void OnWindowTouched(object source, Window.TouchEventArgs e)
- {
- // Only animate the _text label when touch down happens
- if (e.Touch.GetState(0) == PointStateType.Down)
- {
- Log("OnWindowTouched() is called! PointStateType.DOWN came!");
- myCount++;
- if (myCount > 1)
- {
- _animation.Stop();
- Log("_animation.Stop() is called!");
- }
- }
- }
-
- // Callback for window touched signal handling
- public void OnWindowTouched2(object source, Window.TouchEventArgs e)
- {
- Log("OnWindowTouched2() is called!state=" + e.Touch.GetState(0));
- }
-
- public void OnEventProcessingFinished(object source)
- {
- Log("OnEventProcessingFinished() is called!");
- }
-
- public void OnWindowWheelEvent(object source, Window.WheelEventArgs e)
- {
- Log("OnWindowWheelEvent() is called!");
- //Log("OnWindowWheelEvent() is called!direction="+ e.WheelEvent.direction + " timeStamp=" + e.WheelEvent.timeStamp );
- }
-
-
- public void OnWindow(object source, EventArgs e)
- {
- Log("OnWindow() is called!");
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Log("Main() is called!");
-
- Example example = new Example();
- example.Run(args);
-
- Log("After MainLoop()");
- }
- }
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace MyCSharpExample
-{
- class Example : NUIApplication
- {
- const int num = 2;
- View[] view;
-
- View lastFocusedView;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- view = new View[2];
-
- for (int i = 0; i < num; i++)
- {
- view[i] = new View();
- view[i].Size2D = new Size2D(200, 200);
- view[i].BackgroundColor = Color.Blue;
- view[i].Position = new Position(300 + i * 300, 300, 0);
- view[i].Name = "MyView" + i;
- view[i].Focusable = true;
- Window.Instance.Add(view[i]);
- view[i].FocusGained += FocusNavigationSample_FocusGained;
- view[i].FocusLost += FocusNavigationSample_FocusLost;
- view[i].KeyEvent += FocusNavigationSample_KeyEvent;
- }
-
- view[0].RightFocusableView = view[1];
- view[0].LeftFocusableView = view[1];
- view[1].RightFocusableView = view[0];
- view[1].LeftFocusableView = view[0];
-
- FocusManager.Instance.SetCurrentFocusView(view[0]);
- FocusManager.Instance.PreFocusChange += Instance_PreFocusChange;
-
- Window.Instance.TouchEvent += Instance_Touch;
- }
-
- private void Instance_Touch(object sender, Window.TouchEventArgs e)
- {
- Tizen.Log.Debug("NUI", "window touched! set key focus as view[0]!");
- FocusManager.Instance.SetCurrentFocusView(view[0]);
- }
-
- private bool FocusNavigationSample_KeyEvent(object source, View.KeyEventArgs e)
- {
- Tizen.Log.Debug("NUI", "...");
- View view = source as View;
-
- Tizen.Log.Debug("NUI", "NUI-1 " + "View-" + view.Name + ", Pressed-" + e.Key.KeyPressedName + e.Key.State.ToString());
-
- return false;
- }
-
- private void FocusNavigationSample_FocusLost(object sender, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "...");
- View view = sender as View;
- view.BackgroundColor = Color.Blue;
- view.Scale = new Vector3(1.0f, 1.0f, 1.0f);
-
- Tizen.Log.Debug("NUI", "NUI-2 " + "FocusLost-" + view.Name);
- }
-
- private void FocusNavigationSample_FocusGained(object sender, EventArgs e)
- {
- Tizen.Log.Debug("NUI", "...");
- View view = sender as View;
- view.BackgroundColor = Color.Red;
- view.Scale = new Vector3(1.2f, 1.2f, 1.0f);
-
- Tizen.Log.Debug("NUI", "NUI-3 " + "FocusGained-" + view.Name);
- }
-
- private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
- {
- Tizen.Log.Debug("NUI", "...");
- View currentView = (e.CurrentView) ?? lastFocusedView;
- View nextView = null;
-
- Tizen.Log.Debug("NUI", "NUI-4 " + "PreFocusChange-" + e.Direction);
-
- if (currentView != null && currentView.HasBody())
- Tizen.Log.Debug("NUI", "NUI-5 " + " Current-" + currentView.Name);
-
- if (currentView)
- {
- switch (e.Direction)
- {
- case View.FocusDirection.Left:
- nextView = currentView.LeftFocusableView;
- if (nextView == null)
- Tizen.Log.Debug("NUI", "NUI-6 " + "LeftFocusableView is NULL!!!!");
- else
- Tizen.Log.Debug("NUI", "NUI-7 " + currentView.Name + ".LeftFocusableView =" + nextView.Name);
- break;
- case View.FocusDirection.Right:
- nextView = currentView.RightFocusableView;
- if (nextView == null)
- Tizen.Log.Debug("NUI", "NUI-8 " + "RightFocusableView is NULL!!!!");
- else
- Tizen.Log.Debug("NUI", "NUI-9 " + currentView.Name + ".RightFocusableView =" + nextView.Name);
- break;
- case View.FocusDirection.Up:
- nextView = currentView.UpFocusableView;
- if (nextView == null)
- Tizen.Log.Debug("NUI", "NUI-10 " + "UpFocusableView is NULL!!!!");
- else
- Tizen.Log.Debug("NUI", "NUI-11 " + currentView.Name + ".UpFocusableView =" + nextView.Name);
- break;
- case View.FocusDirection.Down:
- nextView = currentView.DownFocusableView;
- if (nextView == null)
- Tizen.Log.Debug("NUI", "NUI-12 " + "DownFocusableView is NULL!!!!");
- else
- Tizen.Log.Debug("NUI", "NUI-13 " + currentView.Name + ".DownFocusableView =" + nextView.Name);
- break;
- default:
- nextView = null; //added
- break;
- }
- }
-
- if (e.ProposedView == null)
- {
- Tizen.Log.Debug("NUI", "NUI-14 " + "ProposedView in NULL!!");
- }
- else if (e.ProposedView.HasBody())
- {
- Tizen.Log.Debug("NUI", "NUI-15 " + "ProposedView-" + e.ProposedView.Name);
- }
- else
- {
- Tizen.Log.Debug("NUI", "NUI-16 " + "ProposedView does NOT have body!!!" + e.ProposedView);
- }
-
- nextView = nextView ?? (e.ProposedView) ?? currentView;
- lastFocusedView = nextView;
-
- if (nextView != null && nextView.HasBody())
- Tizen.Log.Debug("NUI", "NUI-17 " + "Next-" + nextView.Name);
-
- return nextView;
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace VisaulAnimationExample
-{
- class Example : NUIApplication
- {
- private VisualView _contentView;
- private TextLabel _title;
- private PushButton _shadowButton;
- private bool _active = false;
- private const string _resPath = "/home/owner/apps_rw/NUISamples.TizenTV/res"; //for tizen
- //private const string _resPath = "./res"; //for ubuntu
-
- private Animation _animation1;
- private bool _transitionInProgress = false;
- private int cnt1, cnt2;
-
- private SVGVisual svgVisual;
- private AnimatedImageVisual gifVisual;
- private ImageVisual _icon;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TableView titleLayout = new TableView(2, 1);
- titleLayout.Name = ("TitleLayout");
- titleLayout.PivotPoint = PivotPoint.TopLeft;
- titleLayout.Position2D = new Position2D(10, 10);
- titleLayout.Size2D = new Size2D((int)(window.Size.Width * 0.9f), (int)(window.Size.Height * 0.9f));
- titleLayout.SetCellPadding(new Size2D(10, 10));
- titleLayout.BackgroundColor = Color.Cyan;
- window.Add(titleLayout);
-
- _title = new TextLabel("Visual Transition / SVG / AGIF Example");
- _title.Name = ("Title");
- _title.SetStyleName("Title");
- _title.WidthResizePolicy = ResizePolicyType.FillToParent;
- _title.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- _title.HorizontalAlignment = HorizontalAlignment.Center;
- titleLayout.AddChild(_title, new TableView.CellPosition(0, 0));
- titleLayout.SetFitHeight(0);
-
- TableView contentLayout = new TableView(3, 2);
- contentLayout.Name = ("ContentLayout");
- contentLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.PivotPoint = PivotPoint.TopLeft;
- contentLayout.SetCellPadding(new Size2D(10, 10));
- contentLayout.BackgroundColor = Color.Magenta;
- titleLayout.AddChild(contentLayout, new TableView.CellPosition(1, 0));
-
- //////////////////////////////////////////////////////////////////////
- // Create a conttent view
- _contentView = new VisualView();
- _contentView.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- _contentView.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- //_contentView.Size2D = new Size2D(250, 250);
- _contentView.BackgroundImage = _resPath + "/images/background-blocks.jpg";
-
- _icon = new ImageVisual();
- _icon.URL = _resPath + "/images/application-icon-0.png";
- _icon.DepthIndex = 1;
- _icon.Size = new Size2D(50, 50);
- _icon.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon.Position = new Position2D(5, 5);
- _icon.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon.Origin = Visual.AlignType.TopBegin;
- _icon.AnchorPoint = Visual.AlignType.TopBegin;
- _icon.MixColor = new Color(0, 1, 0, 0.5f);
- _icon.Opacity = 0.5f;
- _contentView.AddVisual("icon_visual1", _icon);
-
- contentLayout.AddChild(_contentView, new TableView.CellPosition(0, 0));
-
- _shadowButton = new PushButton();
- _shadowButton.LabelText = "Toggle Transition";
- _shadowButton.Name = ("ToggleTransition");
- _shadowButton.ParentOrigin = ParentOrigin.Center;
- _shadowButton.PivotPoint = PivotPoint.Center;
- _shadowButton.Clicked += (obj, ev) =>
- {
- _active = !_active;
- StartTransition(_active);
- return true;
- };
- _shadowButton.WidthResizePolicy = ResizePolicyType.FillToParent;
- _shadowButton.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.AddChild(_shadowButton, new TableView.CellPosition(0, 1));
-
- //////////////////////////////////////////////////////////////////////
- // make NPatch visual test
- NPatchVisual npatch1 = new NPatchVisual();
- npatch1.URL = _resPath + "/images/gallery-2.jpg";
- npatch1.Size = new Size2D(400, 400);
- npatch1.SizePolicy = VisualTransformPolicyType.Absolute;
- npatch1.Position = new Position2D(400, 0);
- npatch1.PositionPolicy = VisualTransformPolicyType.Absolute;
- npatch1.Origin = Visual.AlignType.TopBegin;
- npatch1.AnchorPoint = Visual.AlignType.TopBegin;
- npatch1.Border = new Rectangle(100, 100, 100, 100);
- npatch1.DepthIndex = 2;
- npatch1.MixColor = new Color(1, 0, 0, 1);
- npatch1.Opacity = 0.5f;
- _contentView.AddVisual("npatchImageVisual1", npatch1);
-
- //////////////////////////////////////////////////////////////////////
- // make SVG visual test
- VisualView VisualView1 = new VisualView();
- VisualView1.WidthResizePolicy = ResizePolicyType.FillToParent;
- VisualView1.HeightResizePolicy = ResizePolicyType.FillToParent;
- VisualView1.BackgroundColor = Color.Black;
- contentLayout.AddChild(VisualView1, new TableView.CellPosition(1, 0));
-
- svgVisual = new SVGVisual();
- svgVisual.URL = _resPath + "/images/Kid1.svg";
- svgVisual.Size = new Size2D(300, 300);
- svgVisual.SizePolicy = VisualTransformPolicyType.Absolute;
- svgVisual.Position = new Position2D(0, 0);
- svgVisual.PositionPolicy = VisualTransformPolicyType.Absolute;
- svgVisual.Origin = Visual.AlignType.TopBegin;
- svgVisual.AnchorPoint = Visual.AlignType.TopBegin;
- VisualView1.AddVisual("svg_visual1", svgVisual);
-
- PushButton svgButton = new PushButton();
- svgButton.LabelText = "SVG Visual Test";
- svgButton.Name = ("svg_visual_test");
- svgButton.PivotPoint = PivotPoint.Center;
- svgButton.WidthResizePolicy = ResizePolicyType.FillToParent;
- svgButton.HeightResizePolicy = ResizePolicyType.FillToParent;
- svgButton.Clicked += (obj, ev) =>
- {
- cnt1++;
- if (cnt1 % 2 == 0)
- {
- svgVisual.URL = _resPath + "/images/World.svg";
- }
- else
- {
- svgVisual.URL = _resPath + "/images/Mail.svg";
- }
- Tizen.Log.Debug("NUI", "svg button clicked!");
- return true;
- };
- contentLayout.AddChild(svgButton, new TableView.CellPosition(1, 1));
-
- //////////////////////////////////////////////////////////////////////
- // make AnimatedImage visual test
- VisualView VisualView2 = new VisualView();
- VisualView2.WidthResizePolicy = ResizePolicyType.FillToParent;
- VisualView2.HeightResizePolicy = ResizePolicyType.FillToParent;
- VisualView2.BackgroundColor = Color.Blue;
- contentLayout.AddChild(VisualView2, new TableView.CellPosition(2, 0));
-
- gifVisual = new AnimatedImageVisual();
- gifVisual.URL = _resPath + "/images/dog-anim.gif";
- gifVisual.Size = new Size2D(200, 200);
- gifVisual.SizePolicy = VisualTransformPolicyType.Absolute;
- gifVisual.Position = new Position2D(0, 0);
- gifVisual.PositionPolicy = VisualTransformPolicyType.Absolute;
- gifVisual.Origin = Visual.AlignType.TopBegin;
- gifVisual.AnchorPoint = Visual.AlignType.TopBegin;
- VisualView2.AddVisual("gif_visual", gifVisual);
-
- PushButton gifButton = new PushButton();
- gifButton.LabelText = "AnimatedImage Visual Test";
- gifButton.Name = ("gif_visual_test");
- gifButton.PivotPoint = PivotPoint.Center;
- gifButton.WidthResizePolicy = ResizePolicyType.FillToParent;
- gifButton.HeightResizePolicy = ResizePolicyType.FillToParent;
- gifButton.Clicked += (obj, ev) =>
- {
- Tizen.Log.Debug("NUI", "gif button clicked!");
- cnt2++;
- int gifNum = cnt2 % 15;
- gifVisual.URL = _resPath + "/images/anim-gif/" + gifNum + ".gif";
- gifButton.LabelText = "file:" + gifNum + ".gif";
- return true;
- };
- contentLayout.AddChild(gifButton, new TableView.CellPosition(2, 1));
- }
-
- private void StartTransition(bool activate)
- {
- if (_animation1)
- {
- _animation1.Stop();
- _animation1.Finished += OnTransitionFinished1;
- }
-
- if (activate)
- {
- _contentView.AnimateVisualAdd(_icon, "Size", new Size2D(150, 150), 0, 1000, AlphaFunction.BuiltinFunctions.Linear);
- _contentView.AnimateVisualAdd(_icon, "Position", new Position2D(40, 40), 0, 1000);
- _animation1 = _contentView.AnimateVisualAddFinish();
- }
- else
- {
- _contentView.AnimateVisualAdd(_icon, "Size", new Position2D(50, 50), 0, 1000, AlphaFunction.BuiltinFunctions.Linear);
- _contentView.AnimateVisualAdd(_icon, "Position", new Position2D(5, 5), 0, 1000);
- _animation1 = _contentView.AnimateVisualAddFinish();
- }
-
- if (_animation1)
- {
- _animation1.Finished += OnTransitionFinished1;
- _transitionInProgress = true;
- _animation1.Play();
- }
- }
- private void OnTransitionFinished1(object sender, EventArgs e)
- {
- _transitionInProgress = false;
- if (_animation1)
- {
- _animation1.Finished += OnTransitionFinished1;
- _animation1.Reset();
- }
- }
-
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
-
-
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace VisaulAnimationExample
-{
- class Example2 : NUIApplication
- {
- private VisualView _contentView1;
- private VisualView _contentView2;
- private VisualView _contentView3;
- private TextLabel _title;
- private PushButton _shadowButton1;
- private PushButton _shadowButton2;
- private PushButton _shadowButton3;
- private bool _active1 = false;
- private bool _active2 = false;
- private bool _active3 = false;
- private const string _resPath = "/home/owner/apps_rw/NUISamples.TizenTV/res";
-
- private Animation _animation;
- private bool _transitionInProgress = false;
-
- public Example2() : base()
- {
- }
-
- public Example2(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example2(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TableView titleLayout = new TableView(2, 1);
- titleLayout.Name = ("TitleLayout");
- titleLayout.PivotPoint = PivotPoint.TopLeft;
- titleLayout.Position2D = new Position2D(10, 10);
- titleLayout.Size2D = new Size2D((int)(window.Size.Width * 0.9f), (int)(window.Size.Height * 0.9f));
- titleLayout.SetCellPadding(new Size2D(10, 10));
- titleLayout.BackgroundColor = Color.Cyan;
- window.Add(titleLayout);
-
- _title = new TextLabel("Visual Transition Example");
- _title.Name = ("Title");
- _title.SetStyleName("Title");
- _title.WidthResizePolicy = ResizePolicyType.FillToParent;
- _title.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- _title.HorizontalAlignment = HorizontalAlignment.Center;
- titleLayout.AddChild(_title, new TableView.CellPosition(0, 0));
- titleLayout.SetFitHeight(0);
-
- TableView contentLayout = new TableView(3, 2);
- contentLayout.Name = ("ContentLayout");
- contentLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.PivotPoint = PivotPoint.TopLeft;
- contentLayout.SetCellPadding(new Size2D(10, 10));
- contentLayout.BackgroundColor = Color.Magenta;
- titleLayout.AddChild(contentLayout, new TableView.CellPosition(1, 0));
-
- //////////////////////////////////////////////////////////////////////
- // make visual position animation
- _contentView1 = new VisualView();
- _contentView1.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- _contentView1.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- //_contentView.Size2D = new Size2D(250, 250);
- _contentView1.BackgroundImage = _resPath + "/images/background-blocks.jpg";
-
- ImageVisual _icon = new ImageVisual();
- _icon.URL = _resPath + "/images/application-icon-0.png";
- _icon.DepthIndex = 1;
- _icon.Size = new Size2D(50, 50);
- _icon.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon.Position = new Position2D(5, 5);
- _icon.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon.Origin = Visual.AlignType.TopBegin;
- _icon.AnchorPoint = Visual.AlignType.TopBegin;
- _icon.MixColor = new Color(0, 1, 0, 0.5f);
- _icon.Opacity = 0.5f;
- _contentView1.AddVisual("icon_visual1", _icon);
-
- contentLayout.AddChild(_contentView1, new TableView.CellPosition(0, 0));
-
- _shadowButton1 = new PushButton();
- _shadowButton1.LabelText = "Toggle Transition Position";
- _shadowButton1.Name = ("ToggleTransition");
- _shadowButton1.ParentOrigin = ParentOrigin.Center;
- _shadowButton1.PivotPoint = PivotPoint.Center;
- _shadowButton1.Clicked += (obj, ev) =>
- {
- _active1 = !_active1;
- StartTransition(_contentView1, _icon, "Position", _active1);
- return true;
- };
- _shadowButton1.WidthResizePolicy = ResizePolicyType.FillToParent;
- _shadowButton1.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.AddChild(_shadowButton1, new TableView.CellPosition(0, 1));
-
- //////////////////////////////////////////////////////////////////////
- // make visual opacity animation
- _contentView2 = new VisualView();
- _contentView2.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- _contentView2.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- //_contentView.Size2D = new Size2D(250, 250);
- _contentView2.BackgroundImage = _resPath + "/images/background-blocks.jpg";
-
- ImageVisual _icon2 = new ImageVisual();
- _icon2.URL = _resPath + "/images/application-icon-0.png";
- _icon2.DepthIndex = 1;
- _icon2.Size = new Size2D(50, 50);
- _icon2.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon2.Position = new Position2D(5, 5);
- _icon2.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon2.Origin = Visual.AlignType.TopBegin;
- _icon2.AnchorPoint = Visual.AlignType.TopBegin;
- _icon2.MixColor = new Color(0, 1, 0, 0.5f);
- _icon2.Opacity = 0.5f;
- _contentView2.AddVisual("icon_visual2", _icon2);
-
- contentLayout.AddChild(_contentView2, new TableView.CellPosition(1, 0));
-
- _shadowButton2 = new PushButton();
- _shadowButton2.LabelText = "Toggle Transition Opacity";
- _shadowButton2.Name = ("ToggleTransition");
- _shadowButton2.ParentOrigin = ParentOrigin.Center;
- _shadowButton2.PivotPoint = PivotPoint.Center;
- _shadowButton2.Clicked += (obj, ev) =>
- {
- _active2 = !_active2;
- StartTransition(_contentView2, _icon2, "Opacity", _active2);
- return true;
- };
- _shadowButton2.WidthResizePolicy = ResizePolicyType.FillToParent;
- _shadowButton2.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.AddChild(_shadowButton2, new TableView.CellPosition(1, 1));
-
- //////////////////////////////////////////////////////////////////////
- // make AnimatedImage visual test
- _contentView3 = new VisualView();
- _contentView3.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- _contentView3.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- //_contentView.Size2D = new Size2D(250, 250);
- _contentView3.BackgroundImage = _resPath + "/images/background-blocks.jpg";
-
- ImageVisual _icon3 = new ImageVisual();
- _icon3.URL = _resPath + "/images/application-icon-0.png";
- _icon3.DepthIndex = 1;
- _icon3.Size = new Size2D(50, 50);
- _icon3.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon3.Position = new Position2D(5, 5);
- _icon3.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon3.Origin = Visual.AlignType.TopBegin;
- _icon3.AnchorPoint = Visual.AlignType.TopBegin;
- _icon3.MixColor = new Color(0, 1, 0, 0.5f);
- _icon3.Opacity = 0.5f;
- _contentView3.AddVisual("icon_visual3", _icon3);
-
- contentLayout.AddChild(_contentView3, new TableView.CellPosition(2, 0));
-
- _shadowButton3 = new PushButton();
- _shadowButton3.LabelText = "Toggle Transition MixColor";
- _shadowButton3.Name = ("ToggleTransition");
- _shadowButton3.ParentOrigin = ParentOrigin.Center;
- _shadowButton3.PivotPoint = PivotPoint.Center;
- _shadowButton3.Clicked += (obj, ev) =>
- {
- _active3 = !_active3;
- StartTransition(_contentView3, _icon3, "MixColor", _active3);
- return true;
- };
- _shadowButton3.WidthResizePolicy = ResizePolicyType.FillToParent;
- _shadowButton3.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.AddChild(_shadowButton3, new TableView.CellPosition(2, 1));
- }
-
- private void StartTransition(VisualView view, VisualMap target, string property, bool activate)
- {
- if (_animation)
- {
- _animation.Stop();
- _animation.Finished += OnTransitionFinished;
- }
-
- if (activate)
- {
- if (property == "Position")
- {
- _animation = view.AnimateVisual(target, property, new Position2D(20, 20), 0, 1000, AlphaFunction.BuiltinFunctions.Linear, new Position2D(40, 40));
- }
- else if (property == "Opacity")
- {
- _animation = view.AnimateVisual(target, property, 0.0f, 0, 1000, AlphaFunction.BuiltinFunctions.Linear);
- }
- else if (property == "MixColor")
- {
- _animation = view.AnimateVisual(target, property, Color.Green, 0, 1000, AlphaFunction.BuiltinFunctions.Linear);
- }
- }
- else
- {
- if (property == "Position")
- {
- _animation = view.AnimateVisual(target, property, new Position2D(5, 5), 0, 1000);
- }
- else if (property == "Opacity")
- {
- _animation = view.AnimateVisual(target, property, 1.0f, 0, 1000);
- }
- else if (property == "MixColor")
- {
- _animation = view.AnimateVisual(target, property, Color.Red, 0, 1000);
- }
- }
-
- if (_animation)
- {
- _animation.Finished += OnTransitionFinished;
- _transitionInProgress = true;
- _animation.Play();
- }
- }
- private void OnTransitionFinished(object sender, EventArgs e)
- {
- _transitionInProgress = false;
- if (_animation)
- {
- _animation.Finished += OnTransitionFinished;
- _animation.Reset();
- }
- }
-
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
-
-
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace VisaulAnimationExample
-{
- class Example3 : NUIApplication
- {
- private VisualView _contentView1;
- private VisualView _contentView2;
- private VisualView _contentView3;
- private TextLabel _title;
- private PushButton _shadowButton1;
- private PushButton _shadowButton2;
- private PushButton _shadowButton3;
- private bool _active1 = false;
- private bool _active2 = false;
- private bool _active3 = false;
- //private const string _resPath = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private const string _resPath = "./res"; //for ubuntu
-
- private Animation _animation;
- private ImageVisual _icon;
- private ImageVisual _icon2;
- private ImageVisual _icon3;
- private ImageVisual _icon4;
- private bool _transitionInProgress = false;
-
- public Example3() : base()
- {
- }
-
- public Example3(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example3(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TableView titleLayout = new TableView(2, 1);
- titleLayout.Name = ("TitleLayout");
- titleLayout.PivotPoint = PivotPoint.TopLeft;
- titleLayout.Position2D = new Position2D(10, 10);
- titleLayout.Size2D = new Size2D((int)(window.Size.Width * 0.9f), (int)(window.Size.Height * 0.9f));
- titleLayout.SetCellPadding(new Size2D(10, 10));
- titleLayout.BackgroundColor = Color.Cyan;
- window.Add(titleLayout);
-
- _title = new TextLabel("Visual Transition Example");
- _title.Name = ("Title");
- _title.SetStyleName("Title");
- _title.WidthResizePolicy = ResizePolicyType.FillToParent;
- _title.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- _title.HorizontalAlignment = HorizontalAlignment.Center;
- titleLayout.AddChild(_title, new TableView.CellPosition(0, 0));
- titleLayout.SetFitHeight(0);
-
- TableView contentLayout = new TableView(2, 1);
- contentLayout.Name = ("ContentLayout");
- contentLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.PivotPoint = PivotPoint.TopLeft;
- contentLayout.SetCellPadding(new Size2D(10, 10));
- contentLayout.BackgroundColor = Color.Magenta;
- titleLayout.AddChild(contentLayout, new TableView.CellPosition(1, 0));
-
- // make visual position animation
- _contentView1 = new VisualView();
- _contentView1.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- _contentView1.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- //_contentView.Size2D = new Size2D(250, 250);
- _contentView1.BackgroundImage = _resPath + "/images/background-blocks.jpg";
-
- _icon = new ImageVisual();
- _icon.URL = _resPath + "/images/application-icon-0.png";
- _icon.DepthIndex = 1;
- _icon.Size = new Size2D(50, 50);
- _icon.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon.Position = new Position2D(5, 5);
- _icon.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon.Origin = Visual.AlignType.TopBegin;
- _icon.AnchorPoint = Visual.AlignType.TopBegin;
- _icon.MixColor = new Color(0, 1, 0, 0.5f);
- _icon.Opacity = 0.5f;
- _contentView1.AddVisual("icon_visual1", _icon);
-
- _icon2 = new ImageVisual();
- _icon2.URL = _resPath + "/images/application-icon-0.png";
- _icon2.DepthIndex = 1;
- _icon2.Size = new Size2D(50, 50);
- _icon2.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon2.Position = new Position2D(200, 5);
- _icon2.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon2.Origin = Visual.AlignType.TopBegin;
- _icon2.AnchorPoint = Visual.AlignType.TopBegin;
- _icon2.MixColor = new Color(0, 1, 0, 0.5f);
- _icon2.Opacity = 0.5f;
- _contentView1.AddVisual("icon_visual2", _icon2);
-
- _icon3 = new ImageVisual();
- _icon3.URL = _resPath + "/images/application-icon-0.png";
- _icon3.DepthIndex = 1;
- _icon3.Size = new Size2D(50, 50);
- _icon3.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon3.Position = new Position2D(5, 200);
- _icon3.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon3.Origin = Visual.AlignType.TopBegin;
- _icon3.AnchorPoint = Visual.AlignType.TopBegin;
- _icon3.MixColor = new Color(0, 1, 0, 0.5f);
- _icon3.Opacity = 0.5f;
- _contentView1.AddVisual("icon_visual3", _icon3);
-
- _icon4 = new ImageVisual();
- _icon4.URL = _resPath + "/images/application-icon-0.png";
- _icon4.DepthIndex = 1;
- _icon4.Size = new Size2D(50, 50);
- _icon4.SizePolicy = VisualTransformPolicyType.Absolute;
- _icon4.Position = new Position2D(200, 200);
- _icon4.PositionPolicy = VisualTransformPolicyType.Absolute;
- _icon4.Origin = Visual.AlignType.TopBegin;
- _icon4.AnchorPoint = Visual.AlignType.TopBegin;
- _icon4.MixColor = new Color(0, 1, 0, 0.5f);
- _icon4.Opacity = 0.5f;
- _contentView1.AddVisual("icon_visual4", _icon4);
-
- contentLayout.AddChild(_contentView1, new TableView.CellPosition(0, 0));
-
- _shadowButton1 = new PushButton();
- _shadowButton1.LabelText = "Toggle Transition Position";
- _shadowButton1.Name = ("ToggleTransition");
- _shadowButton1.ParentOrigin = ParentOrigin.Center;
- _shadowButton1.PivotPoint = PivotPoint.Center;
- _shadowButton1.Clicked += (obj, ev) =>
- {
- _active1 = !_active1;
- StartTransition(_contentView1, _active1);
- return true;
- };
- _shadowButton1.WidthResizePolicy = ResizePolicyType.FillToParent;
- _shadowButton1.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- contentLayout.AddChild(_shadowButton1, new TableView.CellPosition(1, 0));
- contentLayout.SetFitHeight(1);
- }
-
- private void StartTransition(VisualView view, bool activate)
- {
- if (_animation)
- {
- _animation.Stop();
- _animation.Finished += OnTransitionFinished;
- }
-
- if (activate)
- {
- view.AnimateVisualAdd(_icon, "Position", new Position2D(80, 80), 0, 2000, AlphaFunction.BuiltinFunctions.Linear, new Position2D(5, 5));
- view.AnimateVisualAdd(_icon2, "Opacity", 0.0f, 0, 2000, AlphaFunction.BuiltinFunctions.Linear);
- view.AnimateVisualAdd(_icon3, "MixColor", Color.Green, 0, 2000, AlphaFunction.BuiltinFunctions.Linear);
- view.AnimateVisualAdd(_icon4, "Size", new Size2D(150, 150), 0, 2000, AlphaFunction.BuiltinFunctions.Linear);
- _animation = view.AnimateVisualAddFinish();
- }
- else
- {
- view.AnimateVisualAdd(_icon, "Position", new Position2D(5, 5), 0, 2000, AlphaFunction.BuiltinFunctions.Linear, new Position2D(80, 80));
- view.AnimateVisualAdd(_icon2, "Opacity", 1.0f, 0, 2000);
- view.AnimateVisualAdd(_icon3, "MixColor", Color.Red, 0, 2000);
- view.AnimateVisualAdd(_icon4, "Size", new Size2D(50, 50), 0, 2000, AlphaFunction.BuiltinFunctions.Linear);
- _animation = view.AnimateVisualAddFinish();
- }
-
- if (_animation)
- {
- _animation.Finished += OnTransitionFinished;
- _animation.EndAction = Animation.EndActions.StopFinal;
- _transitionInProgress = true;
- _animation.Play();
- }
- }
-
- private void OnTransitionFinished(object sender, EventArgs e)
- {
- _transitionInProgress = false;
- if (_animation)
- {
- _animation.Finished += OnTransitionFinished;
- _animation.Reset();
- }
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example3 example = new Example3();
- example.Run(args);
- }
-
-
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace VisualViewTest
-{
- // An example of Visual View control.
- class Example : NUIApplication
- {
- private VisualView _visualView = null;
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private Window _window;
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private ImageVisual imageVisualMap1;
- private TextVisual textVisualMap1;
- private NPatchVisual npatchImageVisualMap1;
- private BorderVisual borderVisualMap1;
- private int cnt;
-
- public void Initialize()
- {
- Window window = Window.Instance;
-
- /* Create a visual view. */
- _visualView = new VisualView();
- _visualView.ParentOrigin = ParentOrigin.TopLeft;
- _visualView.PivotPoint = PivotPoint.TopLeft;
- _visualView.Size2D = new Size2D((int)window.Size.Width, (int)window.Size.Height);
-
- /* color visual */
- ColorVisual colorVisualMap1 = new ColorVisual();
- colorVisualMap1.Color = Color.Green;
- _visualView.Background = colorVisualMap1.OutputVisualMap;
-
- window.Add(_visualView);
-
- /* image visual 1. */
- imageVisualMap1 = new ImageVisual();
- imageVisualMap1.URL = resources + "/images/image-1.jpg";
- imageVisualMap1.Size = new Vector2(200.0f, 200.0f);
- imageVisualMap1.Position = new Vector2(10.0f, 10.0f);
- imageVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- Console.WriteLine("PositionPolicy:{0}",imageVisualMap1.PositionPolicy);
- imageVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- Console.WriteLine("SizePolicy:{0}",imageVisualMap1.SizePolicy);
- imageVisualMap1.Origin = Visual.AlignType.TopBegin;
- imageVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("imageVisual1", imageVisualMap1);
- imageVisualMap1.URL = resources + "/images/image-3.jpg";
-
- /* image visual 2. */
- ImageVisual imageVisualMap2 = new ImageVisual();
- imageVisualMap2.URL = resources + "/images/image-2.jpg";
- imageVisualMap2.Size = new Vector2(250.0f, 200.0f);
- imageVisualMap2.Position = new Vector2(220.0f, 10.0f);
- imageVisualMap2.PositionPolicy = VisualTransformPolicyType.Absolute;
- imageVisualMap2.SizePolicy = VisualTransformPolicyType.Absolute;
- imageVisualMap2.Origin = Visual.AlignType.TopBegin;
- imageVisualMap2.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("imageVisual2", imageVisualMap2);
-
- /* text visual. */
- textVisualMap1 = new TextVisual();
- textVisualMap1.Text = "Hello Goodbye";
- textVisualMap1.PointSize = 20.0f;
-
- textVisualMap1.Size = new Vector2(900.0f, 250.0f);
- textVisualMap1.Position = new Vector2(10.0f, 220.0f);
- textVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- textVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- textVisualMap1.Origin = Visual.AlignType.TopBegin;
- textVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("textVisual1", textVisualMap1);
-
- /* border visual */
- borderVisualMap1 = new BorderVisual();
- borderVisualMap1.Color = Color.Red;
- borderVisualMap1.BorderSize = 5.0f;
-
- borderVisualMap1.Size = new Vector2(100.0f, 100.0f);
- borderVisualMap1.Position = new Vector2(10.0f, 380.0f);
- borderVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- borderVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- borderVisualMap1.Origin = Visual.AlignType.TopBegin;
- borderVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("borderVisual1", borderVisualMap1);
-
- /* gradient visual */
- GradientVisual gradientVisualMap1 = new GradientVisual();
- PropertyArray stopPosition = new PropertyArray();
- stopPosition.Add(new PropertyValue(0.0f));
- stopPosition.Add(new PropertyValue(0.3f));
- stopPosition.Add(new PropertyValue(0.6f));
- stopPosition.Add(new PropertyValue(0.8f));
- stopPosition.Add(new PropertyValue(1.0f));
- gradientVisualMap1.StopOffset = stopPosition;
- PropertyArray stopColor = new PropertyArray();
- stopColor.Add(new PropertyValue(new Vector4(129.0f, 198.0f, 193.0f, 255.0f) / 255.0f));
- stopColor.Add(new PropertyValue(new Vector4(196.0f, 198.0f, 71.0f, 122.0f) / 255.0f));
- stopColor.Add(new PropertyValue(new Vector4(214.0f, 37.0f, 139.0f, 191.0f) / 255.0f));
- stopColor.Add(new PropertyValue(new Vector4(129.0f, 198.0f, 193.0f, 150.0f) / 255.0f));
- stopColor.Add(new PropertyValue(Color.Yellow));
- gradientVisualMap1.StopColor = stopColor;
- gradientVisualMap1.StartPosition = new Vector2(0.5f, 0.5f);
- gradientVisualMap1.EndPosition = new Vector2(-0.5f, -0.5f);
- gradientVisualMap1.Center = new Vector2(0.5f, 0.5f);
- gradientVisualMap1.Radius = 1.414f;
-
- gradientVisualMap1.Size = new Vector2(100.0f, 100.0f);
- gradientVisualMap1.Position = new Vector2(120.0f, 380.0f);
- gradientVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- gradientVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- gradientVisualMap1.Origin = Visual.AlignType.TopBegin;
- gradientVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("gradientVisual1", gradientVisualMap1);
-
- /* primitive visual: Cone */
- PrimitiveVisual primitiveVisualMap1 = new PrimitiveVisual();
- primitiveVisualMap1.Shape = PrimitiveVisualShapeType.Cone;
- primitiveVisualMap1.BevelPercentage = 0.3f;
- primitiveVisualMap1.BevelSmoothness = 0.0f;
- primitiveVisualMap1.ScaleDimensions = new Vector3(1.0f, 1.0f, 0.3f);
- primitiveVisualMap1.MixColor = new Vector4((245.0f / 255.0f), (188.0f / 255.0f), (73.0f / 255.0f), 1.0f);
-
- primitiveVisualMap1.Size = new Vector2(100.0f, 100.0f);
- primitiveVisualMap1.Position = new Vector2(230.0f, 380.0f);
- primitiveVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap1.Origin = Visual.AlignType.TopBegin;
- primitiveVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("primitiveVisual1", primitiveVisualMap1);
-
- /* primitive visual: Sphere */
- PrimitiveVisual primitiveVisualMap2 = new PrimitiveVisual();
- primitiveVisualMap2.Shape = PrimitiveVisualShapeType.Sphere;
- primitiveVisualMap2.BevelPercentage = 0.3f;
- primitiveVisualMap2.BevelSmoothness = 0.0f;
- primitiveVisualMap2.ScaleDimensions = new Vector3(1.0f, 1.0f, 0.3f);
- primitiveVisualMap2.MixColor = new Vector4((245.0f / 255.0f), (188.0f / 255.0f), (73.0f / 255.0f), 1.0f);
-
- primitiveVisualMap2.Size = new Vector2(100.0f, 100.0f);
- primitiveVisualMap2.Position = new Vector2(340.0f, 380.0f);
- primitiveVisualMap2.PositionPolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap2.SizePolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap2.Origin = Visual.AlignType.TopBegin;
- primitiveVisualMap2.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("primitiveVisual2", primitiveVisualMap2);
-
- /* primitive visual: Cylinder */
- PrimitiveVisual primitiveVisualMap3 = new PrimitiveVisual();
- primitiveVisualMap3.Shape = PrimitiveVisualShapeType.Cylinder;
- primitiveVisualMap3.BevelPercentage = 0.3f;
- primitiveVisualMap3.BevelSmoothness = 0.0f;
- primitiveVisualMap3.ScaleDimensions = new Vector3(1.0f, 1.0f, 0.3f);
- primitiveVisualMap3.MixColor = new Vector4((245.0f / 255.0f), (188.0f / 255.0f), (73.0f / 255.0f), 1.0f);
-
- primitiveVisualMap3.Size = new Vector2(100.0f, 100.0f);
- primitiveVisualMap3.Position = new Vector2(10.0f, 490.0f);
- primitiveVisualMap3.PositionPolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap3.SizePolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap3.Origin = Visual.AlignType.TopBegin;
- primitiveVisualMap3.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("primitiveVisual3", primitiveVisualMap3);
-
- /* primitive visual: ConicalFrustrum */
- PrimitiveVisual primitiveVisualMap4 = new PrimitiveVisual();
- primitiveVisualMap4.Shape = PrimitiveVisualShapeType.ConicalFrustrum;
- primitiveVisualMap4.BevelPercentage = 0.3f;
- primitiveVisualMap4.BevelSmoothness = 0.0f;
- primitiveVisualMap4.ScaleDimensions = new Vector3(1.0f, 1.0f, 0.3f);
- primitiveVisualMap4.MixColor = new Vector4((245.0f / 255.0f), (188.0f / 255.0f), (73.0f / 255.0f), 1.0f);
-
- primitiveVisualMap4.Size = new Vector2(100.0f, 100.0f);
- primitiveVisualMap4.Position = new Vector2(120.0f, 490.0f);
- primitiveVisualMap4.PositionPolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap4.SizePolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap4.Origin = Visual.AlignType.TopBegin;
- primitiveVisualMap4.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("primitiveVisual4", primitiveVisualMap4);
-
- /* primitive visual: Cube */
- PrimitiveVisual primitiveVisualMap5 = new PrimitiveVisual();
- primitiveVisualMap5.Shape = PrimitiveVisualShapeType.Cube;
- primitiveVisualMap5.BevelPercentage = 0.3f;
- primitiveVisualMap5.BevelSmoothness = 0.0f;
- primitiveVisualMap5.ScaleDimensions = new Vector3(1.0f, 1.0f, 0.3f);
- primitiveVisualMap5.MixColor = new Vector4((245.0f / 255.0f), (188.0f / 255.0f), (73.0f / 255.0f), 1.0f);
-
- primitiveVisualMap5.Size = new Vector2(100.0f, 100.0f);
- primitiveVisualMap5.Position = new Vector2(230.0f, 490.0f);
- primitiveVisualMap5.PositionPolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap5.SizePolicy = VisualTransformPolicyType.Absolute;
- primitiveVisualMap5.Origin = Visual.AlignType.TopBegin;
- primitiveVisualMap5.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("primitiveVisual5", primitiveVisualMap5);
-
- /* mesh visual nothing show. */
- MeshVisual meshVisualMap1 = new MeshVisual();
- meshVisualMap1.ObjectURL = resources + "/models/Dino.obj";
- meshVisualMap1.MaterialtURL = resources + "/models/Dino.mtl";
- meshVisualMap1.TexturesPath = resources + "/images/";
- meshVisualMap1.ShadingMode = MeshVisualShadingModeValue.TexturedWithSpecularLighting;
-
- meshVisualMap1.Size = new Size2D(400, 400);
- meshVisualMap1.Position = new Position2D(-50, 600);
- meshVisualMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- meshVisualMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- meshVisualMap1.Origin = Visual.AlignType.TopBegin;
- meshVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- _visualView.AddVisual("meshVisual1", meshVisualMap1);
-
- /* n-patch image visual 1. */
- npatchImageVisualMap1 = new NPatchVisual();
- npatchImageVisualMap1.URL = resources + "/images/gallery-4.jpg";
- npatchImageVisualMap1.Size = new Size2D(400, 400);
- npatchImageVisualMap1.Position = new Position2D(300, 600);
- npatchImageVisualMap1.PositionPolicyX = VisualTransformPolicyType.Absolute;
- npatchImageVisualMap1.PositionPolicyY = VisualTransformPolicyType.Absolute;
- npatchImageVisualMap1.SizePolicyWidth = VisualTransformPolicyType.Absolute;
- npatchImageVisualMap1.SizePolicyHeight = VisualTransformPolicyType.Absolute;
- npatchImageVisualMap1.Origin = Visual.AlignType.TopBegin;
- npatchImageVisualMap1.AnchorPoint = Visual.AlignType.TopBegin;
- npatchImageVisualMap1.Border = new Rectangle(100, 100, 100, 100);
- _visualView.AddVisual("npatchImageVisual1", npatchImageVisualMap1);
-
- _window = Window.Instance;
- _window.FocusChanged += (sender, ee) =>
- {
- cnt++;
- Tizen.Log.Debug("NUI", "[WindowFocusTest] WindowFocusChanged event comes! focus gained=" + ee.FocusGained);
- imageVisualMap1.Size += new Size2D(50, 50);
- imageVisualMap1.Position += new Vector2(20.0f, 20.0f);
-
- textVisualMap1.Text = "Hello Goodbye" + cnt;
- textVisualMap1.PointSize = 10.0f + (float)(cnt);
-
- npatchImageVisualMap1.URL = resources + "/images/gallery-" + (cnt % 5) + ".jpg";
-
- borderVisualMap1.BorderSize = 1.0f + (float)cnt;
- };
-
- Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
- _window.SetAcceptFocus(false);
- Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=false!!!");
- Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
- _window.SetAcceptFocus(true);
- Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=true!!!");
- Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
-
-
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-using System;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-
-namespace VisualViewTest2
-{
- public class VisualSample : NUIApplication
- {
- const int num = 2;
- VisualView[] view;
-
- TextLabel guide;
- ImageVisual imageMap;
- ImageVisual imageMap2;
-
- ImageVisual highlightImageMap;
- ImageVisual dimImageMap;
-
- TextVisual textMap1;
- TextVisual textMap2;
-
- Window _window;
-
- int imgIndex;
-
- readonly string resourcePath = "/home/owner/apps_rw/NUISamples.TizenTV/res/images/";
-
- protected override void OnCreate()
- {
- base.OnCreate();
-
- view = new VisualView[2];
-
- for (int i = 0; i < num; i++)
- {
- view[i] = new VisualView();
- view[i].Size2D = new Size2D(600, 600);
- view[i].BackgroundColor = Color.Blue;
- view[i].Position = new Position(400 + i * 800, 600, 0);
- view[i].Focusable = true;
- view[i].Name = "MyView" + i;
- Window.Instance.Add(view[i]);
- view[i].FocusGained += VisualSample_FocusGained;
- view[i].FocusLost += VisualSample_FocusLost;
- view[i].KeyEvent += VisualSample_KeyEvent;
- }
-
- view[0].RightFocusableView = view[1];
- view[1].LeftFocusableView = view[0];
-
- imageMap = new ImageVisual();
- imageMap.URL = resourcePath + "gallery-" + imgIndex++ + ".jpg";
- imageMap.AnchorPoint = Visual.AlignType.TopBegin;
- imageMap.Origin = Visual.AlignType.TopBegin;
- imageMap.Position = new Vector2(0, 0);
- imageMap.PositionPolicy = VisualTransformPolicyType.Absolute;
- imageMap.Size = new Size2D(500, 500);
- imageMap.SizePolicy = VisualTransformPolicyType.Absolute;
- imageMap.DepthIndex = 0;
- view[0].AddVisual("bgVisual", imageMap);
-
-
- highlightImageMap = new ImageVisual();
- highlightImageMap.URL = resourcePath + "star-highlight.png";
- highlightImageMap.AnchorPoint = Visual.AlignType.TopBegin;
- highlightImageMap.Origin = Visual.AlignType.TopBegin;
- highlightImageMap.Size = new Vector2(40, 40);
- highlightImageMap.SizePolicy = VisualTransformPolicyType.Absolute;
- highlightImageMap.Position = new Vector2(10, 10);
- highlightImageMap.PositionPolicy = VisualTransformPolicyType.Absolute;
- highlightImageMap.DepthIndex = 1;
- view[0].AddVisual("iconVisual", highlightImageMap);
-
-
- textMap1 = new TextVisual();
- textMap1.Text = "Hello";
- textMap1.AnchorPoint = Visual.AlignType.TopBegin;
- textMap1.Origin = Visual.AlignType.TopBegin;
- textMap1.PointSize = 20;
- textMap1.Position = new Vector2(60, 210);
- textMap1.PositionPolicy = VisualTransformPolicyType.Absolute;
- textMap1.Size = new Vector2(600, 200);
- textMap1.SizePolicy = VisualTransformPolicyType.Absolute;
- textMap1.TextColor = Color.Red;
- textMap1.DepthIndex = 5;
- view[0].AddVisual("textVisual", textMap1);
-
-
-
- imageMap2 = new ImageVisual();
- imageMap2.URL = resourcePath + "gallery-" + imgIndex + ".jpg";
- imageMap2.AnchorPoint = Visual.AlignType.TopBegin;
- imageMap2.Origin = Visual.AlignType.TopBegin;
- imageMap2.Position = new Vector2(0, 0);
- imageMap2.PositionPolicy = VisualTransformPolicyType.Absolute;
- imageMap2.Size = new Vector2(500, 500);
- imageMap2.SizePolicy = VisualTransformPolicyType.Absolute;
- imageMap2.DepthIndex = 0;
- view[1].AddVisual("bgVisual", imageMap2);
-
- dimImageMap = new ImageVisual();
- dimImageMap.URL = resourcePath + "star-dim.png";
- dimImageMap.Size = new Vector2(40, 40);
- dimImageMap.SizePolicy = VisualTransformPolicyType.Absolute;
- dimImageMap.AnchorPoint = Visual.AlignType.TopBegin;
- dimImageMap.Origin = Visual.AlignType.TopBegin;
- dimImageMap.Position = new Vector2(10, 10);
- dimImageMap.PositionPolicy = VisualTransformPolicyType.Absolute;
- dimImageMap.DepthIndex = 1;
- view[1].AddVisual("iconVisual", dimImageMap);
-
- textMap2 = new TextVisual();
- textMap2.Text = "I'm";
- textMap2.PointSize = 20;
- textMap2.AnchorPoint = Visual.AlignType.TopBegin;
- textMap2.Origin = Visual.AlignType.TopBegin;
- textMap2.Position = new Vector2(60, 210);
- textMap2.PositionPolicy = VisualTransformPolicyType.Absolute;
- textMap2.Size = new Vector2(600, 200);
- textMap2.SizePolicy = VisualTransformPolicyType.Absolute;
- textMap2.TextColor = Color.Black;
- textMap2.DepthIndex = 5;
- view[1].AddVisual("textVisual", textMap2);
-
-
- guide = new TextLabel();
- guide.PivotPoint = PivotPoint.TopLeft;
- guide.Size2D = new Size2D(800, 200);
- guide.Padding = new Vector4(50, 50, 50, 50);
- guide.MultiLine = true;
- guide.BackgroundColor = Color.Magenta;
- guide.PointSize = 10;
- guide.TextColor = Color.Black;
- guide.Text = "Left/Right - Move focus\n" +
- "Up/Down - Change Text\n" +
- "Enter - Change BG image\n";
- Window.Instance.Add(guide);
-
- Window.Instance.KeyEvent += Instance_Key;
- FocusManager.Instance.SetCurrentFocusView(view[0]);
- Window.Instance.TouchEvent += Instance_Touch;
- _window = Window.Instance;
- _window.FocusChanged += _window_WindowFocusChanged;
-
- }
-
- private void _window_WindowFocusChanged(object sender, Window.FocusChangedEventArgs e)
- {
- Tizen.Log.Fatal("NUI", "window focus changed!() focus gained=" + e.FocusGained);
- }
-
- private void Instance_Touch(object sender, Window.TouchEventArgs e)
- {
- FocusManager.Instance.SetCurrentFocusView(view[0]);
- }
-
- private bool VisualSample_KeyEvent(object source, View.KeyEventArgs e)
- {
- Tizen.Log.Fatal("NUI", "View_KeyEvent" + e.Key.State.ToString() + ", Pressed-" + e.Key.KeyPressedName);
-
- if (e.Key.State == Key.StateType.Down)
- {
- if (source.Equals(view[0]))
- {
- if (e.Key.KeyPressedName == "Up")
- {
- textMap1.PointSize = 14;
- textMap1.TextColor = Color.Red;
- textMap1.Text = "Hello NY!";
- //this.VersionCheckTest();
- /*
- DALI_KEY_VOLUME_UP = 200, ///< Volume up key @SINCE_1_0.0
- DALI_KEY_VOLUME_DOWN = 201, ///< Volume down key @SINCE_1_0.0
- */
- try
- {
- Tizen.Log.Fatal("NUI", "GrabKeyTopmost (200==vol up) ret=" + _window.GrabKeyTopmost(200));
- }
- catch (Exception except)
- {
- Tizen.Log.Fatal("NUI", "Exception!!! GrabKeyTopmost (200==vol up) msg=" + except.Message);
- }
-
- }
- else if (e.Key.KeyPressedName == "Down")
- {
- textMap1.PointSize = 17;
- textMap1.TextColor = Color.Blue;
- textMap1.Text = "Goodbye NY.";
-
- Tizen.Log.Fatal("NUI", "UngrabKeyTopmost (200==vol up) ret=" + _window.UngrabKeyTopmost(200));
-
- }
- else if (e.Key.KeyPressedName == "Return")
- {
- imgIndex = (imgIndex + 1) % 6;
- imageMap.URL = resourcePath + "gallery-" + imgIndex + ".jpg";
- //Tizen.Log.Fatal("NUI", "get native ecore wayland hander=" + _window.GetNativeWindowHandler());
- }
-
- }
- else
- {
- if (e.Key.KeyPressedName == "Up")
- {
- textMap2.PointSize = 14;
- textMap2.TextColor = Color.Red;
- textMap2.Text = "I'm happy!";
- Tizen.Log.Fatal("NUI", "grab key (201==vol down) ret=" + _window.GrabKey(201, Window.KeyGrabMode.Topmost));
- }
-
- if (e.Key.KeyPressedName == "Down")
- {
- textMap2.PointSize = 17;
- textMap2.TextColor = Color.Blue;
- textMap2.Text = "I'm unhappy";
- Tizen.Log.Fatal("NUI", "ungrab key (201==vol down) ret=" + _window.UngrabKey(201));
- }
- else if (e.Key.KeyPressedName == "Return")
- {
- imgIndex = (imgIndex + 1) % 6;
- imageMap2.URL = resourcePath + "gallery-" + imgIndex + ".jpg";
- //Tizen.Log.Fatal("NUI", "get native ecore wayland hander=" + _window.GetNativeWindowHandler());
- }
- }
- }
- return false;
- }
-
- private void Instance_Key(object sender, Window.KeyEventArgs e)
- {
- View currentFocusView = FocusManager.Instance.GetCurrentFocusView();
-
- Tizen.Log.Fatal("NUI", "Window_KeyEvent" + e.Key.State.ToString() + ", Pressed-" + e.Key.KeyPressedName);
- //Tizen.Log.Fatal("NUI", " CurrentFocusView : " + currentFocusView.HasBody() + currentFocusView?.Name);
- }
-
- private void VisualSample_FocusLost(object sender, EventArgs e)
- {
- VisualView view = sender as VisualView;
- view.BackgroundColor = Color.Green;
- view.Scale = new Vector3(1.0f, 1.0f, 1.0f);
-
- view.AddVisual("iconVisual", dimImageMap);
-
- if (view.Name == "MyView1")
- {
- imageMap2.MixColor = new Color(1, 0, 0, 0.5f);
- imageMap2.Opacity = 0.5f;
- }
- else if (view.Name == "MyView0")
- {
- imageMap.MixColor = new Color(1, 0, 0, 0.5f);
- imageMap.Opacity = 0.5f;
- }
-
- Tizen.Log.Fatal("NUI", "FocusLost-" + view.Name);
- }
-
- private void VisualSample_FocusGained(object sender, EventArgs e)
- {
- VisualView view = sender as VisualView;
- view.BackgroundColor = Color.Yellow;
- view.Scale = new Vector3(1.2f, 1.2f, 1.0f);
-
- view.AddVisual("iconVisual", highlightImageMap);
-
- if (view.Name == "MyView1")
- {
- imageMap2.MixColor = new Color(1, 1, 1, 1);
- imageMap2.Opacity = 1.0f;
- }
- else if (view.Name == "MyView0")
- {
- imageMap.MixColor = new Color(1, 1, 1, 1);
- imageMap.Opacity = 1.0f;
- }
-
- Tizen.Log.Fatal("NUI", "FocusGained-" + view.Name);
- }
-
- static void _Main(string[] args)
- {
- VisualSample sample = new VisualSample();
- sample.Run(args);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2017 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.Runtime.InteropServices;
-using Tizen.NUI;
-using Tizen.NUI.Constants;
-using Tizen.NUI.BaseComponents;
-
-namespace VisualViewTest3
-{
- // An example of Visual View control.
- class Example : NUIApplication
- {
- private VisualView _visualView = null;
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
- private Window _window;
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private ImageVisual imageVisualMap1;
- private ImageVisual imageVisualMap2;
- private int cnt;
-
- public void Initialize()
- {
- Window window = Window.Instance;
-
- /* Create a visual view. */
- _visualView = new VisualView();
- _visualView.ParentOrigin = ParentOrigin.TopLeft;
- _visualView.PivotPoint = PivotPoint.TopLeft;
- _visualView.Size2D = new Size2D(window.Size.Width, window.Size.Height);
-
- /* color visual */
- ColorVisual colorVisualMap1 = new ColorVisual();
- colorVisualMap1.Color = Color.Green;
- _visualView.Background = colorVisualMap1.OutputVisualMap;
-
- window.Add(_visualView);
-
- /* image visual 1. No transform setting case. */
- imageVisualMap1 = new ImageVisual();
- imageVisualMap1.URL = resources + "/images/image-1.jpg";
- imageVisualMap1.DepthIndex = 1;
- //_visualView.AddVisual("imageVisual1", imageVisualMap1);
-
- /* image visual 2. Using RelativePosition and SizePolicyWidth setting case. */
- imageVisualMap2 = new ImageVisual();
- imageVisualMap2.URL = resources + "/images/image-2.jpg";
- /* Using Size, you can set SizePolicyWidth and SizePolicyHeight separately, default by relative. */
- imageVisualMap2.Size = new Vector2(400.0f, 0.3f);
- /* Using RelativePosition, then PositionPolicyX and PositionPolicyY will be relative. */
- imageVisualMap2.RelativePosition = new Vector2(0.1f, 0.1f);
- imageVisualMap2.SizePolicyWidth = VisualTransformPolicyType.Absolute;
- imageVisualMap2.Origin = Visual.AlignType.TopBegin;
- imageVisualMap2.AnchorPoint = Visual.AlignType.TopBegin;
- /* Ensure imageVisual show */
- imageVisualMap2.DepthIndex = 9;
- _visualView.AddVisual("imageVisual2", imageVisualMap2);
- /* If imageVisual2 added first, the it will be covered by imageVisual1.
- so, we need to set their depth index to ensure they all can be showed.
- */
- _visualView.AddVisual("imageVisual1", imageVisualMap1);
-
- _window = Window.Instance;
- _window.FocusChanged += (sender, ee) =>
- {
- cnt++;
- Tizen.Log.Debug("NUI", "[WindowFocusTest] WindowFocusChanged event comes! focus gained=" + ee.FocusGained);
- };
-
- Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
- _window.SetAcceptFocus(false);
- Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=false!!!");
- Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
- _window.SetAcceptFocus(true);
- Tizen.Log.Debug("NUI", "[WindowFocusTest] set focus acceptable=true!!!");
- Tizen.Log.Debug("NUI", "[WindowFocusTest] is focus acceptable=" + _window.IsFocusAcceptable());
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.Constants;
-using Tizen.NUI.BaseComponents;
-
-namespace VisualsExampleTest
-{
- class Example : NUIApplication
- {
- private TextLabel _title;
- private const string resources = "/home/owner/apps_rw/NUISamples.TizenTV/res";
-
- public Example() : base()
- {
- }
-
- public Example(string stylesheet) : base(stylesheet)
- {
- }
-
- public Example(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TableView contentLayout = new TableView(4, 1);
- contentLayout.Name = ("ContentLayout");
- contentLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
-
- contentLayout.SetCellPadding(new Size2D(0, 5));
- contentLayout.BackgroundColor = Color.Red;//new Color(0.949f, 0.949f, 0.949f, 1.0f);
-
- window.Add(contentLayout);
-
- _title = new TextLabel("Visuals Example");
- _title.Name = "Title";
- _title.StyleName = "Title";
- _title.WidthResizePolicy = ResizePolicyType.FillToParent;
- _title.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- _title.HorizontalAlignment = HorizontalAlignment.Center;
- _title.BackgroundColor = Color.Yellow;
- contentLayout.Add(_title);
- contentLayout.SetFitHeight(0);
-
- // Color Visual example
- ImageView colorView = new ImageView();
- //colorView.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- //colorView.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- // PropertyMap colorVisual = new PropertyMap();
- // colorVisual.Add( Visual.Property.Type, new PropertyValue( (int)Visual.Type.Color ))
- // .Add( ColorVisualProperty.MixColor, new PropertyValue( Color.Green ));
- //colorView.Background = colorVisual;
- colorView.Size2D = new Size2D(500, 200);
- colorView.ResourceUrl = resources+"/images/00_popup_bg.9.png";
- colorView.Border = new Rectangle(100, 100, 100, 100);
- // colorView.
- // PropertyMap _map = new PropertyMap();
- // _map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch));
- // _map.Add(NpatchImageVisualProperty.URL, new PropertyValue(resources+"/images/00_popup_bg.9.png"));
- // _map.Add(NpatchImageVisualProperty.Border, new PropertyValue(new Rectangle(100, 100, 100, 100)));
- //_map.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue(true));
- //colorView.Background = _map;
- contentLayout.Add(colorView);
-
- // Image Visual example
- View imageView = new View();
- imageView.WidthResizePolicy = ResizePolicyType.UseNaturalSize;
- imageView.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- PropertyMap imageVisual = new PropertyMap();
- imageVisual.Add( Visual.Property.Type, new PropertyValue( (int)Visual.Type.Image ));
- imageVisual.Add(ImageVisualProperty.URL, new PropertyValue( resources + "/images/gallery-0.jpg" ));
- imageView.Background = imageVisual;
- contentLayout.SetCellAlignment(new TableView.CellPosition(2, 0), HorizontalAlignmentType.Center, VerticalAlignmentType.Center);
- contentLayout.Add(imageView);
- for(int i =1; i<=5; i++)
- {
- PropertyMap imageVisual1 = new PropertyMap();
- imageVisual1.Add( Visual.Property.Type, new PropertyValue( (int)Visual.Type.Image ));
- imageVisual1.Add(ImageVisualProperty.URL, new PropertyValue( resources + "/images/gallery-"+i+".jpg" ));
- imageView.Background = imageVisual1;
- }
-
- // Primitive Visual example
- View primitiveView = new View();
- primitiveView.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- primitiveView.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- PropertyMap primitiveVisual = new PropertyMap();
- primitiveVisual.Add( Visual.Property.Type, new PropertyValue( (int)Visual.Type.Primitive ))
- .Add( PrimitiveVisualProperty.Shape, new PropertyValue((int)PrimitiveVisualShapeType.BevelledCube))
- .Add( PrimitiveVisualProperty.BevelPercentage, new PropertyValue(0.3f))
- .Add( PrimitiveVisualProperty.BevelSmoothness, new PropertyValue(0.0f))
- .Add( PrimitiveVisualProperty.ScaleDimensions, new PropertyValue(new Vector3(1.0f,1.0f,0.3f)))
- .Add( PrimitiveVisualProperty.MixColor, new PropertyValue(new Vector4(0.7f, 0.5f, 0.05f, 1.0f)));
- primitiveView.Background = primitiveVisual;
- Radian rad = new Radian(new Degree(45.0f));
- primitiveView.Orientation = new Rotation(rad, Vector3.YAxis);
- contentLayout.Add(primitiveView);
-
- // Text Visual example
- View textView = new View();
- textView.WidthResizePolicy = ResizePolicyType.SizeRelativeToParent;
- textView.HeightResizePolicy = ResizePolicyType.SizeRelativeToParent;
- PropertyMap textVisual = new PropertyMap();
- textVisual.Add( Visual.Property.Type, new PropertyValue( (int)Visual.Type.Text ))
- .Add( TextVisualProperty.Text, new PropertyValue("I am text visual"))
- .Add( TextVisualProperty.TextColor, new PropertyValue(Color.Blue))
- .Add( TextVisualProperty.PointSize, new PropertyValue(20));
- textView.Background = textVisual;
- contentLayout.Add(textView);
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example( resources + "/json/style-example-theme-one.json");
- example.Run(args);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.Constants;
-
-namespace VisualsUsingCustomView
-{
- // The collection of contacts
- static class ContactsList
- {
- private const string resources = "/home/SERILOCAL/david.steele/Git/Tizen/nui/NUISamples/NUISamples/NUISamples.TizenTV/res";
-
- public static readonly ContactItem[] s_contactData = new ContactItem[]
- {
- new ContactItem ("Emmett Yates", resources + "/images/gallery-small-43.jpg",
- resources + "/images/mask.png",
- new Color((73.0f/255.0f),(182.0f/255.0f), (245.0f/255.0f), 1.0f),
- (int)PrimitiveVisualShapeType.Cone),
- new ContactItem ("Leslie Wong", resources+ "/images/gallery-2.jpg",
- resources + "/images/mask.png",
- new Color((51.0f/255.0f), (51.0f/255.0f), (102.0f/255.0f), 1.0f),
- (int)PrimitiveVisualShapeType.Sphere),
- new ContactItem ("Walter Jensen", resources+ "/images/gallery-0.jpg",
- resources + "/images/mask.png",
- new Color((151.0f/255.0f), (214.0f/255.0f), (240.0f/255.0f), 1.0f),
- (int)PrimitiveVisualShapeType.Cylinder),
- new ContactItem ("Dan Haynes", resources+"/images/gallery-1.jpg",
- resources + "/images/mask.png",
- new Color((102.0f/255.0f), (251.0f/255.0f), (102.0f/255.0f), 1.0f),
- (int)PrimitiveVisualShapeType.ConicalFrustrum),
- new ContactItem ("Mable Hodges", resources+"/images/gallery-3.jpg",
- resources + "/images/mask.png",
- new Color((255.0f/255.0f), (102.0f/255.0f), (102.0f/255.0f), 1.0f),
- (int)PrimitiveVisualShapeType.Cube)
- };
- }
-
- // The information for an individual contact
- class ContactItem
- {
- private string _name;
- private string _imageURL;
- private Color _color;
- private int _shape;
- private string _maskURL;
-
- public ContactItem(string name, string imageURL, string maskURL, Color color, int shape)
- {
- _name = name;
- _imageURL = imageURL;
- _maskURL = maskURL;
- _color = color;
- _shape = shape;
- }
-
- public string ImageURL
- {
- get
- {
- return _imageURL;
- }
- set
- {
- _imageURL = value;
- }
- }
- public string MaskURL
- {
- get
- {
- return _maskURL;
- }
- set
- {
- _maskURL = value;
- }
- }
-
- public string Name
- {
- get
- {
- return _name;
- }
- set
- {
- _name = value;
- }
- }
-
- public Color Color
- {
- get
- {
- return _color;
- }
- set
- {
- _color = value;
- }
- }
-
- public int Shape
- {
- get
- {
- return _shape;
- }
- set
- {
- _shape = value;
- }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.Constants;
-using Tizen.NUI.BaseComponents;
-
-// A ContactView is a Custom View which consists of four visuals (Image, Primitive, Text and Color).
-// All of these visuals can be configured via properties - ImageURL (Image), Shape (Primitive), Name (Text) and Color.
-// Tap gesture is also enabled on the ContactView which changes the color visual to some random color when ContactView is tapped.
-
-namespace VisualsUsingCustomView
-{
- public class ContactView : CustomView
- {
- private VisualBase _imageVisual;
- private VisualBase _primitiveVisual;
- private VisualBase _textVisual;
- private int _shape;
- private string _imageURL;
- private string _maskURL;
- private string _name;
- private Color _color;
-
- static CustomView CreateInstance()
- {
- return new ContactView();
- }
-
- static ContactView()
- {
- CustomViewRegistry.Instance.Register( CreateInstance, typeof(ContactView));
- }
-
- public ContactView() : base( typeof(ContactView).FullName, CustomViewBehaviour.RequiresKeyboardNavigationSupport)
- {
- }
-
- public string MaskURL
- {
- get { return _maskURL; }
- set { _maskURL=value; }
- }
-
- [ScriptableProperty()]
- public string ImageURL
- {
- get
- {
- return _imageURL;
- }
- set
- {
- _imageURL = value;
-
- ImageVisual imageVisual = new ImageVisual();
- imageVisual.URL = value;
- imageVisual.AlphaMaskURL = _maskURL;
- //imageVisual.MaskContentScale = 1.6f;
- //imageVisual.CropToMask = true;
- ImageVisual = imageVisual.OutputVisualMap;
- }
- }
-
- [ScriptableProperty()]
- public PropertyMap ImageVisual
- {
- //get
- //{
- // return _imageVisual.Creation;
- //}
- set
- {
- _imageVisual = VisualFactory.Instance.CreateVisual( value );
- RegisterVisual( GetPropertyIndex("ImageVisual"), _imageVisual );
-
- // Set the depth index for Image visual
- _imageVisual.DepthIndex = 30;
- }
- }
-
- [ScriptableProperty()]
- public string NameField
- {
- get
- {
- return _name;
- }
- set
- {
- _name = value;
-
- // Create and Register Text Visual
- TextVisual textVisual = new TextVisual();
- textVisual.Text = _name;
- textVisual.TextColor = Color.Black;
- textVisual.PointSize = 12;
- textVisual.HorizontalAlignment = HorizontalAlignment.Center;
- textVisual.VerticalAlignment = VerticalAlignment.Center;
- NameVisual = textVisual.OutputVisualMap;
- }
- }
-
- [ScriptableProperty()]
- public PropertyMap NameVisual
- {
- //get
- //{
- // return _textVisual.Creation;
- //}
- set
- {
- _textVisual = VisualFactory.Instance.CreateVisual( value );
- RegisterVisual( GetPropertyIndex("NameVisual"), _textVisual );
-
- // Set the depth index for Text visual
- _textVisual.DepthIndex = 30;
- }
- }
-
- [ScriptableProperty()]
- public Color Color
- {
- get
- {
- return _color;
- }
- set
- {
- _color = value;
- BackgroundColor = value;
- }
- }
-
- [ScriptableProperty()]
- public int Shape
- {
- get
- {
- return _shape;
- }
- set
- {
- _shape = value;
-
- // Create and Register Primitive Visual
- var primitiveVisual = new PrimitiveVisual();
- primitiveVisual.Shape = (PrimitiveVisualShapeType)_shape;
- primitiveVisual.BevelPercentage = 0.3f;
- primitiveVisual.BevelSmoothness = 0.0f;
- primitiveVisual.ScaleDimensions = new Vector3( 1.0f, 1.0f, 0.3f );
- primitiveVisual.MixColor = new Vector4( (245.0f/255.0f), (188.0f/255.0f), (73.0f/255.0f), 1.0f);
-
- ShapeVisual = primitiveVisual.OutputVisualMap;
- }
- }
-
- [ScriptableProperty()]
- public PropertyMap ShapeVisual
- {
- //get
- //{
- // return _primitiveVisual.Creation;
- //}
- set
- {
- _primitiveVisual = VisualFactory.Instance.CreateVisual( value );
- RegisterVisual( GetPropertyIndex("ShapeVisual"), _primitiveVisual );
-
- // Set the depth index for Primitive visual
- _primitiveVisual.DepthIndex = 30;
- }
- }
-
- public override void OnInitialize()
- {
- // Enable Tap gesture on ContactView
- EnableGestureDetection(Gesture.GestureType.Tap);
- }
-
- public override void OnTap(TapGesture tap)
- {
- // Change the Color visual of ContactView with some random color
- Random random = new Random();
- float nextRed = (random.Next(0, 256) / 255.0f);
- float nextGreen = (random.Next(0, 256) / 255.0f);
- float nextBlue = (random.Next(0, 256) / 255.0f);
- Animation anim = AnimateBackgroundColor( new Color( nextRed, nextGreen, nextBlue, 1.0f), 0, 2000 );
- if( anim )
- anim.Play();
- }
-
- public override void OnRelayout(Vector2 size, RelayoutContainer container)
- {
- // Configure the transform and size of Image visual.
- PropertyMap imageVisualTransform = new PropertyMap();
- imageVisualTransform.Add((int)VisualTransformPropertyType.Offset, new PropertyValue(new Vector2(10.0f, 0.0f)))
- .Add((int)VisualTransformPropertyType.OffsetPolicy, new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute)))
- .Add((int)VisualTransformPropertyType.SizePolicy, new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute)))
- .Add((int)VisualTransformPropertyType.Size, new PropertyValue(new Vector2(40.0f, 40.0f)))
- .Add((int)VisualTransformPropertyType.Origin, new PropertyValue((int)Visual.AlignType.CenterBegin))
- .Add((int)VisualTransformPropertyType.AnchorPoint, new PropertyValue((int)Visual.AlignType.CenterBegin));
- _imageVisual.SetTransformAndSize(imageVisualTransform, size);
-
- // Configure the transform and size of Text visual.
- PropertyMap textVisualTransform = new PropertyMap();
- textVisualTransform.Add((int)VisualTransformPropertyType.Offset, new PropertyValue(new Vector2(0.0f, 0.0f)))
- .Add((int)VisualTransformPropertyType.OffsetPolicy, new PropertyValue(new Vector2((int)VisualTransformPolicyType.Relative, (int)VisualTransformPolicyType.Relative)))
- .Add((int)VisualTransformPropertyType.SizePolicy, new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute)))
- .Add((int)VisualTransformPropertyType.Size, new PropertyValue(new Vector2(size.X - 100.0f, 50.0f)))
- .Add((int)VisualTransformPropertyType.Origin, new PropertyValue((int)Visual.AlignType.Center))
- .Add((int)VisualTransformPropertyType.AnchorPoint, new PropertyValue((int)Visual.AlignType.Center));
- _textVisual.SetTransformAndSize(textVisualTransform, size);
-
- // Configure the transform and size of Primitive visual.
- PropertyMap primitiveVisualTransform = new PropertyMap();
- primitiveVisualTransform.Add((int)VisualTransformPropertyType.Offset, new PropertyValue(new Vector2(size.X - 60.0f, 0.0f)))
- .Add((int)VisualTransformPropertyType.OffsetPolicy, new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute)))
- .Add((int)VisualTransformPropertyType.SizePolicy, new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute)))
- .Add((int)VisualTransformPropertyType.Size, new PropertyValue(new Vector2(40.0f, 40.0f)))
- .Add((int)VisualTransformPropertyType.Origin, new PropertyValue((int)Visual.AlignType.CenterBegin))
- .Add((int)VisualTransformPropertyType.AnchorPoint, new PropertyValue((int)Visual.AlignType.CenterBegin));
- _primitiveVisual.SetTransformAndSize(primitiveVisualTransform, size);
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 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 Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Constants;
-
-namespace VisualsUsingCustomView
-{
- class VisualsExample : NUIApplication
- {
- public VisualsExample() : base()
- {
- }
-
- public VisualsExample(string stylesheet) : base(stylesheet)
- {
- }
-
- public VisualsExample(string stylesheet, WindowMode windowMode) : base(stylesheet, windowMode)
- {
- }
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- private void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- TableView contentLayout = new TableView(14, 1);
- contentLayout.Name = "ContentLayout";
- //contentLayout.WidthResizePolicy = ResizePolicyType.FillToParent;
- //contentLayout.HeightResizePolicy = ResizePolicyType.FillToParent;
- contentLayout.PivotPoint = PivotPoint.TopLeft;
- contentLayout.ParentOrigin = ParentOrigin.TopLeft;
- contentLayout.Size2D = new Vector2(window.Size.Width, window.Size.Height);
- contentLayout.SetCellPadding(new Size2D(5, 5));
- contentLayout.BackgroundColor = new Color(0.949f, 0.949f, 0.949f, 1.0f);
-
- window.Add(contentLayout);
-
- TextLabel title = new TextLabel("Contacts List with Visuals");
- title.Name = "Title";
- title.StyleName = "Title";
- title.WidthResizePolicy = ResizePolicyType.FillToParent;
- title.HeightResizePolicy = ResizePolicyType.UseNaturalSize;
- title.HorizontalAlignment = HorizontalAlignment.Center;
- contentLayout.Add(title);
- contentLayout.SetFitHeight(0);
-
- // Create ContactView(s) from ContactItem(s) in ContactsList and add them to TableView
- ContactView contactView;
- foreach (ContactItem contact in ContactsList.s_contactData)
- {
- contactView = new ContactView();
- contactView.WidthResizePolicy = ResizePolicyType.FillToParent;
- contactView.HeightResizePolicy = ResizePolicyType.FillToParent;
-
- // Configure visuals of ContactView via properties
- contactView.NameField = contact.Name;
- contactView.MaskURL = contact.MaskURL;
- contactView.ImageURL = contact.ImageURL;
- contactView.Color = contact.Color;
- contactView.Shape = contact.Shape;
- contentLayout.Add(contactView);
- }
- }
-
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void _Main(string[] args)
- {
- VisualsExample visualsExample = new VisualsExample();
- visualsExample.Run(args);
- }
- }
-}
+++ /dev/null
-using System;
-using Tizen.NUI;
-using Tizen.NUI.UIComponents;
-using Tizen.NUI.BaseComponents;
-
-namespace WidgetViewTest
-{
- class Example : NUIApplication
- {
- private PushButton _widgetButton;
- private PushButton _deletedButton;
- private WidgetView _widgetView;
- private WidgetViewManager _widgetViewManager;
- private View _container;
- private string _instanceID;
-
- protected override void OnCreate()
- {
- base.OnCreate();
- Initialize();
- }
-
- protected override void OnTerminate()
- {
- //This function is called when the app exit normally.
- base.OnTerminate();
- }
-
- public void Initialize()
- {
- Window window = Window.Instance;
- window.BackgroundColor = Color.White;
-
- Tizen.Log.Debug("NUI", "### DP1");
- Layer layer = new Layer();
- layer.Behavior = Layer.LayerBehavior.Layer3D;
- window.AddLayer(layer);
- Tizen.Log.Debug("NUI", "### DP2");
- _container = new View();
- _container.ParentOrigin = ParentOrigin.Center;
- _container.PivotPoint = PivotPoint.Center;
- _container.Size2D = new Size2D(400, 400);
- Tizen.Log.Debug("NUI", "### DP3");
- _widgetButton = new PushButton();
- _widgetButton.LabelText = "Widget";
- _widgetButton.ParentOrigin = ParentOrigin.BottomLeft;
- _widgetButton.PivotPoint = PivotPoint.BottomLeft;
- _widgetButton.PositionUsesAnchorPoint = true;
- _widgetButton.Size2D = new Size2D(200, 100);
- window.Add(_widgetButton);
- _widgetButton.Clicked += (obj, e) =>
- {
- _widgetView = _widgetViewManager.AddWidget("widget-efl.example", "", 450, 700, -1);
- //_widgetView.PositionUsesPivotPoint = true;
- //_widgetView.ParentOrigin = ParentOrigin.Center;
- _widgetView.PivotPoint = PivotPoint.TopLeft;
- _widgetView.PositionUsesAnchorPoint = true;
- _widgetView.BackgroundColor = Color.Yellow;
- _widgetView.WidgetAdded += (sender, eargs) =>
- {
- _widgetButton.LabelText = "Quit";
- window.Add(_widgetView);
- };
- _widgetView.WidgetDeleted += (sender, eargs) =>
- {
- window.Remove(_widgetView);
- _widgetButton.LabelText = "Button";
- };
- _instanceID = _widgetView.InstanceID;
- return false;
- };
-
- _deletedButton = new PushButton();
- _deletedButton.LabelText = "Buton";
- _deletedButton.ParentOrigin = ParentOrigin.BottomRight;
- _deletedButton.PivotPoint = PivotPoint.BottomRight;
- _deletedButton.PositionUsesAnchorPoint = true;
- _deletedButton.Size2D = new Size2D(200, 100);
- window.Add(_deletedButton);
- _deletedButton.Clicked += (obj, e) =>
- {
- OnTerminate();
- return true;
- };
-
- layer.Add(_container);
- Tizen.Log.Debug("NUI", "### widget view manager create start");
- _widgetViewManager = new WidgetViewManager(this, "org.tizen.example.NUISamples.TizenTV");
- if (!_widgetViewManager)
- {
- Tizen.Log.Fatal("NUI", "### Widget is not enabled!");
- }
-
- Tizen.Log.Debug("NUI", "### widget view manager create sucess");
- }
-
- [STAThread]
- static void _Main(string[] args)
- {
- Example example = new Example();
- example.Run(args);
- }
- }
-}
-
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" api-version="4" package="org.tizen.example.NUIsamples" version="1.0.0">
- <profile name="common" />
- <ui-application appid="org.tizen.example.NUIsamples"
- exec="NUIsamples.dll"
- type="dotnet"
- multiple="false"
- taskmanage="true"
- nodisplay="false"
- launch_mode="single">
- <label>NUIsamples</label>
- <icon>NUIsamples.png</icon>
- </ui-application>
-</manifest>