ConstructFromResource() публичный Метод

public ConstructFromResource ( ) : void
Результат void
Пример #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;
		}
Пример #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);
        }
Пример #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);
        }