Example #1
0
        public bool Connect(string cgIp, int port)
        {
            if (caspar_ == null || caspar_.Settings.Hostname != cgIp || caspar_.Settings.Port != port)
            {
                if (caspar_ != null)
                {
                    caspar_.Disconnect();
                }

                caspar_              = new CasparDevice();
                caspar_.CGRetrieved += caspar__CGRetrieved;
                caspar_.Cleared     += caspar__Cleared;
                caspar_.Played      += caspar__Played;
                caspar_.Loadbged    += caspar__Loadbged;
                caspar_.Swaped      += caspar__Swaped;
                caspar_.Mixered     += caspar__Mixered;

                caspar_.Connect(cgIp, port, true);
                caspar_.Settings.Hostname = cgIp;
                caspar_.Settings.Port     = port;

                Thread.Sleep(1000);
            }
            return(caspar_.IsConnected);
        }
Example #2
0
 public PlayoutJobResultListPrewarned(CasparDevice device, string templateFolder, EmmaMysqlClient emmaClient,
                                      int[] prewarningControls) :
     base(device, templateFolder)
 {
     m_prewarningControls             = prewarningControls;
     m_emmaMysqlClient                = emmaClient;
     m_emmaMysqlClient.ResultChanged += M_emmaMysqlClient_ResultChanged;
 }
Example #3
0
 public PlayoutJobResultList(CasparDevice device, string templateFolder, EmmaMysqlClient emmaClient, string className, int positionCode, string positionName) :
     base(device, templateFolder)
 {
     m_className          = className;
     m_resultPosition     = positionCode;
     m_resultPositionName = positionName;
     m_emmaMysqlClient    = emmaClient;
     UpdateCurrentResultList();
 }
        void caspar_UpdatedChannels(object sender, EventArgs e)
        {
            CasparDevice casparDevice = (CasparDevice)sender;

            if (casparDevice != null && devices_.ContainsKey(casparDevice.Settings.Hostname))
            {
                devices_[casparDevice.Settings.Hostname].HasValidConnection = true;
                UpdateValidConnections();
            }
        }
        void caspar_Disconnected(object sender, Svt.Network.NetworkEventArgs e)
        {
            CasparDevice casparDevice = (CasparDevice)sender;

            if (casparDevice != null && devices_.ContainsKey(casparDevice.Settings.Hostname))
            {
                devices_[casparDevice.Settings.Hostname].HasValidConnection = false;
                UpdateValidConnections();
            }
        }
 private void caspar_UpdatedTemplates(object sender, EventArgs e)
 {
     try
     {
         CasparDevice casparDevice = (CasparDevice)sender;
         if (devices_ != null && devices_.ContainsKey(casparDevice.Settings.Hostname))
         {
             OnUpdatedTemplates(devices_[casparDevice.Settings.Hostname]);
         }
     }
     catch { }
 }
Example #7
0
 public bool Disconnect()
 {
     if (caspar_ != null)
     {
         try
         {
             caspar_.Disconnect();
         }
         catch { }
     }
     caspar_ = null;
     return(true);
 }
Example #8
0
        private CasparDevice _casparCG; // declaratie voor referentie casparDevice

        // _________________________________ CLASS METHODS _________________________________

        public frmCasparSetup(CasparDevice CasparDevice)
        {
            InitializeComponent();

            // referentie casparDevice
            _casparCG = CasparDevice;

            // huidige settings tonen
            this.txtHost.Text  = _casparCG.Settings.Hostname;
            this.nudPort.Value = _casparCG.Settings.Port;

            // reset _hasChanges -> worden true gezet door initializeren components
            _hasChanges = false;
        }
        private DeviceHolder CreateDevice(string hostname, int port)
        {
            CasparDevice casparDevice = new CasparDevice();

            casparDevice.Settings.Hostname  = hostname;
            casparDevice.Settings.Port      = port;
            casparDevice.Connected         += new EventHandler <Svt.Network.NetworkEventArgs>(caspar_Connected);
            casparDevice.Disconnected      += new EventHandler <Svt.Network.NetworkEventArgs>(caspar_Disconnected);
            casparDevice.FailedConnect     += new EventHandler <Svt.Network.NetworkEventArgs>(caspar_FailedConnect);
            casparDevice.OnAsyncException  += new EventHandler <Svt.Network.ExceptionEventArgs>(casparDevice_OnAsyncException);
            casparDevice.UpdatedChannels   += new EventHandler <EventArgs>(caspar_UpdatedChannels);
            casparDevice.UpdatedTemplates  += new EventHandler <EventArgs>(caspar_UpdatedTemplates);
            casparDevice.UpdatedMediafiles += new EventHandler <EventArgs>(caspar_UpdatedMediafiles);

            return(new DeviceHolder(casparDevice));
        }
Example #10
0
        public MainForm()
        {
            InitializeComponent();
            cDevice     = new CasparDevice();
            cData       = new CasparCGDataCollection();
            playoutList = new Queue <SMSMessage>();
            cache       = new List <SMSMessage>();
            screenText  = new StringBuilder();
            playoutdataGridView.ColumnCount          = 4;
            playoutdataGridView.SelectionMode        = DataGridViewSelectionMode.FullRowSelect;
            playoutdataGridView.ColumnHeadersVisible = true;
            playoutdataGridView.Columns[0].Name      = "Time";
            playoutdataGridView.Columns[1].Name      = "Sender";
            playoutdataGridView.Columns[2].Name      = "Nickname";
            playoutdataGridView.Columns[3].Name      = "Message";

            m_conn    = new MySqlConnection();
            m_command = new MySqlCommand();
            string mConnectionString = "server=localhost;user=root;database=sms2tv;port=3306;password='';";

            m_conn.ConnectionString = mConnectionString;
            m_command.Connection    = m_conn;
            mds = new DataSet();
        }
 public void RefreshMediafiles()
 {
     CasparDevice.RefreshMediafiles();
 }
Example #12
0
 internal AMCPProtocolStrategy(CasparDevice device)
 {
     device_ = device;
     parser_.ResponseParsed += new EventHandler <AMCPParserEventArgs>(parser__ResponseParsed);
 }
Example #13
0
 public PlayoutJobTitle(CasparDevice device, string templateFolder, string name, string titleClub) :
     base(device, templateFolder)
 {
     m_name      = name;
     m_titleClub = titleClub;
 }
		internal AMCPProtocolStrategy(CasparDevice device)
		{
			device_ = device;
			parser_.ResponseParsed += new EventHandler<AMCPParserEventArgs>(parser__ResponseParsed);
		}
Example #15
0
 public PlayoutJobClock(CasparDevice device, string templateFolder, string refTime, bool showTenth) :
     base(device, templateFolder)
 {
     m_refTime   = refTime;
     m_showTenth = showTenth;
 }
Example #16
0
 protected PlayoutJob(CasparDevice device, string templateFolder)
 {
     m_casparDevice   = device;
     m_templateFolder = templateFolder;
 }
 public void RefreshTemplates()
 {
     CasparDevice.RefreshTemplates();
 }
 public DeviceHolder(CasparDevice device)
 {
     CasparDevice = device;
     Channels     = new List <CasparChannelInformation>();
 }
        void caspar_Connected(object sender, Svt.Network.NetworkEventArgs e)
        {
            CasparDevice casparDevice = (CasparDevice)sender;

            casparDevice.RefreshMediafiles();
        }