From: vanngoc.tr Date: Mon, 2 Oct 2023 07:38:48 +0000 (+0700) Subject: [Non-ACR][Template] Update auto and manual template base on NUI X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F81%2F299481%2F1;p=test%2Ftct%2Fcsharp%2Fapi.git [Non-ACR][Template] Update auto and manual template base on NUI Change-Id: Ia8cd37e1941eb6171cf37012e5f6905b9a13424c --- diff --git a/tct-suite-vs/Tizen.Alarm.UI.Tests/Program.cs b/tct-suite-vs/Tizen.Alarm.UI.Tests/Program.cs index 3010ceb..129489a 100755 --- a/tct-suite-vs/Tizen.Alarm.UI.Tests/Program.cs +++ b/tct-suite-vs/Tizen.Alarm.UI.Tests/Program.cs @@ -10,22 +10,42 @@ * 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 + * See the License for the specific language governing permissions and * limitations under the License */ using System; -using Tizen.Auto.Template; +using NUnitLite.TUnit; +using AutoTemplate; -namespace Tizen.Applications.Tests +namespace XamarinForTizen.Tizen { - public class Program + class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication { + private static App _app; + protected override void OnCreate() + { + base.OnCreate(); + + Console.WriteLine("TCT : OnCreate()"); + _app = new App(); + LoadApplication(_app); + + TRunner t = new TRunner(); + t.LoadTestsuite(); + t.Execute(); + } + + public static App getApp() + { + return _app; + } static void Main(string[] args) { - Console.WriteLine("TCT CSharp: Main()"); - var app = new App(); + Console.WriteLine("TCT : Main()"); + var app = new Program(); + global::Xamarin.Forms.Forms.Init(app); app.Run(args); } } diff --git a/tct-suite-vs/Tizen.Applications.Manual.Tests/Program.cs b/tct-suite-vs/Tizen.Applications.Manual.Tests/Program.cs index 90f3b76..34d3a91 100755 --- a/tct-suite-vs/Tizen.Applications.Manual.Tests/Program.cs +++ b/tct-suite-vs/Tizen.Applications.Manual.Tests/Program.cs @@ -14,29 +14,35 @@ * limitations under the License */ - - using System; -using NUnitLite.TUnit; -using Tizen.NUI; -using Tizen.Manual.Template; +using NUnit.Framework; +using Xamarin.Forms; -namespace Tizen.Applications.AttachPanel.Manual.Tests +namespace XamarinApplication.Tizen { - public class Program : NUIApplication + class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication { - + private Application _app; protected override void OnCreate() { Console.WriteLine("TCT : OnCreate()"); base.OnCreate(); - ManualTemplate.GetInstance(); + if (ManualTest.IsWearable()) + { + _app = new WearableTemplate.MainPage(); + } + else + { + _app = new ManualTemplate.MainPage(); + } + LoadApplication(_app); } static void Main(string[] args) { Console.WriteLine("TCT : Main()"); var app = new Program(); + global::Xamarin.Forms.Forms.Init(app); app.Run(args); } }