//throw new global::System.MethodAccessException("C++ destructor does not have public access");
}
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ SwigDirectorDisconnect();
+ }
+
+ base.Dispose(type);
+ }
+
public class WIdgetInstanceOnCreateArgs : EventArgs
{
private string contentInfo;
Interop.WidgetImpl.DirectorConnect(SwigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7);
}
+ private void SwigDirectorDisconnect()
+ {
+ swigDelegate0 = null;
+ swigDelegate1 = null;
+ swigDelegate2 = null;
+ swigDelegate3 = null;
+ swigDelegate4 = null;
+ swigDelegate5 = null;
+ swigDelegate6 = null;
+ swigDelegate7 = null;
+
+ Interop.WidgetImpl.DirectorConnect(SwigCPtr, null, null, null, null, null, null, null, null);
+ }
+
private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)
{
global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
{
ret = new Window(window, true);
}
+ else
+ {
+ System.Runtime.InteropServices.HandleRef CPtr = new System.Runtime.InteropServices.HandleRef(this, window);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
+ }
OnCreate(contentInfo, ret);
}
{
ret = new Window(window, true);
}
+ else
+ {
+ System.Runtime.InteropServices.HandleRef CPtr = new System.Runtime.InteropServices.HandleRef(this, window);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
+ }
OnResize(ret);
}
protected override void OnTerminate(string contentInfo, TerminationType type)
{
+ Tizen.Log.Info("NUI", "OnTerminate(BlueWidget) \n");
+ mAnimation.Stop();
+ mAnimation = null;
+ mRootView.Dispose();
+ mRootView = null;
base.OnTerminate(contentInfo, type);
+
+ // Call GC for deleting window directly
+ global::System.GC.Collect();
+ global::System.GC.WaitForPendingFinalizers();
+ global::System.GC.Collect();
}
protected override void OnUpdate(string contentInfo, int force)
mWidgetView2.Position = new Position(100, widgetHeight + 110);
window.GetDefaultLayer().Add(mWidgetView2);
+ mTimer = new Timer(4000);
+ mTimer.Tick += onTick;
+ mTimer.Start();
+ created = true;
}
+
+ private bool onTick(object o, Timer.TickEventArgs e)
+ {
+ Window window = GetDefaultWindow();
+ if(created)
+ {
+ WidgetViewManager.Instance.RemoveWidget(mWidgetView2);
+ mWidgetView2.Dispose();
+ mWidgetView2 = null;
+ created = false;
+ }
+ else
+ {
+ Bundle bundle = new Bundle();
+ bundle.AddItem("COUNT", "1");
+ String encodedBundle = bundle.Encode();
+
+ mWidgetView2 = WidgetViewManager.Instance.AddWidget("class2@Tizen.NUI.WidgetTest", encodedBundle, widgetWidth, widgetHeight, 0.0f);
+ mWidgetView2.Position = new Position(100, widgetHeight + 110);
+ window.GetDefaultLayer().Add(mWidgetView2);
+
+ bundle.Dispose();
+ bundle = null;
+ created = true;
+ }
+ return true;
+ }
+
public void OnKeyEvent(object sender, Window.KeyEventArgs e)
{
if (e.Key.State == Key.StateType.Down )
WidgetView mWidgetView2;
int widgetWidth;
int widgetHeight;
+
+ Timer mTimer;
+ bool created;
+
+ Window mWindow;
}
}