protected override void OnPushCopy()
        {
            ObjectsPack pack = new ObjectsPack();

            pack.Write(this.Value);
            CopyStack.Push(pack);
        }
Esempio n. 2
0
        protected override void OnPushCopy()
        {
            ObjectsPack pack = new ObjectsPack();

            pack.Write(this.Name);
            pack.Write(this.Description);
            pack.Write(this.Manufacturer);
            pack.Write(this.ManufacturerImageLink);
            pack.Write(this.DatasheetSiteLink);
            pack.Write(this.DatasheetPdfLink);
            pack.Write(this.DatasheetPages);
            pack.Write(this.DatasheetSize);
            pack.Write(this.ManufacturerSite);
            pack.Write(this.LastUseDate);
            pack.Write(this.Custom);
            pack.Write(this.RelativeCustomPath);

            CopyStack.Push(pack);

            Tags.PushCopy();
        }
Esempio n. 3
0
        protected override void OnPopCopy(WorkingCopyResult result)
        {
            ObjectsPack pack = CopyStack.Pop();

            if (result == WorkingCopyResult.Restore)
            {
                this.Name                  = (string)pack.Read();
                this.Description           = (string)pack.Read();
                this.Manufacturer          = (string)pack.Read();
                this.ManufacturerImageLink = (string)pack.Read();
                this.DatasheetSiteLink     = (string)pack.Read();
                this.DatasheetPdfLink      = (string)pack.Read();
                this.DatasheetPages        = (int)pack.Read();
                this.DatasheetSize         = (long)pack.Read();
                this.ManufacturerSite      = (string)pack.Read();
                this.LastUseDate           = (DateTime)pack.Read();
                this.Custom                = (bool)pack.Read();
                this.RelativeCustomPath    = (string)pack.Read();
            }

            Tags.PopCopy(result);
        }
        protected override void OnPopCopy(WorkingCopyResult result)
        {
            ObjectsPack pack = CopyStack.Pop();

            this.Value = (T)pack.Read();
        }