X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-swig%2Fmanual%2Fcsharp%2FTizen.Applications%2FDaliApplication.cs;h=59c97009e3a677005d5ed2df622be7c0cff93838;hp=06d775644c21013dc60f1a1eb33d24bf230aca3f;hb=9f77c9e72e5601d52ad3da117b5679311c016028;hpb=02318dd256a2edbef78a37cd40e153279385cc94
diff --git a/plugins/dali-swig/manual/csharp/Tizen.Applications/DaliApplication.cs b/plugins/dali-swig/manual/csharp/Tizen.Applications/DaliApplication.cs
old mode 100755
new mode 100644
index 06d7756..59c9700
--- a/plugins/dali-swig/manual/csharp/Tizen.Applications/DaliApplication.cs
+++ b/plugins/dali-swig/manual/csharp/Tizen.Applications/DaliApplication.cs
@@ -1,16 +1,24 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
-//
-// This software is the confidential and proprietary information
-// of Samsung Electronics, Inc. ("Confidential Information"). You
-// shall not disclose such Confidential Information and shall use
-// it only in accordance with the terms of the license agreement
-// you entered into with Samsung.
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * 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 System;
using Dali;
//------------------------------------------------------------------------------
-//
-//
// This file can only run on Tizen target. You should compile it with hello-test.cs, and
// add tizen c# application related library as reference.
//------------------------------------------------------------------------------
@@ -28,13 +36,61 @@ namespace Tizen.Applications
/// This application is created before OnCreate() or created event. And the DaliApplication will be terminated when this application is closed.
///
protected Dali.Application application;
+
+ ///
+ /// The instance of the Dali Application extension.
+ ///
protected Dali.ApplicationExtensions applicationExt;
///
+ /// Store the stylesheet value.
+ ///
+ protected string m_stylesheet;
+
+ ///
+ /// Store the window mode value.
+ ///
+ protected Dali.Application.WINDOW_MODE m_windowMode;
+
+ ///
+ /// Store the app mode value.
+ ///
+ protected APP_MODE appMode;
+
+ ///
/// The instance of the Dali Stage.
///
public Stage stage { get; private set; }
+ ///
+ /// The default constructor.
+ ///
+ public DaliApplication():base()
+ {
+ appMode = APP_MODE.DEFAULT;
+ }
+
+ ///
+ /// The constructor with stylesheet.
+ ///
+ public DaliApplication(string stylesheet):base()
+ {
+ //handle the stylesheet
+ appMode = APP_MODE.STYLESHEETONLY;
+ m_stylesheet = stylesheet;
+ }
+
+ ///
+ /// The constructor with stylesheet and window mode.
+ ///
+ 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;
+ }
///
/// Overrides this method if want to handle behavior before calling OnCreate().
@@ -42,8 +98,22 @@ namespace Tizen.Applications
///
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();
@@ -85,5 +155,15 @@ namespace Tizen.Applications
base.OnLocaleChanged(e);
applicationExt.LanguageChange();
}
+
+ ///
+ /// The mode of creating Dali application.
+ ///
+ protected enum APP_MODE
+ {
+ DEFAULT = 0,
+ STYLESHEETONLY = 1,
+ STYLESHEETWITHWINDOWMODE = 2
+ }
}
}