Exemplo n.º 1
0
        public void AddElement(AElement element)
        {
            PlaylistElement newElementToAdd = new PlaylistElement(element);

            this._elements.Add(newElementToAdd);
            List <DataPikoClient.PlaylistElementData> elementsData = new List <DataPikoClient.PlaylistElementData>();

            if (this.Data.Elements != null && this.Data.Elements.Length > 0)
            {
                elementsData.AddRange(this.Data.Elements);
            }
            elementsData.Add(newElementToAdd.Data);
            this.Data.Elements = elementsData.ToArray();
        }
Exemplo n.º 2
0
 public PlaylistElement(AElement Element, DataPikoClient.StartMode Mode = DataPikoClient.StartMode.Auto)
 {
     this._element = Element;
     this.Data     = new DataPikoClient.PlaylistElementData();
     if (this._element != null)
     {
         if (this.Element is Support)
         {
             Support Support = ((Support)this.Element);
             this.Data.Uid         = Support.Data.UIdSupport;
             this.Data.Title       = String.IsNullOrEmpty(Support.Data.Title) ? "" : Support.Data.Title;
             this.Data.FileName    = Support.Data.FileName;
             this.Data.TCIn        = 0;
             this.Data.Duration    = 0;
             this.Data.FrameRate   = DataPikoClient.FrameRate.PAL;
             this.Data.ElementType = DataPikoClient.ElementType.Support;
         }
         else
         {
             this.Data.Uid         = new Guid().ToString();
             this.Data.Title       = "";
             this.Data.ElementType = DataPikoClient.ElementType.Break;
         }
         this.Data.StartMode = Mode;
     }
     else
     {
         //Default
         this.Data.Uid         = new Guid().ToString();
         this.Data.Title       = "";
         this.Element          = null;
         this.Data.TCIn        = 0;
         this.Data.FrameRate   = DataPikoClient.FrameRate.PAL;
         this.Data.Duration    = 0;
         this.Data.StartMode   = DataPikoClient.StartMode.Auto;
         this.Data.ElementType = DataPikoClient.ElementType.Break;
     }
 }