--- /dev/null
+using System;
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace FrameComponentDll
+{
+
+ public class MyFrameComponent3 : NUIFrameComponent
+ {
+ private TextLabel text;
+
+ public override bool OnCreate()
+ {
+ Tizen.Log.Error("MYLOG", "MyFrameComponent OnCreate");
+
+ Window.BackgroundColor = Color.Yellow;
+ text = new TextLabel("dll Frame");
+ text.HorizontalAlignment = HorizontalAlignment.Center;
+ text.VerticalAlignment = VerticalAlignment.Bottom;
+ text.TextColor = Color.Red;
+ text.PointSize = 30.0f;
+ text.HeightResizePolicy = ResizePolicyType.FillToParent;
+ text.WidthResizePolicy = ResizePolicyType.FillToParent;
+ Window.Add(text);
+ return true;
+ }
+
+
+ public override void OnDestroy()
+ {
+ Tizen.Log.Error("MYLOG", "MyFrameComponent OnDestroy");
+ text.Dispose();
+ }
+
+ public override void OnPause()
+ {
+ Tizen.Log.Error("MYLOG", "MyFrameComponent OnPause");
+ }
+
+ public override void OnResume()
+ {
+ Tizen.Log.Error("MYLOG", "MyFrameComponent OnResume");
+ }
+
+ public override void OnStart(AppControl appControl, bool restarted)
+ {
+ Tizen.Log.Error("MYLOG", "MyFrameComponent OnStart");
+ }
+
+ public override void OnStop()
+ {
+ Tizen.Log.Error("MYLOG", "MyFrameComponent OnStop");
+ }
+
+ public void ChangeSharedText(string strText)
+ {
+ text.Text = strText;
+ }
+
+ static void Main(string[] args)
+ {
+ }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>None</DebugType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Folder Include="lib\"/>
+ <Folder Include="res\"/>
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\src\Tizen.NUI\Tizen.NUI.csproj" />
+ </ItemGroup>
+</Project>
+
using System;
using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
using Tizen.Applications;
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
}
}
+ static private Type LoadFrameComponentDll()
+ {
+ string path = @"/opt/usr/FrameComponentDll.dll";
+ FileInfo fi = new FileInfo(path);
+ if (fi.Exists)
+ {
+ Assembly assembly = Assembly.LoadFile(path);
+ if (assembly != null)
+ {
+ Module[] modules = assembly.GetModules();
+ Type frameComponent3 = modules[0].GetType("FrameComponentDll.MyFrameComponent3");
+ return frameComponent3;
+ }
+ }
+ return null;
+ }
+
static void Main(string[] args)
{
+
Dictionary<Type, string> dict = new Dictionary<Type, string>();
dict.Add(typeof(MyFrameComponent), "csharp_frame");
dict.Add(typeof(MyFrameComponent2), "csharp_frame2");
- var app = new Program(dict);
+ Type type = LoadFrameComponentDll();
+ if (type != null)
+ {
+ Tizen.Log.Error("MYLOG", "Add type : " + type);
+ dict.Add(type, "csharp_frame3");
+ }
+
+
+ var app = new Program(dict);
app.Run(args);
app.Dispose();
}