X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FApplication%2FNUIApplication.cs;h=8299d7e0468545235f8f42c9302d0429c623535d;hb=4e2330536d29cbc51d0b2264574fcdd32ebe4ced;hp=e5579ebdb14cdc10822e8fab75b6cac2221b887c;hpb=963f0a40a4361dc772b6bc9a0b5d05e9ac9f2841;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/public/Application/NUIApplication.cs b/src/Tizen.NUI/src/public/Application/NUIApplication.cs index e5579eb..8299d7e 100755 --- a/src/Tizen.NUI/src/public/Application/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/Application/NUIApplication.cs @@ -38,14 +38,9 @@ namespace Tizen.NUI /// private static System.Resources.ResourceManager resourceManager = null; - // TODO Enable this after tizen-theme-manager is released. - // private readonly ThemeLoader themeLoader = new ThemeLoader(); - static NUIApplication() { Registry.Instance.SavedApplicationThread = Thread.CurrentThread; - // TODO Enable this after tizen-theme-manager is released. - // themeLoader.ThemeChanged += TizenThemeChanged; } /// @@ -55,6 +50,7 @@ namespace Tizen.NUI [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")] public NUIApplication() : base(new NUICoreBackend()) { + ExternalThemeManager.Initialize(); } /// @@ -68,6 +64,7 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public NUIApplication(Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition)) { + ExternalThemeManager.Initialize(); } /// @@ -78,6 +75,7 @@ namespace Tizen.NUI [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")] public NUIApplication(string styleSheet) : base(new NUICoreBackend(styleSheet)) { + ExternalThemeManager.Initialize(); } /// @@ -92,6 +90,7 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public NUIApplication(string styleSheet, Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend(styleSheet, WindowMode.Opaque, windowSize, windowPosition)) { + ExternalThemeManager.Initialize(); } /// @@ -103,6 +102,7 @@ namespace Tizen.NUI [SuppressMessage("Microsoft.Design", "CA2000: Dispose objects before losing scope", Justification = "NUICoreBackend is disposed in the base class when the application is terminated")] public NUIApplication(string styleSheet, WindowMode windowMode) : base(new NUICoreBackend(styleSheet, windowMode)) { + ExternalThemeManager.Initialize(); } /// @@ -118,6 +118,7 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public NUIApplication(string styleSheet, WindowMode windowMode, Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition)) { + ExternalThemeManager.Initialize(); } /// @@ -136,6 +137,7 @@ namespace Tizen.NUI //windowMode and styleSheet will be added later. currenlty it's not working as expected. Graphics.Backend = backend; Tizen.Log.Error("NUI", "Plaese DO NOT set graphical backend type with this constructor! This will give no effect!"); + ExternalThemeManager.Initialize(); } /// @@ -393,6 +395,7 @@ namespace Tizen.NUI static public void Preload() { Interop.Application.PreInitialize(); + ThemeManager.AddPackageTheme(DefaultThemeCreator.Instance); IsPreload = true; } @@ -411,29 +414,6 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public TransitionOptions TransitionOptions { get; set; } - // TODO Enable this after tizen-theme-manager is released. - // private void TizenThemeChanged(object sender, ThemeEventArgs e) - // { - // string prefix = "/theme/"; - - // Dictionary changedResources = new Dictionary(); - // foreach (string key in ThemeManager.DefaultTheme.Resources.Keys) - // { - // // NOTE Need improve this code by checking HasKey - // string newValue = null; - // try - // { - // newValue = e.Theme.GetString(prefix + key); - // } - // catch { } - // if (newValue != null) - // { - // changedResources[key] = newValue; - // } - // } - // ThemeManager.UpdateCurrentThemeResources(changedResources); - // } - /// /// Check if it is loaded as dotnet-loader-nui. ///