public bool Add(Svt.Caspar.CasparCGItem item)
 {
     if (item != null)
     {
         return(Add(item, item.Layer));
     }
     return(false);
 }
Пример #2
0
        public void Add(CasparCGItem item, bool bPlayOnLoad)
        {
            bool bAutoPlay = item.AutoPlay || bPlayOnLoad;

            if (item.VideoLayer == -1)
            {
                Channel.Connection.SendString("CG " + Channel.ID + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\"");
            }
            else
            {
                Channel.Connection.SendString("CG " + Channel.ID + "-" + item.VideoLayer + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\"");
            }
        }
Пример #3
0
		public RundownItem()
		{
			StaticItem = new Svt.Caspar.CasparItem(string.Empty);
            StaticItem.Transition.Duration = 12;
            StaticItem.VideoLayer = -1;
			CGItem = new Svt.Caspar.CasparCGItem();
            CGItem.VideoLayer = -1;
			IsCG = true;
            IsControl = false;
			MultiStep = false;
			IsStoredData = false;
            IsDataUpdate = false;
			IsStarted = false; 
            Color = Color.FromName(Properties.Settings.Default.TemplateColor);
			Name = Channel = string.Empty;
            Page = string.Empty;

            Online = false;
		}
Пример #4
0
 public void Add(CasparCGItem item, bool bPlayOnLoad)
 {
     bool bAutoPlay = item.AutoPlay || bPlayOnLoad;
     if (item.VideoLayer == -1)
         Channel.Connection.SendString("CG " + Channel.ID + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\"");
     else
         Channel.Connection.SendString("CG " + Channel.ID + "-" + item.VideoLayer + " ADD " + item.Layer + " \"" + item.TemplateIdentifier + "\" " + (bAutoPlay ? "1" : "0") + " \"" + item.XMLData + "\"");
 }
Пример #5
0
 public void Add(int videoLayer, int layer, CasparCGItem item, bool bPlayOnLoad)
 {
     item.VideoLayer = videoLayer;
     item.Layer = layer;
     Add(item, bPlayOnLoad);
 }
Пример #6
0
 public void Add(int layer, CasparCGItem item)
 {
     item.Layer = layer;
     Add(item, false);
 }
Пример #7
0
 public void Add(CasparCGItem item)
 {
     Add(item, false);
 }
Пример #8
0
 public void Add(int videoLayer, int layer, CasparCGItem item, bool bPlayOnLoad)
 {
     item.VideoLayer = videoLayer;
     item.Layer      = layer;
     Add(item, bPlayOnLoad);
 }
Пример #9
0
 public void Add(int layer, CasparCGItem item)
 {
     item.Layer = layer;
     Add(item, false);
 }
Пример #10
0
 public void Add(CasparCGItem item)
 {
     Add(item, false);
 }
Пример #11
0
        private void button1_Click(object sender, EventArgs e)
        {
            var cg = new CasparCGItem("time", NowNextCgLayer, false);

            var cgxml = new List<CGDataPair>{new CGDataPair("f0", "Olly Murs"), new CGDataPair("f1", "Dance with me tonight")};
            cg.Data.AddRange(cgxml);

            _casparDevice.Channels[casparServerChannelID].CG.Add(cg, false);
            _casparDevice.Channels[casparServerChannelID].CG.Play(NowNextCgLayer);
        }