internal Platform(CoreUIApplication context, EvasObject parent) { Forms.NativeParent = parent; _pageBusyCount = 0; MessagingCenter.Subscribe <Page, bool>(this, Page.BusySetSignalName, BusySetSignalNameHandler); MessagingCenter.Subscribe <Page, AlertArguments>(this, Page.AlertSignalName, AlertSignalNameHandler); MessagingCenter.Subscribe <Page, ActionSheetArguments>(this, Page.ActionSheetSignalName, ActionSheetSignalNameHandler); InternalNaviframe = new Naviframe(Forms.NativeParent) { PreserveContentOnPop = true, DefaultBackButtonEnabled = false, }; InternalNaviframe.SetAlignment(-1, -1); InternalNaviframe.SetWeight(1.0, 1.0); InternalNaviframe.Show(); InternalNaviframe.AnimationFinished += NaviAnimationFinished; }
static void SetupInit(CoreUIApplication application) { Context = application; if (!IsInitialized) { Internals.Log.Listeners.Add(new XamarinLogListener()); if (System.Threading.SynchronizationContext.Current == null) { TizenSynchronizationContext.Initialize(); } Elementary.Initialize(); Elementary.ThemeOverlay(); } // In .NETCore, AppDomain feature is not supported. // The list of assemblies returned by AppDomain.GetAssemblies() method should be registered manually. // The assembly of the executing application and referenced assemblies of it are added into the list here. // TODO: AppDomain is comming back in NETStandard2.0. This logic should be changed at that time. TizenPlatformServices.AppDomain.CurrentDomain.RegisterAssemblyRecursively(application.GetType().GetTypeInfo().Assembly); Device.PlatformServices = new TizenPlatformServices();; if (Device.info != null) { ((TizenDeviceInfo)Device.info).Dispose(); Device.info = null; } Device.Info = new Forms.TizenDeviceInfo(); Device.SetFlags(s_flags); if (!Forms.IsInitialized) { Registrar.RegisterAll(new Type[] { typeof(ExportRendererAttribute), typeof(ExportImageSourceHandlerAttribute), typeof(ExportCellAttribute), typeof(ExportHandlerAttribute) }); } // TODO: We should consider various tizen profiles such as TV, Wearable and so on. string profile = ((TizenDeviceInfo)Device.Info).Profile; if (profile == "mobile") { Device.SetIdiom(TargetIdiom.Phone); } else if (profile == "tv") { Device.SetIdiom(TargetIdiom.TV); } else if (profile == "desktop") { Device.SetIdiom(TargetIdiom.Desktop); } else { Device.SetIdiom(TargetIdiom.Unsupported); } Color.SetAccent(GetAccentColor(profile)); ExpressionSearch.Default = new TizenExpressionSearch(); IsInitialized = true; }
public static void Init(CoreUIApplication application, bool useDeviceIndependentPixel) { _useDeviceIndependentPixel = useDeviceIndependentPixel; SetupInit(application); }
public static void Init(CoreUIApplication application) { Init(application, false); }