示例#1
0
        void m_Caspar_FailedConnect(object sender, Svt.Network.NetworkEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new EventHandler <NetworkEventArgs>(m_Caspar_FailedConnect), sender, e);
            }
            else
            {
                btnConnect.Enabled = true;
                UpdateConnectButtonText();

                lblStatus.BackColor = Color.LightCoral;
                lblStatus.Text      = "Failed to connect to " + m_Caspar.Settings.Hostname; // Properties.Settings.Default.Hostname;

                DisableControls();
            }
        }
示例#2
0
        void m_Caspar_Connected(object sender, Svt.Network.NetworkEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new EventHandler <NetworkEventArgs>(m_Caspar_Connected), sender, e);
            }
            else
            {
                btnConnect.Enabled = true;
                UpdateConnectButtonText();

                m_Caspar.RefreshMediafiles();
                m_Caspar.RefreshDatalist();


                lblStatus.BackColor = Color.LightGreen;
                lblStatus.Text      = "Connected to " + m_Caspar.Settings.Hostname; // Properties.Settings.Default.Hostname;

                EnableControls();
            }
        }
示例#3
0
        private void casparDevice_AMCPFailed_Connect(object sender, NetworkEventArgs e)
        {
            tmrConnectionCheck.Enabled = false;
            tmrClockStarts.Enabled = false;

            changeControlStatus(false);

            Invoke(new MethodInvoker(delegate
                                         {
                                             toolstriplabelAMCPConnected.BackColor = Color.Red;
                                             toolstriplabelAMCPConnected.Text = Resources.Form1_casparDevice_AMCPFailed_Connect_AMCP_Disconnected;
                                         }));
            changeControlStatus(false);

            DialogResult result =
                MessageBox.Show(
                    Resources.Form1_casparDevice_AMCPFailed_Connect_Cannot_connect_to_CasparCG_Server__ + casparServerIp + "\nDo you wish to wait to reconnect?",
                    Resources.Form1_tmrConnectionCheck_Tick_Important_Query, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (result != DialogResult.Yes)
            {
                Application.Exit();
            }

            _casparDevice.Connect();
        }
示例#4
0
 private void caspar_AMCP_Disconnected(object sender, NetworkEventArgs e)
 {
     Logger.Info("Caspar AMCInfoient Disconnected");
     casparDevice_AMCPFailed_Connect(sender, e);
 }
示例#5
0
        private void casparAmcpConnected(object sender, NetworkEventArgs e)
        {
            if (e == null) throw new ArgumentNullException("e");

            Logger.Info("Caspar AMCient Connected");
            changeControlStatus(true);
            label1.Text = "Connected to CasparCG Server... Waiting for Channels";
            changeControlStatus(false);
            //tmrConnectionCheck.Enabled = true;
            tmrClockStarts.Enabled = true;
            changeControlStatus(true);

            Invoke(new MethodInvoker(delegate
                                         {
                                             toolstriplabelAMCPConnected.BackColor = Color.Green;
                                             toolstriplabelAMCPConnected.Text = "AMCP Connected";
                                         }));
        }