Esempio n. 1
0
 private static void Connect()
 {
     if (casparCGServer?.IsConnected ?? false)
     {
         return;
     }
     casparCGServer.ConnectionStatusChanged += CasparDevice_ConnectionStatusChanged;
     casparCGServer.Connect("127.0.0.1");
 }
Esempio n. 2
0
        private void OnConnectCommand()
        {
            if (casparDevice.IsConnected)
            {
                return;
            }


            casparDevice.Connect("127.0.0.1");
        }
Esempio n. 3
0
 private static void Connect()
 {
     if (casparCGServer?.IsConnected ?? false)
     {
         return;
     }
     casparCGServer = _container.Resolve <ICasparDevice>();
     casparCGServer.ConnectionStatusChanged += CasparDevice_ConnectionStatusChanged;
     casparCGServer.Connect();
 }
Esempio n. 4
0
        private void BtnConnect_Click(object sender, RoutedEventArgs e)
        {
            //Handler to be notify if the Server is connected or disconnected
            //casparCGServer.ConnectionStatusChanged += CasparDevice_ConnectionStatusChanged;

            //MessageBox.Show(casparCGServer.ConnectionStatusChanged);


            //if (casparCGServer.IsConnected)
            //{
            //    //Disconnect the connection
            //    casparCGServer.Disconnect();
            //    //lblConnectStatus.Foreground = (Brush) "Red";
            //    lblConnectStatus.Content = "Not Connected.";
            //    btnConnect.Content = "Connect";
            //} else
            //{
            //Initialize the connection
            casparCGServer.Connect();
            //lblConnectStatus.Foreground = "Green";
            lblConnectStatus.Content = "Connected.";
            //btnConnect.Content = "Disconnect";
            //}
        }