--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Globalization;
+using System.Reflection;
+using System.Resources;
+
+namespace TaskBar.Common
+{
+ public class MultiResourceManager : ResourceManager
+ {
+ public MultiResourceManager(string baseName, Assembly assembly)
+ : base(baseName, assembly)
+ {
+ }
+
+ public override string GetString(string name)
+ {
+ return base.GetString(name)
+ ?? TextResources.LanguageResources.ResourceManager.GetString(name);
+ }
+
+ public override string GetString(string name, CultureInfo culture)
+ {
+ return base.GetString(name, culture)
+ ?? TextResources.LanguageResources.ResourceManager.GetString(name, culture);
+ }
+ }
+}
namespace TaskBar.Common
{
- class Resources
+ static class Resources
{
+ public static class Text
+ {
+ public const string OpenApp = "IDS_OPEN";
+ public const string UnpinApp = "IDS_UNPIN";
+ public const string CloseApp = "IDS_CLOSE";
+ public const string PinApp = "IDS_PIN";
+ public const string ClearNotification = "IDS_CLEAR";
+ public const string UninstallApp = "IDS_UNINSTALL";
+ public const string AddApps = "IDS_ADD_APPS";
+ }
+
public const string LogTag = "TaskBar";
public const string LightPlatformThemeId = "org.tizen.default-light-theme";
public const string DarkPlatformThemeId = "org.tizen.default-dark-theme";
using Tizen.NUI.Binding;
using TaskBar.Common;
using TaskBar.Core;
+using TaskBar.TextResources;
namespace TaskBar.Models
{
string itemText = (string)selectedItemText;
switch (itemText)
{
- case "Open":
+ case Resources.Text.OpenApp:
OnAppSelect(selectedItemText);
break;
- case "Close":
+ case Resources.Text.CloseApp:
TaskBarAppsLauncher.CloseApplication(ApplicationId);
break;
- case "Pin to task bar":
+ case Resources.Text.PinApp:
PinAppClicked?.Invoke();
break;
- case "Unpin from task bar":
+ case Resources.Text.UnpinApp:
UnpinAppClicked?.Invoke();
break;
- case "Uninstall app":
+ case Resources.Text.UninstallApp:
UninstallAppClicked?.Invoke();
break;
- case "Clear notifications":
+ case Resources.Text.ClearNotification:
DeleteAllNotifications();
break;
default:
{
List<string> menuItems = new List<string>
{
- "Open", IsPinned ? "Unpin from task bar" : "Pin to task bar", "Close", "Uninstall app"
+ Resources.Text.OpenApp, IsPinned ? Resources.Text.UnpinApp : Resources.Text.PinApp, Resources.Text.CloseApp, Resources.Text.UninstallApp
};
MoreMenuItems = menuItems;
}
using TaskBar.Common;
using TaskBar.Core;
using TaskBar.Views;
+using System.Globalization;
+using System;
namespace TaskBar
{
protected override void OnCreate()
{
base.OnCreate();
+ SetupLanguage();
window = GetDefaultWindow();
List<Window.WindowOrientation> list = new List<Window.WindowOrientation>
{
window.OrientationChanged += OnOrientationChanged;
}
+ private void SetupLanguage()
+ {
+ void SetLanguage()
+ {
+ try
+ {
+ string language = Tizen.System.SystemSettings.LocaleLanguage.Replace("_", "-");
+ var culture = CultureInfo.CreateSpecificCulture(language);
+ CultureInfo.CurrentCulture = culture;
+ TextResources.LanguageResources.Culture = culture;
+ }
+ catch (Exception e)
+ {
+ Tizen.Log.Error(Resources.LogTag, "Setting Language failed" + e.Message);
+ }
+ }
+ MultilingualResourceManager = new MultiResourceManager("Taskbar.TextResources.LanguageResources", typeof(TextResources.LanguageResources).Assembly);
+ Tizen.System.SystemSettings.LocaleLanguageChanged += (s, e) => SetLanguage();
+ SetLanguage();
+ }
+
private void OnOrientationChanged(object sender, WindowOrientationChangedEventArgs e)
{
DeviceInfo.Instance.UpdateDeviceInfo();
<PackageReference Include="Tizen.NET" Version="11.0.0.17918" />
</ItemGroup>
+ <ItemGroup>
+ <Compile Update="TextResources\LanguageResources.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>LanguageResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <EmbeddedResource Update="TextResources\LanguageResources.en-US.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Update="TextResources\LanguageResources.ko-KR.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Update="TextResources\LanguageResources.resx">
+ <Generator>PublicResXFileCodeGenerator</Generator>
+ <LastGenOutput>LanguageResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+
</Project>
--- /dev/null
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace TaskBar.TextResources {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class LanguageResources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal LanguageResources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TaskBar.TextResources.LanguageResources", typeof(LanguageResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Add Apps.
+ /// </summary>
+ public static string IDS_ADD_APPS {
+ get {
+ return ResourceManager.GetString("IDS_ADD_APPS", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Clear notifications.
+ /// </summary>
+ public static string IDS_CLEAR {
+ get {
+ return ResourceManager.GetString("IDS_CLEAR", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Close.
+ /// </summary>
+ public static string IDS_CLOSE {
+ get {
+ return ResourceManager.GetString("IDS_CLOSE", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Open.
+ /// </summary>
+ public static string IDS_OPEN {
+ get {
+ return ResourceManager.GetString("IDS_OPEN", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Pin to taskbar.
+ /// </summary>
+ public static string IDS_PIN {
+ get {
+ return ResourceManager.GetString("IDS_PIN", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Uninstall app.
+ /// </summary>
+ public static string IDS_UNINSTALL {
+ get {
+ return ResourceManager.GetString("IDS_UNINSTALL", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Unpin from taskbar.
+ /// </summary>
+ public static string IDS_UNPIN {
+ get {
+ return ResourceManager.GetString("IDS_UNPIN", resourceCulture);
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_ADD_APPS" xml:space="preserve">
+ <value>Add Apps</value>
+ </data>
+ <data name="IDS_CLEAR" xml:space="preserve">
+ <value>Clear notifications</value>
+ </data>
+ <data name="IDS_CLOSE" xml:space="preserve">
+ <value>Close</value>
+ </data>
+ <data name="IDS_OPEN" xml:space="preserve">
+ <value>Open</value>
+ </data>
+ <data name="IDS_PIN" xml:space="preserve">
+ <value>Pin to taskbar</value>
+ </data>
+ <data name="IDS_UNINSTALL" xml:space="preserve">
+ <value>Uninstall app</value>
+ </data>
+ <data name="IDS_UNPIN" xml:space="preserve">
+ <value>Unpin from taskbar</value>
+ </data>
+</root>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_ADD_APPS" xml:space="preserve">
+ <value>앱 추가</value>
+ </data>
+ <data name="IDS_CLEAR" xml:space="preserve">
+ <value>알림 지우기</value>
+ </data>
+ <data name="IDS_CLOSE" xml:space="preserve">
+ <value>닫기</value>
+ </data>
+ <data name="IDS_OPEN" xml:space="preserve">
+ <value>열기</value>
+ </data>
+ <data name="IDS_PIN" xml:space="preserve">
+ <value>작업표시줄에 추가</value>
+ </data>
+ <data name="IDS_UNINSTALL" xml:space="preserve">
+ <value>앱 삭제</value>
+ </data>
+ <data name="IDS_UNPIN" xml:space="preserve">
+ <value>작업표시줄에서 제거</value>
+ </data>
+</root>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_ADD_APPS" xml:space="preserve">
+ <value>Add Apps</value>
+ </data>
+ <data name="IDS_CLEAR" xml:space="preserve">
+ <value>Clear notifications</value>
+ </data>
+ <data name="IDS_CLOSE" xml:space="preserve">
+ <value>Close</value>
+ </data>
+ <data name="IDS_OPEN" xml:space="preserve">
+ <value>Open</value>
+ </data>
+ <data name="IDS_PIN" xml:space="preserve">
+ <value>Pin to taskbar</value>
+ </data>
+ <data name="IDS_UNINSTALL" xml:space="preserve">
+ <value>Uninstall app</value>
+ </data>
+ <data name="IDS_UNPIN" xml:space="preserve">
+ <value>Unpin from taskbar</value>
+ </data>
+</root>
\ No newline at end of file
using Tizen.NUI;
using TaskBar.Common;
using TaskBar.Models;
+using TaskBar.TextResources;
namespace TaskBar.ViewModels
{
List<string> moreMenuList = new List<string>();
if (item.Key != "back")
{
- moreMenuList.Add("Open");
+ moreMenuList.Add(Resources.Text.OpenApp);
}
if (item.Key == "notifications")
{
- moreMenuList.Add("Clear notifications");
- moreMenuList.Add("Close");
+ moreMenuList.Add(Resources.Text.ClearNotification);
+ moreMenuList.Add(Resources.Text.CloseApp);
}
else if (item.Key == "apps" || item.Key == "settings")
{
- moreMenuList.Add("Close");
+ moreMenuList.Add(Resources.Text.CloseApp);
}
appInfoModel.MoreMenuItems = moreMenuList;
buttons.Add(appInfoModel);
using Tizen.NUI.Binding;
using Tizen.NUI.Components;
using TaskBar.Common;
+using TaskBar.TextResources;
namespace TaskBar.Views
{
Normal = Resources.NormalMenuItemTextColor,
};
item.TextColorSelector = colors;
- if (item.Text == "Uninstall app")
+ if (item.Text == Resources.Text.UninstallApp)
{
item.TextColor = Resources.UninstallMenuItemTextColor;
}
{
foreach (MenuItem item in moreMenu.Items as List<MenuItem>)
{
- if (item.Text == "Close")
+ if (item.TranslatableText == Resources.Text.CloseApp)
{
item.IsEnabled = showIndicator;
}
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
VerticalAlignment = VerticalAlignment.Center,
- Text = menuItemName,
+ TranslatableText = menuItemName,
},
IsSelectable = false,
};
MenuItem item = new MenuItem(buttonStyle);
- if (menuItemName == "Close")
+ if (menuItemName == Resources.Text.CloseApp)
{
item.IsEnabled = showIndicator;
}
private void OnItemClicked(object sender, ClickedEventArgs e)
{
MenuItem item = sender as MenuItem;
- string itemText = item.Text;
+ string itemText = item.TranslatableText;
DisposeMenuItems();
DisposeMoreMenu();
MenuItemSelectCommand.Execute(itemText);
using TaskBar.Common;
using TaskBar.Core;
using TaskBar.ViewModels;
+using TaskBar.TextResources;
namespace TaskBar.Views
{
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
VerticalAlignment = VerticalAlignment.Center,
- Text = "Add Apps",
+ TranslatableText = Resources.Text.AddApps,
},
IsSelectable = false,
};