/// </summary>
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;
}
/// <summary>
[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();
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public NUIApplication(Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend("", NUIApplication.WindowMode.Opaque, windowSize, windowPosition))
{
+ ExternalThemeManager.Initialize();
}
/// <summary>
[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();
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public NUIApplication(string styleSheet, Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend(styleSheet, WindowMode.Opaque, windowSize, windowPosition))
{
+ ExternalThemeManager.Initialize();
}
/// <summary>
[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();
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public NUIApplication(string styleSheet, WindowMode windowMode, Size2D windowSize, Position2D windowPosition) : base(new NUICoreBackend(styleSheet, windowMode, windowSize, windowPosition))
{
+ ExternalThemeManager.Initialize();
}
/// <summary>
//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();
}
/// <summary>
static public void Preload()
{
Interop.Application.PreInitialize();
+ ThemeManager.AddPackageTheme(DefaultThemeCreator.Instance);
IsPreload = true;
}
[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<string, string> changedResources = new Dictionary<string, string>();
- // 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);
- // }
-
/// <summary>
/// Check if it is loaded as dotnet-loader-nui.
/// </summary>