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

public Create ( QbItemType type ) : void
type QbItemType
Результат void
Пример #1
0
        /// <summary>
        /// Deep clones this item and all children.  Positions and lengths are not cloned.  When inserted in to another item they should be calculated.
        /// </summary>
        /// <returns></returns>
        public override QbItemBase Clone()
        {
            QbItemScript sc = new QbItemScript(this.Root);

            sc.Create(this.QbItemType);

            if (this.ItemQbKey != null)
            {
                sc.ItemQbKey = this.ItemQbKey.Clone();
            }

            byte[] bi = new byte[this.ScriptData.Length];
            for (int i = 0; i < bi.Length; i++)
            {
                bi[i] = this.ScriptData[i];
            }

            sc.ScriptData = bi;
            sc.ItemCount  = this.ItemCount;
            sc.Unknown    = this.Unknown;

            return(sc);
        }
Пример #2
0
        /// <summary>
        /// Deep clones this item and all children.  Positions and lengths are not cloned.  When inserted in to another item they should be calculated.
        /// </summary>
        /// <returns></returns>
        public override QbItemBase Clone()
        {
            QbItemScript sc = new QbItemScript(this.Root);
            sc.Create(this.QbItemType);

            if (this.ItemQbKey != null)
                sc.ItemQbKey = this.ItemQbKey.Clone();

            byte[] bi = new byte[this.ScriptData.Length];
            for (int i = 0; i < bi.Length; i++)
                bi[i] = this.ScriptData[i];

            sc.ScriptData = bi;
            sc.ItemCount = this.ItemCount;
            sc.Unknown = this.Unknown;

            return sc;
        }