{
}
+ public Example(string stylesheet):base(stylesheet)
+ {
+ }
+
+ public Example(string stylesheet, Dali.Application.WINDOW_MODE windowMode):base(stylesheet, windowMode)
+ {
+ }
+
private void Initialize()
{
// Connect the signal callback for stage touched signal
static void Main(string[] args)
{
Console.WriteLine("Hello mono world.");
- Example example = new Example();
+ //Example example = new Example();
+ //Example example = new Example("stylesheet");
+ Example example = new Example("stylesheet", Dali.Application.WINDOW_MODE.TRANSPARENT);
example.Run(args);
}
}
/// This application is created before OnCreate() or created event. And the DaliApplication will be terminated when this application is closed.
/// </remarks>
protected Dali.Application application;
+
+ /// <summary>
+ /// The instance of the Dali Application extension.
+ /// </summary>
protected Dali.ApplicationExtensions applicationExt;
+ /// <summary>
+ /// Store the stylesheet value.
+ /// </summary>
+ protected string m_stylesheet;
+
+ /// <summary>
+ /// Store the window mode value.
+ /// </summary>
+ protected Dali.Application.WINDOW_MODE m_windowMode;
+
+ /// <summary>
+ /// Store the app mode value.
+ /// </summary>
+ protected APP_MODE appMode;
+
/// <summary>
/// The instance of the Dali Stage.
/// </summary>
public Stage stage { get; private set; }
+ /// <summary>
+ /// The default constructor.
+ /// </summary>
+ public DaliApplication():base()
+ {
+ appMode = APP_MODE.DEFAULT;
+ }
+
+ /// <summary>
+ /// The constructor with stylesheet.
+ /// </summary>
+ public DaliApplication(string stylesheet):base()
+ {
+ //handle the stylesheet
+ appMode = APP_MODE.STYLESHEETONLY;
+ m_stylesheet = stylesheet;
+ }
+
+ /// <summary>
+ /// The constructor with stylesheet and window mode.
+ /// </summary>
+ public DaliApplication(string stylesheet, Dali.Application.WINDOW_MODE windowMode)
+ : base()
+ {
+ //handle the stylesheet and windowMode
+ appMode = APP_MODE.STYLESHEETWITHWINDOWMODE;
+ m_stylesheet = stylesheet;
+ m_windowMode = windowMode;
+ }
/// <summary>
/// Overrides this method if want to handle behavior before calling OnCreate().
/// </summary>
protected override void OnPreCreate()
{
- application = Dali.Application.NewApplication();
- applicationExt = new Dali::ApplicationExtensions(application);
+ switch(appMode)
+ {
+ case APP_MODE.DEFAULT:
+ application = Dali.Application.NewApplication();
+ break;
+ case APP_MODE.STYLESHEETONLY:
+ application = Dali.Application.NewApplication(m_stylesheet);
+ break;
+ case APP_MODE.STYLESHEETWITHWINDOWMODE:
+ application = Dali.Application.NewApplication(m_stylesheet, m_windowMode);
+ break;
+ default:
+ break;
+ }
+
+ applicationExt = new Dali.ApplicationExtensions(application);
applicationExt.Init();
stage = Stage.GetCurrent();
base.OnLocaleChanged(e);
applicationExt.LanguageChange();
}
+
+ /// <summary>
+ /// The mode of creating Dali application.
+ /// </summary>
+ protected enum APP_MODE
+ {
+ DEFAULT = 0,
+ STYLESHEETONLY = 1,
+ STYLESHEETWITHWINDOWMODE = 2
+ }
}
}