--- /dev/null
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+/*
+ * The Item Layout has two modes depending on the number of text labels inserted into it.
+ * Structure is depicted below.
+ *
+ * +------------------------------------------------------------------------+ ------
+ * | | -> Item Margin
+ * | +------+ +--------------------------------------------------------+ | ------
+ * | | | | | |
+ * | |CHECK | | TITLE | |
+ * | | | | | |
+ * | +------+ +--------------------------------------------------------+ |
+ * +------------------------------------------------------------------------+
+ * | |
+ * | |
+ * | |
+ * Text Left Margin
+ * | |
+ * Text Right Margin
+ *
+ * +------------------------------------------------------------------------------+-------
+ * | +-------------------------------------------------------------+ |
+ * | +-------+ | TITLE | | Description Top Margin
+ * | | | | | |
+ * | |CHECK | +-------------------------------------------------------------+ |
+ * | | | +-------------------------------------------------------------+ |-------
+ * | +-------+ | DESCRIPTION | |
+ * | | | |
+ * | +-------------------------------------------------------------+ |
+ * +------------------------------------------------------------------------------+
+*/
+
+namespace SettingMain
+{
+ internal class ILCheckLabel : ItemLayout
+ {
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+/*
+ * The Item Layout has two modes depending on the number of text labels inserted into it.
+ * Structure is depicted below.
+ *
+ * +------------------------------------------------------------------------+ ------
+ * | | -> Item Margin
+ * | +------+ +--------------------------------------------------------+ | ------
+ * | | | | | |
+ * | | ICON | | TITLE | |
+ * | | | | | |
+ * | +------+ +--------------------------------------------------------+ |
+ * +------------------------------------------------------------------------+
+ * | |
+ * | |
+ * | |
+ * Text Left Margin
+ * | |
+ * Text Right Margin
+ *
+ * +------------------------------------------------------------------------------+-------
+ * | +-------------------------------------------------------------+ |
+ * | +-------+ | TITLE | | Description Top Margin
+ * | | | | | |
+ * | | ICON | +-------------------------------------------------------------+ |
+ * | | | +-------------------------------------------------------------+ |-------
+ * | +-------+ | DESCRIPTION | |
+ * | | | |
+ * | +-------------------------------------------------------------+ |
+ * +------------------------------------------------------------------------------+
+*/
+
+namespace SettingMain
+{
+ /// <summary>
+ /// The custom layout sample implementation. This class creates layout for Item Object as it is depicted above.
+ /// The custom layout must be derived from LayoutGroup and override the two methods, OnMeasure and OnLayout.
+ /// OnMeasure and OnLayout methods must be extended and called during the measuring and layout phases respectively.
+ /// </summary>
+ internal class ILIconLabel : ItemLayout
+ {
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+/*
+ * The Item Layout has two modes depending on the number of text labels inserted into it.
+ * Structure is depicted below.
+ *
+ * +------------------------------------------------------------------------+ ------
+ * | | -> Item Margin
+ * | +------+ +--------------------------------------------------------+ | ------
+ * | | | | | |
+ * | | | | TITLE | |
+ * | | | | | |
+ * | +------+ +--------------------------------------------------------+ |
+ * +------------------------------------------------------------------------+
+ * | |
+ * | |
+ * | |
+ * Text Left Margin
+ * | |
+ * Text Right Margin
+ *
+ * +------------------------------------------------------------------------------+-------
+ * | +-------------------------------------------------------------+ |
+ * | +-------+ | TITLE | | Description Top Margin
+ * | | | | | |
+ * | | | +-------------------------------------------------------------+ |
+ * | | | +-------------------------------------------------------------+ |-------
+ * | +-------+ | SLIDER | |
+ * | | | |
+ * | +-------------------------------------------------------------+ |
+ * +------------------------------------------------------------------------------+
+*/
+
+namespace SettingMain
+{
+ internal class ILLabelSlider : ItemLayout
+ {
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+/*
+ * The Item Layout has two modes depending on the number of text labels inserted into it.
+ * Structure is depicted below.
+ *
+ * +------------------------------------------------------------------------+ ------
+ * | | -> Item Margin
+ * | +------+ +--------------------------------------------------------+ | ------
+ * | | | | | |
+ * | | ICON | | TITLE | |
+ * | | | | | |
+ * | +------+ +--------------------------------------------------------+ |
+ * +------------------------------------------------------------------------+
+ * | |
+ * | |
+ * | |
+ * Text Left Margin
+ * | |
+ * Text Right Margin
+ *
+ * +------------------------------------------------------------------------------+-------
+ * | +-------------------------------------------------------------+ |
+ * | +-------+ | TITLE | | Description Top Margin
+ * | | | | | |
+ * | | ICON | +-------------------------------------------------------------+ |
+ * | | | +-------------------------------------------------------------+ |-------
+ * | +-------+ | DESCRIPTION | |
+ * | | | |
+ * | +-------------------------------------------------------------+ |
+ * +------------------------------------------------------------------------------+
+*/
+
+namespace SettingMain
+{
+ /// <summary>
+ /// The custom layout sample implementation. This class creates layout for Item Object as it is depicted above.
+ /// The custom layout must be derived from LayoutGroup and override the two methods, OnMeasure and OnLayout.
+ /// OnMeasure and OnLayout methods must be extended and called during the measuring and layout phases respectively.
+ /// </summary>
+ internal class ItemLayout : LayoutGroup
+ {
+ /// <summary>
+ /// Top margin of item contents.
+ /// </summary>
+ private const int ItemMargin = 5;
+
+ /// <summary>
+ /// Point where Description and Title begins.
+ /// </summary>
+ private const int TextLeftMargin = 120;
+
+ /// <summary>
+ /// Point where Description and Title ends.
+ /// </summary>
+ private const int TextRightMargin = 710;
+
+ /// <summary>
+ /// Vertical Description margin.
+ /// </summary>
+ private const int DescriptionTopMargin = 70;
+
+ /// <summary>
+ /// Height of a text object.
+ /// </summary>
+ private const int TextHeight = 50;
+
+ /// <summary>
+ /// Function calculates the layout size requirements using parent width and height measure specifications.
+ /// </summary>
+ /// <param name="widthMeasureSpec">Parent width measure specification</param>
+ /// <param name="heightMeasureSpec">Parent height measure specification</param>
+ protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
+ {
+ var itemWidth = new LayoutLength(0);
+ var itemHeight = new LayoutLength(0);
+ var iconHeight = new LayoutLength(0);
+
+ float labelMaxWidth = 0;
+
+ //All layout items have to be measured to calculate Item width and height
+ foreach (LayoutItem childLayout in LayoutChildren)
+ {
+ if (childLayout != null)
+ {
+ //Set widthMEasureSpecification and HeightMeasureSpecification for children
+ MeasureChild(childLayout, widthMeasureSpec, heightMeasureSpec);
+
+ //Item size depends of the content. If item contains descrpitoin height of the item is different.
+ if (childLayout.Owner is TextLabel)
+ {
+ itemHeight += childLayout.MeasuredHeight.Size;
+
+ if (childLayout.MeasuredWidth.Size.AsRoundedValue() > labelMaxWidth)
+ {
+ labelMaxWidth = childLayout.MeasuredWidth.Size.AsRoundedValue();
+ }
+ }
+ else if (childLayout.Owner is CheckBox)
+ {
+ itemHeight += childLayout.MeasuredHeight.Size;
+
+ if (childLayout.MeasuredWidth.Size.AsRoundedValue() > labelMaxWidth)
+ {
+ labelMaxWidth = childLayout.MeasuredWidth.Size.AsRoundedValue();
+ }
+ }
+ else if (childLayout.Owner is Slider)
+ {
+ itemHeight += childLayout.MeasuredHeight.Size * 2;
+
+ if (childLayout.MeasuredWidth.Size.AsRoundedValue() > labelMaxWidth)
+ {
+ labelMaxWidth = childLayout.MeasuredWidth.Size.AsRoundedValue();
+ }
+ }
+ else
+ {
+ itemWidth += childLayout.MeasuredWidth.Size;
+ iconHeight = childLayout.MeasuredHeight.Size;
+ }
+
+ //update item width by maximum label widht
+ itemWidth += new LayoutLength(labelMaxWidth);
+ }
+ }
+
+ if (iconHeight.AsRoundedValue() > itemHeight.AsRoundedValue())
+ {
+ itemHeight = iconHeight;
+ }
+
+ // Finally, call this method to set the dimensions we would like
+ SetMeasuredDimensions(new MeasuredSize(itemWidth, MeasuredSize.StateType.MeasuredSizeOK),
+ new MeasuredSize(itemHeight, MeasuredSize.StateType.MeasuredSizeOK));
+ }
+
+ /// <summary>
+ /// Laying out and positioning the children within View itself using their measured sizes.
+ /// </summary>
+ /// <param name="changed">This is a new size or position for this layout.</param>
+ /// <param name="left">Left position, relative to parent.</param>
+ /// <param name="top"> Top position, relative to parent.</param>
+ /// <param name="right">Right position, relative to parent.</param>
+ /// <param name="bottom">Bottom position, relative to parent.</param>
+ protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
+ {
+ //Size have to be calculated for all childrens.
+ foreach (LayoutItem childLayout in LayoutChildren)
+ {
+ //Layout owner name is used to set valid size values
+ if (childLayout.Owner.Name == Program.ItemContentNameIcon)
+ {
+ LayoutLength width = childLayout.MeasuredWidth.Size;
+ LayoutLength height = childLayout.MeasuredHeight.Size;
+
+ childLayout.Layout(new LayoutLength(ItemMargin),
+ new LayoutLength(ItemMargin),
+ width + ItemMargin,
+ height + ItemMargin);
+ }
+ else if (childLayout.Owner.Name == Program.ItemContentNameTitle)
+ {
+ childLayout.Layout(new LayoutLength(TextLeftMargin),
+ new LayoutLength(ItemMargin),
+ new LayoutLength(TextRightMargin),
+ new LayoutLength(TextHeight + ItemMargin));
+ }
+ else if (childLayout.Owner.Name == Program.ItemContentNameDescription)
+ {
+ childLayout.Layout(new LayoutLength(TextLeftMargin),
+ new LayoutLength(DescriptionTopMargin),
+ new LayoutLength(TextRightMargin),
+ new LayoutLength(DescriptionTopMargin + TextHeight + 3 * ItemMargin));
+ }
+ }
+ }
+
+ }
+}
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Threading.Tasks;\r
+\r
+namespace SettingMain\r
+{\r
+ public class ListItem\r
+ {\r
+ private readonly int ItemType = 0;\r
+ private readonly string Path = null;\r
+ private readonly string Label = null;\r
+ private readonly string Description = null;\r
+\r
+ public ListItem(int type, string path, string label, string description = "")\r
+ {\r
+ ItemType = type;\r
+ Path = path;\r
+ Label = label;\r
+ Description = description;\r
+ }\r
+\r
+\r
+ public int GetItemType()\r
+ {\r
+ return ItemType;\r
+ }\r
+ public string GetPath()\r
+ {\r
+ return Path;\r
+ }\r
+\r
+ public string GetLabel()\r
+ {\r
+ return Label;\r
+ }\r
+\r
+ public string GetDescription()\r
+ {\r
+ return Description;\r
+ }\r
+ };\r
+}\r
--- /dev/null
+using System;\r
+using System.ComponentModel;\r
+using System.Diagnostics;\r
+using System.Collections.Generic; // for Dictionary\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Components;\r
+using Tizen.Applications;\r
+\r
+namespace SettingMain\r
+{\r
+ public class Program : NUIWidgetApplication\r
+ {\r
+\r
+ public static readonly string ItemContentNameIcon = "ItemIcon";\r
+ public static readonly string ItemContentNameTitle = "ItemTitle";\r
+ public static readonly string ItemContentNameDescription = "ItemDescription";\r
+\r
+ public Program(Dictionary<System.Type, string> widgetSet) : base(widgetSet)\r
+ {\r
+\r
+ }\r
+\r
+ protected override void OnCreate()\r
+ {\r
+ base.OnCreate();\r
+ }\r
+\r
+ public void OnKeyEvent(object sender, Window.KeyEventArgs e)\r
+ {\r
+ if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))\r
+ {\r
+ Exit();\r
+ }\r
+ }\r
+\r
+ static void Main(string[] args)\r
+ {\r
+ Dictionary<System.Type, string> widgetSet = new Dictionary<Type, string>();\r
+ widgetSet.Add(typeof(SettingWidget_MainMenu), "main@org.tizen.SettingMain");\r
+ widgetSet.Add(typeof(SettingWidget_AboutDevice), "aboutdevice@org.tizen.SettingMain");\r
+ var app = new Program(widgetSet);\r
+ app.Run(args);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.7">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>tizen10.0</TargetFramework>\r
+ <AssemblyName>SettingMain</AssemblyName>\r
+ <disableimplicitframeworkreferences>True</disableimplicitframeworkreferences>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+ \r
+ <ItemGroup>\r
+ <Folder Include="lib\" />\r
+ </ItemGroup>\r
+ \r
+ <ItemGroup>\r
+ <PackageReference Include="Tizen.NET" Version="10.0.0.*" />\r
+ </ItemGroup>\r
+\r
+</Project>\r
--- /dev/null
+using System;\r
+using System.ComponentModel;\r
+using System.Diagnostics;\r
+using System.Collections.Generic; // for Dictionary\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Components;\r
+using Tizen.Applications;\r
+\r
+namespace SettingMain\r
+{\r
+ class SettingWidget_AboutDevice : SettingWidget_Base\r
+ {\r
+ private static readonly ListItem[] listItems =\r
+ {\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"sett_manage_cert_active_Default.png", "Manage certificate", ""),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"sett_legal_infot_active_Default.png", "Legal infomation", ""),\r
+ new ListItem(1, "", "Device Info", ""),\r
+ new ListItem(1, "", "Name", "Tizen"),\r
+ new ListItem(1, "", "Model number", "rpi3"),\r
+ new ListItem(1, "", "Tizen version", "TIZEN 6.5"),\r
+ new ListItem(1, "", "CPU", "BCM2837"),\r
+ new ListItem(1, "", "RAM", "4.0GB"),\r
+ new ListItem(1, "", "Resolution", "1280 x 720"),\r
+ new ListItem(1, "", "Status", "show network status and other infomation."),\r
+ };\r
+\r
+ public SettingWidget_AboutDevice()\r
+ : base(listItems)\r
+ {\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using System.ComponentModel;\r
+using System.Diagnostics;\r
+using System.Collections.Generic;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Components;\r
+using Tizen.Applications;\r
+\r
+namespace SettingMain\r
+{\r
+ class SettingWidget_Base : Widget\r
+ {\r
+ private static readonly string resPath = Tizen.Applications.Application.Current.DirectoryInfo.Resource;\r
+ protected const string SETTING_LIST_ICON_PATH_CFG = "/list_icon/";\r
+ protected ListItem[] mListItems;\r
+\r
+ public SettingWidget_Base(ListItem[] listItems)\r
+ : base()\r
+ {\r
+ mListItems = listItems;\r
+ }\r
+ protected override void OnCreate(string contentInfo, Window window)\r
+ {\r
+ Bundle bundle = Bundle.Decode(contentInfo);\r
+\r
+ mRootView = new View();\r
+ mRootView.BackgroundColor = Color.White;\r
+ mRootView.Size2D = window.Size;\r
+ mRootView.PivotPoint = PivotPoint.Center;\r
+ window.GetDefaultLayer().Add(mRootView);\r
+\r
+ CreateVerticalScrollableBase(window);\r
+\r
+ }\r
+ private void CreateVerticalScrollableBase(Window window)\r
+ {\r
+ verticalScrollableBase = new ScrollableBase()\r
+ {\r
+ ScrollingDirection = ScrollableBase.Direction.Vertical,\r
+ WidthSpecification = LayoutParamPolicies.MatchParent,\r
+ HeightSpecification = LayoutParamPolicies.MatchParent,\r
+ HideScrollbar = false,\r
+ };\r
+ verticalScrollableBase.ScrollOutOfBound += OnVerticalScrollOutOfBound;\r
+\r
+ ListItem[] items = mListItems;\r
+ verticalItems = new Button[items.Length];\r
+ for (int i = 0; i < items.Length; i++)\r
+ {\r
+ verticalItems[i] = new Button\r
+ {\r
+ BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 1.0f),\r
+ Position = new Position(0, i * 80),\r
+ Size = new Size(mRootView.Size2D.Width, 80),\r
+ PointSize = 12.0f,\r
+ TextColor = Color.Black,\r
+ Layout = new LinearLayout()\r
+ {\r
+ LinearOrientation = LinearLayout.Orientation.Horizontal,\r
+ VerticalAlignment = VerticalAlignment.Center,\r
+ HorizontalAlignment = HorizontalAlignment.Begin,\r
+ CellPadding = new Size2D(20, 20),\r
+ },\r
+\r
+ };\r
+\r
+ string iconpath = items[i].GetPath();\r
+ if (iconpath.Length > 0)\r
+ {\r
+ var margin1 = new View\r
+ {\r
+ Size2D = new Size2D(10, 32),\r
+ HeightResizePolicy = ResizePolicyType.FillToParent\r
+ };\r
+ verticalItems[i].Add(margin1);\r
+\r
+ ImageView icon = new ImageView(resPath + items[i].GetPath())\r
+ {\r
+ Size2D = new Size2D(32, 32),\r
+ Name = Program.ItemContentNameIcon,\r
+ };\r
+ verticalItems[i].Add(icon);\r
+ }\r
+\r
+ var margin = new View\r
+ {\r
+ Size2D = new Size2D(10, 32),\r
+ HeightResizePolicy = ResizePolicyType.FillToParent\r
+ };\r
+ verticalItems[i].Add(margin);\r
+\r
+ PropertyMap titleStyle = new PropertyMap();\r
+ titleStyle.Add("weight", new PropertyValue(600));\r
+ TextLabel title = new TextLabel(items[i].GetLabel())\r
+ {\r
+ FontStyle = titleStyle,\r
+ Name = Program.ItemContentNameTitle,\r
+ Padding = new Extents(8, 8, 8, 8),\r
+ };\r
+ verticalItems[i].Add(title);\r
+\r
+\r
+ if (i % 2 == 0)\r
+ {\r
+ verticalItems[i].BackgroundColor = Color.White;\r
+ }\r
+ else\r
+ {\r
+ verticalItems[i].BackgroundColor = Color.Cyan;\r
+ }\r
+#if false\r
+ var okButton = new Button()\r
+ {\r
+ Text = "OK",\r
+ };\r
+ okButton.Clicked += (object sender1, ClickedEventArgs e) => { window.GetDefaultNavigator().Pop(); };\r
+\r
+ verticalItems[i].Clicked += (object sender, ClickedEventArgs e) =>\r
+ {\r
+ DialogPage.ShowAlertDialog("Clicked", verticalItems[i].Name, okButton);\r
+ };\r
+#endif\r
+\r
+ verticalScrollableBase.Add(verticalItems[i]);\r
+ }\r
+ mRootView.Add(verticalScrollableBase);\r
+ }\r
+\r
+ private void OnVerticalScrollOutOfBound(object sender, ScrollOutOfBoundEventArgs e)\r
+ {\r
+#if false\r
+ if (e.Displacement > 80)\r
+ {\r
+ if (e.PanDirection == ScrollOutOfBoundEventArgs.Direction.Down)\r
+ {\r
+ verticalItems[0].Text = $"Reached at the top, panned displacement is {e.Displacement}.";\r
+ }\r
+ }\r
+ else if (0 - e.Displacement > 80)\r
+ {\r
+ if (e.PanDirection == ScrollOutOfBoundEventArgs.Direction.Up)\r
+ {\r
+ verticalItems[mListItems.Length - 1].Text = $"Reached at the bottom, panned displacement is {e.Displacement}.";\r
+ }\r
+ }\r
+#endif\r
+ }\r
+\r
+ protected override void OnPause()\r
+ {\r
+ base.OnPause();\r
+ }\r
+\r
+ protected override void OnResume()\r
+ {\r
+ Tizen.Log.Error("widget", "OnResume \n");\r
+ base.OnResume();\r
+ }\r
+\r
+ protected override void OnResize(Window window)\r
+ {\r
+ base.OnResize(window);\r
+ }\r
+\r
+ protected override void OnTerminate(string contentInfo, TerminationType type)\r
+ {\r
+ base.OnTerminate(contentInfo, type);\r
+ }\r
+\r
+ protected override void OnUpdate(string contentInfo, int force)\r
+ {\r
+ base.OnUpdate(contentInfo, force);\r
+ }\r
+\r
+ protected View mRootView;\r
+ protected ScrollableBase verticalScrollableBase = null;\r
+ protected Button[] verticalItems;\r
+ }\r
+}\r
+\r
--- /dev/null
+using System;\r
+using System.ComponentModel;\r
+using System.Diagnostics;\r
+using System.Collections.Generic;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Components;\r
+using Tizen.Applications;\r
+\r
+namespace SettingMain\r
+{\r
+ class SettingWidget_MainMenu : SettingWidget_Base\r
+ {\r
+ private static readonly ListItem[] mItems = {\r
+ // Connections\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wifi.png", "Wifi","Wifi"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_bluetooth.png", "Bluetooth","Bluetooth"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wifi.png", "Wired Network","Wired Network"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wifi.png", "Tethering","Tethering"),\r
+ \r
+ // Sound\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_sound_and_notifications.png", "Sound","Sound"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_notifications.png", "Notifications","Notifications"),\r
+\r
+ // Display\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_display.png", "Display","Display"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wallpapers.png", "Wallpaper","Wallpaper"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_softkey.png", "Tray","Tray"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_softkey.png", "Screen Mirroring","Screen Mirroring"),\r
+\r
+ // Personal\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_account.png", "Accounts","Accounts"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_privacy_and_safety.png", "Privacy","Privacy"),\r
+\r
+ // Memory\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_applications.png", "Apps","Applications"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_storage.png", "Storage","Storage"),\r
+\r
+ // System\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_language_and_input.png", "Language and input","Language and input"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_date_and_time.png", "Date and time","Date and time"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_reset.png", "Reset","Reset"),\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_accessibility.png", "Accessibility","Accessibility"),\r
+\r
+ // Device\r
+ new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_about_device.png", "About device","About device"),\r
+ };\r
+\r
+ public SettingWidget_MainMenu()\r
+ :base(mItems)\r
+ { \r
+ }\r
+ }\r
+\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5" package="org.tizen.SettingMain" version="1.0.0">\r
+ <profile name="common" />\r
+ <widget-application appid="org.tizen.SettingMain"\r
+ exec="SettingMain.dll"\r
+ type="dotnet"\r
+ multiple="false"\r
+ taskmanage="true"\r
+ nodisplay="false"\r
+ launch_mode="single">\r
+ <label>SettingMain</label>\r
+ <icon>SettingMain.png</icon>\r
+ <widget-class classid="main" update-period="0">\r
+ <support-size preview="SettingMain.png">4x4</support-size>\r
+ </widget-class>\r
+ <widget-class classid="aboutdevice" update-period="0">\r
+ <support-size preview="SettingMain.png">4x4</support-size>\r
+ </widget-class>\r
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />\r
+ </widget-application>\r
+</manifest>\r
--- /dev/null
+using System;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.Applications;\r
+\r
+namespace SettingView\r
+{\r
+ public class Program : NUIApplication\r
+ {\r
+ public Program(string styleSheet, Size2D windowSize, Position2D windowPosition, IBorderInterface borderInterface)\r
+ : base(styleSheet, windowSize, windowPosition, borderInterface)\r
+ {\r
+\r
+ }\r
+ protected override void OnCreate()\r
+ {\r
+ base.OnCreate();\r
+ Window window = Window.Instance;\r
+ window.BackgroundColor = Color.Blue;\r
+ window.KeyEvent += OnKeyEvent;\r
+\r
+ Bundle bundle = new Bundle();\r
+ bundle.AddItem("COUNT", "1");\r
+ String encodedBundle = bundle.Encode();\r
+\r
+ Tizen.Log.Error("SettingWidget", "REQUEST \n");\r
+\r
+ //mWidgetView = WidgetViewManager.Instance.AddWidget("main@org.tizen.SettingMain", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);\r
+ mWidgetView = WidgetViewManager.Instance.AddWidget("aboutdevice@org.tizen.SettingMain", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);\r
+ mWidgetView.Position = new Position(0, 0);\r
+ window.GetDefaultLayer().Add(mWidgetView);\r
+ }\r
+\r
+ public void OnKeyEvent(object sender, Window.KeyEventArgs e)\r
+ {\r
+ if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))\r
+ {\r
+ Exit();\r
+ }\r
+ }\r
+\r
+ static void Main(string[] args)\r
+ {\r
+ var appCustomBorder = new SettingViewBorder();\r
+ var app = new Program("", new Size2D(800, 400), new Position2D(300, 100), appCustomBorder);\r
+\r
+ app.Run(args);\r
+ }\r
+\r
+ WidgetView mWidgetView;\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.7">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>tizen10.0</TargetFramework>\r
+ <AssemblyName>SettingView</AssemblyName>\r
+ <disableimplicitframeworkreferences>True</disableimplicitframeworkreferences>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <Folder Include="lib\" />\r
+ </ItemGroup>\r
+\r
+ <ItemGroup>\r
+ <PackageReference Include="Tizen.NET" Version="10.0.0.*" />\r
+ </ItemGroup>\r
+\r
+ <PropertyGroup>\r
+ <NeedInjection>True</NeedInjection>\r
+ </PropertyGroup>\r
+\r
+</Project>\r
--- /dev/null
+using System;\r
+\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+using Tizen.NUI.Components;\r
+\r
+using System.Collections.Generic;\r
+using System.Text;\r
+\r
+namespace SettingView\r
+{\r
+ class SettingViewBorder : Tizen.NUI.DefaultBorder\r
+ {\r
+ private static readonly string ResourcePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource;\r
+\r
+ private static readonly string MinimalizeIcon = ResourcePath + "/images/minimalize.png";\r
+ private static readonly string MaximalizeIcon = ResourcePath + "/images/maximalize.png";\r
+ private static readonly string RestoreIcon = ResourcePath + "/images/smallwindow.png";\r
+ private static readonly string CloseIcon = ResourcePath + "/images/close.png";\r
+ private static readonly string LeftCornerIcon = ResourcePath + "/images/leftCorner.png";\r
+ private static readonly string RightCornerIcon = ResourcePath + "/images/rightCorner.png";\r
+\r
+ private int width = 500;\r
+ private bool hide = false;\r
+ private View borderView;\r
+ private TextLabel title;\r
+\r
+ private ImageView minimalizeIcon;\r
+ private ImageView maximalizeIcon;\r
+ private ImageView closeIcon;\r
+ private ImageView leftCornerIcon;\r
+ private ImageView rightCornerIcon;\r
+\r
+ private Rectangle preWinPositonSize;\r
+\r
+ public SettingViewBorder() : base()\r
+ {\r
+ //BorderHeight = 50;\r
+ BorderLineThickness = 0;\r
+ //ResizePolicy = Window.BorderResizePolicyType.Fixed;\r
+ }\r
+\r
+\r
+\r
+ public override bool CreateTopBorderView(View topView)\r
+ {\r
+ if (topView == null)\r
+ {\r
+ return false;\r
+ }\r
+ topView.Layout = new LinearLayout()\r
+ {\r
+ LinearOrientation = LinearLayout.Orientation.Horizontal,\r
+ VerticalAlignment = VerticalAlignment.Center,\r
+ CellPadding = new Size2D(20, 20),\r
+ };\r
+\r
+\r
+\r
+ var margin = new View\r
+ {\r
+ Size2D = new Size2D(10, 32),\r
+ HeightResizePolicy = ResizePolicyType.FillToParent\r
+ };\r
+ topView.Add(margin);\r
+\r
+ PropertyMap titleStyle = new PropertyMap();\r
+ titleStyle.Add("weight", new PropertyValue(600));\r
+\r
+\r
+ title = new TextLabel()\r
+ {\r
+ Text = "Setting",\r
+ FontStyle = titleStyle,\r
+ };\r
+\r
+ topView.Add(title);\r
+\r
+ return true;\r
+ }\r
+\r
+ public override bool CreateBottomBorderView(View bottomView)\r
+ {\r
+ if (bottomView == null)\r
+ {\r
+ return false;\r
+ }\r
+ bottomView.Layout = new RelativeLayout();\r
+\r
+ minimalizeIcon = new ImageView()\r
+ {\r
+ ResourceUrl = MinimalizeIcon,\r
+ AccessibilityHighlightable = true,\r
+ };\r
+\r
+ maximalizeIcon = new ImageView()\r
+ {\r
+ ResourceUrl = MaximalizeIcon,\r
+ AccessibilityHighlightable = true,\r
+ };\r
+\r
+ closeIcon = new ImageView()\r
+ {\r
+ ResourceUrl = CloseIcon,\r
+ AccessibilityHighlightable = true,\r
+ };\r
+\r
+ leftCornerIcon = new ImageView()\r
+ {\r
+ ResourceUrl = LeftCornerIcon,\r
+ AccessibilityHighlightable = true,\r
+ };\r
+\r
+ rightCornerIcon = new ImageView()\r
+ {\r
+ ResourceUrl = RightCornerIcon,\r
+ AccessibilityHighlightable = true,\r
+ };\r
+\r
+ RelativeLayout.SetRightTarget(minimalizeIcon, maximalizeIcon);\r
+ RelativeLayout.SetRightRelativeOffset(minimalizeIcon, 0.0f);\r
+ RelativeLayout.SetHorizontalAlignment(minimalizeIcon, RelativeLayout.Alignment.End);\r
+ RelativeLayout.SetRightTarget(maximalizeIcon, closeIcon);\r
+ RelativeLayout.SetRightRelativeOffset(maximalizeIcon, 0.0f);\r
+ RelativeLayout.SetHorizontalAlignment(maximalizeIcon, RelativeLayout.Alignment.End);\r
+ RelativeLayout.SetRightTarget(closeIcon, rightCornerIcon);\r
+ RelativeLayout.SetRightRelativeOffset(closeIcon, 0.0f);\r
+ RelativeLayout.SetHorizontalAlignment(closeIcon, RelativeLayout.Alignment.End);\r
+ RelativeLayout.SetRightRelativeOffset(rightCornerIcon, 1.0f);\r
+ RelativeLayout.SetHorizontalAlignment(rightCornerIcon, RelativeLayout.Alignment.End);\r
+ bottomView.Add(leftCornerIcon);\r
+ bottomView.Add(minimalizeIcon);\r
+ bottomView.Add(maximalizeIcon);\r
+ bottomView.Add(closeIcon);\r
+ bottomView.Add(rightCornerIcon);\r
+\r
+\r
+ minimalizeIcon.TouchEvent += OnMinimizeIconTouched;\r
+ maximalizeIcon.TouchEvent += OnMaximizeIconTouched;\r
+ closeIcon.TouchEvent += OnCloseIconTouched;\r
+ leftCornerIcon.TouchEvent += OnLeftBottomCornerIconTouched;\r
+ rightCornerIcon.TouchEvent += OnRightBottomCornerIconTouched;\r
+\r
+ minimalizeIcon.AccessibilityActivated += (s, e) =>\r
+ {\r
+ MinimizeBorderWindow();\r
+ };\r
+ maximalizeIcon.AccessibilityActivated += (s, e) =>\r
+ {\r
+ MaximizeBorderWindow();\r
+ };\r
+ closeIcon.AccessibilityActivated += (s, e) =>\r
+ {\r
+ CloseBorderWindow();\r
+ };\r
+\r
+ minimalizeIcon.AccessibilityNameRequested += (s, e) =>\r
+ {\r
+ e.Name = "Minimize";\r
+ };\r
+ maximalizeIcon.AccessibilityNameRequested += (s, e) =>\r
+ {\r
+ e.Name = "Maximize";\r
+ };\r
+ closeIcon.AccessibilityNameRequested += (s, e) =>\r
+ {\r
+ e.Name = "Close";\r
+ };\r
+ leftCornerIcon.AccessibilityNameRequested += (s, e) =>\r
+ {\r
+ e.Name = "Resize";\r
+ };\r
+ rightCornerIcon.AccessibilityNameRequested += (s, e) =>\r
+ {\r
+ e.Name = "Resize";\r
+ };\r
+\r
+ minimalizeIcon.SetAccessibilityReadingInfoTypes(Tizen.NUI.BaseComponents.AccessibilityReadingInfoTypes.Name);\r
+ maximalizeIcon.SetAccessibilityReadingInfoTypes(Tizen.NUI.BaseComponents.AccessibilityReadingInfoTypes.Name);\r
+ closeIcon.SetAccessibilityReadingInfoTypes(Tizen.NUI.BaseComponents.AccessibilityReadingInfoTypes.Name);\r
+ leftCornerIcon.SetAccessibilityReadingInfoTypes(Tizen.NUI.BaseComponents.AccessibilityReadingInfoTypes.Name);\r
+ rightCornerIcon.SetAccessibilityReadingInfoTypes(Tizen.NUI.BaseComponents.AccessibilityReadingInfoTypes.Name);\r
+\r
+ return true;\r
+ }\r
+\r
+ public override void CreateBorderView(View borderView)\r
+ {\r
+ this.borderView = borderView;\r
+ borderView.CornerRadius = new Vector4(0.03f, 0.03f, 0.03f, 0.03f);\r
+ borderView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;\r
+ borderView.BackgroundColor = new Color(1, 1, 1, 0.3f);\r
+ }\r
+\r
+ public override void OnCreated(View borderView)\r
+ {\r
+ base.OnCreated(borderView);\r
+ UpdateIcons();\r
+ }\r
+\r
+ public override bool OnCloseIconTouched(object sender, View.TouchEventArgs e)\r
+ {\r
+\r
+ Tizen.Log.Debug("CustomBorder", $"Item Name : {ResourcePath}");\r
+\r
+ base.OnCloseIconTouched(sender, e);\r
+\r
+\r
+ Tizen.Applications.Application.Current.Exit();\r
+ return true;\r
+ }\r
+\r
+\r
+\r
+ public override bool OnMinimizeIconTouched(object sender, View.TouchEventArgs e)\r
+ {\r
+ if (e.Touch.GetState(0) == PointStateType.Up)\r
+ {\r
+ if (BorderWindow.IsMaximized() == true)\r
+ {\r
+ BorderWindow.Maximize(false);\r
+ }\r
+ preWinPositonSize = BorderWindow.WindowPositionSize;\r
+ BorderWindow.WindowPositionSize = new Rectangle(preWinPositonSize.X, preWinPositonSize.Y, 500, 0);\r
+ }\r
+ return true;\r
+ }\r
+\r
+ public override void OnRequestResize()\r
+ {\r
+ if (borderView != null)\r
+ {\r
+ borderView.BackgroundColor = new Color(0, 1, 0, 0.3f); // 보더의 배경을 변경할 수 있습니다.\r
+ }\r
+ }\r
+\r
+ public override void OnResized(int width, int height)\r
+ {\r
+ if (borderView != null)\r
+ {\r
+ if (this.width > width && hide == false)\r
+ {\r
+ title.Hide();\r
+ hide = true;\r
+ }\r
+ else if (this.width < width && hide == true)\r
+ {\r
+ title.Show();\r
+ hide = false;\r
+ }\r
+ borderView.BackgroundColor = new Color(1, 1, 1, 0.3f); // 리사이즈가 끝나면 보더의 색깔은 원래대로 돌려놓습니다.\r
+ base.OnResized(width, height);\r
+ UpdateIcons();\r
+ }\r
+ }\r
+\r
+ private void UpdateIcons()\r
+ {\r
+ if (BorderWindow != null && borderView != null)\r
+ {\r
+ if (BorderWindow.IsMaximized() == true)\r
+ {\r
+ if (maximalizeIcon != null)\r
+ {\r
+ maximalizeIcon.ResourceUrl = RestoreIcon;\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (maximalizeIcon != null)\r
+ {\r
+ maximalizeIcon.ResourceUrl = MaximalizeIcon;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest package="org.tizen.SettingView" version="1.0.0" api-version="6.5" xmlns="http://tizen.org/ns/packages">\r
+ <profile name="common" />\r
+ <ui-application appid="org.tizen.SettingView" exec="SettingView.dll" multiple="false" nodisplay="false"\r
+ taskmanage="true" api-version="9" type="dotnet" launch_mode="single">\r
+ <label>SettingView</label>\r
+ <icon>SettingView.png</icon>\r
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />\r
+ <splash-screens />\r
+ </ui-application>\r
+ <shortcut-list />\r
+ <privileges>\r
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>\r
+ <privilege>http://tizen.org/privilege/datasharing</privilege>\r
+ <privilege>http://tizen.org/privilege/widget.viewer</privilege>\r
+ </privileges>\r
+ <dependencies />\r
+ <provides-appdefined-privileges />\r
+</manifest>\r
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.32126.315\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingView", "SettingView\SettingView.csproj", "{922DF2C4-A0C0-4FFB-B8A5-82FE8253E0F1}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingMain", "SettingMain\SettingMain.csproj", "{EB8E2EC7-BA37-4C85-A2C9-61F3B3865128}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {922DF2C4-A0C0-4FFB-B8A5-82FE8253E0F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {922DF2C4-A0C0-4FFB-B8A5-82FE8253E0F1}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {922DF2C4-A0C0-4FFB-B8A5-82FE8253E0F1}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {922DF2C4-A0C0-4FFB-B8A5-82FE8253E0F1}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {EB8E2EC7-BA37-4C85-A2C9-61F3B3865128}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {EB8E2EC7-BA37-4C85-A2C9-61F3B3865128}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {EB8E2EC7-BA37-4C85-A2C9-61F3B3865128}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {EB8E2EC7-BA37-4C85-A2C9-61F3B3865128}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityGlobals) = postSolution\r
+ SolutionGuid = {37EBC574-94A0-400A-9D93-AD516F8FDE27}\r
+ EndGlobalSection\r
+EndGlobal\r