}
}
- private static Application _instance; // singleton
+ protected static Application _instance; // singleton
public static Application Instance
{
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
private List<NUIFrameComponent> _frameComponentList;
- private static ComponentApplication _instance; //singleton
internal ComponentApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
base.Dispose(type);
}
- public new static ComponentApplication Instance
- {
- get
- {
- return _instance;
- }
- }
-
public static ComponentApplication NewComponentApplication(string[] args, string stylesheet)
{
ComponentApplication ret = New(args, stylesheet);
}
}
- public new static WatchApplication Instance
- {
- get
- {
- return _instance;
- }
- }
-
public static WatchApplication NewWatchApplication()
{
WatchApplication ret = New();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
-
- private static WatchApplication _instance; //singleton
}
}
{
internal class WidgetApplication : Application
{
- private static WidgetApplication _instance; //singleton
private Dictionary<System.Type, string> _widgetInfo;
private List<Widget> _widgetList = new List<Widget>();
private delegate System.IntPtr CreateWidgetFunctionDelegate(ref string widgetName);
Interop.WidgetApplication.delete_WidgetApplication(swigCPtr);
}
- public new static WidgetApplication Instance
- {
- get
- {
- return _instance;
- }
- }
-
public static WidgetApplication NewWidgetApplication(string[] args, string stylesheet)
{
WidgetApplication ret = New(args, stylesheet);
public static System.IntPtr WidgetCreateFunction(ref string widgetName)
{
- Dictionary<System.Type, string> widgetInfo = Instance.WidgetInfo;
+ Dictionary<System.Type, string> widgetInfo = (Instance as WidgetApplication).WidgetInfo;
foreach (System.Type widgetType in widgetInfo.Keys)
{
[EditorBrowsable(EditorBrowsableState.Never)]
public override IWindowInfo CreateWindowInfo()
{
- ComponentApplication.Instance.RegisterFrameComponent(this);
- if(ComponentApplication.Instance.GetFrameComponentCount() == 1)
+ ComponentApplication instance = ComponentApplication.Instance as ComponentApplication;
+ if(instance)
{
- Window = ComponentApplication.Instance.GetWindow();
+ instance.RegisterFrameComponent(this);
+ if(instance.GetFrameComponentCount() == 1)
+ {
+ Window = instance.GetWindow();
+ }
+ else
+ {
+ Window = new Window();
+ }
}
- else
- {
- Window = new Window();
- }
-
NUIWindowInfo = new NUIWindowInfo(Window);
return NUIWindowInfo;
}
widgetImpl.WidgetInstanceResized += OnWidgetInstanceResized;
widgetImpl.WidgetInstanceUpdated += OnWidgetInstanceUpdated;
- WidgetApplication.Instance?.AddWidgetInstance(this);
+ (WidgetApplication.Instance as WidgetApplication)?.AddWidgetInstance(this);
}
internal Widget(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Widget.Widget_SWIGUpcast(cPtr), cMemoryOwn)
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- internal static Window GetCurrent()
- {
- Window ret = new Window(Interop.Stage.Stage_GetCurrent(), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
internal static bool IsInstalled()
{
bool ret = Interop.Stage.Stage_IsInstalled();