ConstructFromResource() public method

public ConstructFromResource ( ) : void
return void
Exemplo n.º 1
0
		GObject CreateObject(PackageItem item, System.Type userClass)
		{
			Stats.LatestObjectCreation = 0;
			Stats.LatestGraphicsCreation = 0;

			GetItemAsset(item);

			GObject g = null;
			if (item.type == PackageItemType.Component)
			{
				if (userClass != null)
					g = (GComponent)userClass.Assembly.CreateInstance(userClass.FullName);
				else
					g = UIObjectFactory.NewObject(item);
			}
			else
				g = UIObjectFactory.NewObject(item);

			if (g == null)
				return null;

			_constructing++;
			g.packageItem = item;
			g.ConstructFromResource();
			_constructing--;
			return g;
		}
Exemplo n.º 2
0
        internal GObject CreateObject(PackageItem item, System.Type userClass)
        {
            GObject g = null;

            if (item.type == PackageItemType.Component)
            {
                if (userClass != null)
                {
                    g = (GComponent)userClass.Assembly.CreateInstance(userClass.FullName);
                }
                else
                {
                    g = UIObjectFactory.NewObject(item);
                }
            }
            else
            {
                g = UIObjectFactory.NewObject(item);
            }

            if (g == null)
            {
                return(null);
            }

            _constructing++;
            g.ConstructFromResource(item);
            _constructing--;
            return(g);
        }
Exemplo n.º 3
0
        GObject CreateObject(PackageItem item, System.Type userClass)
        {
            Stats.LatestObjectCreation   = 0;
            Stats.LatestGraphicsCreation = 0;

            GetItemAsset(item);

            GObject g = null;

            if (item.type == PackageItemType.Component)
            {
                if (userClass != null)
                {
                    g = (GComponent)Activator.CreateInstance(userClass);
                }
                else
                {
                    g = UIObjectFactory.NewObject(item);
                }
            }
            else
            {
                g = UIObjectFactory.NewObject(item);
            }

            if (g == null)
            {
                return(null);
            }

            _constructing++;
            g.packageItem = item;
            g.ConstructFromResource();
            _constructing--;
            return(g);
        }