{
// register all Views with the type registry, so that can be created / styled via JSON
//ViewRegistryHelper.Initialize(); //moved to Application side.
- if (instance)
+ if (instance != null)
{
return instance;
}
public static Application NewApplication(string stylesheet, NUIApplication.WindowMode windowMode, Rectangle positionSize)
{
- if (instance)
+ if (instance != null)
{
return instance;
}
public static Application NewApplication(string[] args, string stylesheet, NUIApplication.WindowMode windowMode)
{
- if (instance)
+ if (instance != null)
{
return instance;
}
public static Application NewApplication(string[] args, string stylesheet, NUIApplication.WindowMode windowMode, Rectangle positionSize)
{
- if (instance)
+ if (instance != null)
{
return instance;
}
public static Application NewApplication(string stylesheet, NUIApplication.WindowMode windowMode, WindowType type)
{
- if (instance)
+ if (instance != null)
{
return instance;
}
{
Window currWin = Registry.GetManagedBaseHandleFromNativePtr(Interop.Application.GetWindowsFromList(i)) as Window;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- if (currWin)
+ if (currWin != null)
{
WindowList.Add(currWin);
}
{
View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
- if (view)
+ if (view != null)
{
OnChildAdd(view);
}
{
View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
- if (view)
+ if (view != null)
{
OnChildRemove(view);
}
private float SwigDirectorCalculateChildSize(global::System.IntPtr child, int dimension)
{
View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
- if (view)
+ if (view != null)
{
return CalculateChildSize(view, (DimensionType)dimension);
}
private void SwigDirectorOnStyleChange(global::System.IntPtr styleManager, int change)
{
StyleManager stManager = Registry.GetManagedBaseHandleFromNativePtr(styleManager) as StyleManager;
- if (stManager)
+ if (stManager != null)
{
OnStyleChange(stManager, (StyleChangeType)change);
}
private void DirectorOnChildAdd(global::System.IntPtr child)
{
View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
- if (view)
+ if (view != null)
{
OnChildAdd?.Invoke(view);
}
private void DirectorOnChildRemove(global::System.IntPtr child)
{
View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
- if (view)
+ if (view != null)
{
OnChildRemove?.Invoke(view);
}
private float DirectorCalculateChildSize(global::System.IntPtr child, int dimension)
{
View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
- if (view)
+ if (view != null)
{
return CalculateChildSize?.Invoke(view, (DimensionType)dimension) ?? 0.0f;
}
providerImage.PivotPoint = transition.DefaultImageStyle.PivotPoint;
providerImage.PositionUsesPivotPoint = true;
providerImage.AddRenderer(GetRenderer(frame));
- if (mainView)
+ if (mainView != null)
{
mainView.Add(providerImage);
providerImage.LowerToBottom();
/// <since_tizen> 4 </since_tizen>
public override Container GetParent()
{
- if (InternalParent)
- {
- return this.InternalParent as Container;
- }
- return null;
+ return InternalParent as Container;
}
/// <summary>
}
else
{
- if (e.ProposedView) return proposed;
+ if (e.ProposedView != null) return proposed;
else return current;
}
}
View owner = Owner;
- if (owner)
+ if (owner != null)
{
// Margin and Padding only supported when child anchor point is TOP_LEFT.
if (owner.PivotPoint == PivotPoint.TopLeft || (owner.PositionUsesPivotPoint == false))