/// <summary>
        /// Enable/Disable Decklink output
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void checkBoxOutput_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBoxOutput.Checked)
            {
                try
                {
                    m_objRenderer.PropsSet("rate-control", "true");
                    m_objRenderer.DeviceSet("renderer", comboBoxRenderer.SelectedItem.ToString(), "");

                    if (textBoxNDIWebRTCName.Enabled && !String.IsNullOrEmpty(textBoxNDIWebRTCName.Text))
                    {
                        m_objRenderer.DeviceSet("renderer::line-out", textBoxNDIWebRTCName.Text, "");
                    }

                    m_objRenderer.ObjectStart(m_objMixer);
                }
                catch
                {
                    checkBoxOutput.Checked = false;
                    throw;
                }
            }
            else
            {
                try
                {
                    m_objRenderer.ObjectClose();
                }
                catch
                {
                    checkBoxOutput.Checked = false;
                    throw;
                }
            }
        }
示例#2
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (m_objFile != null)
     {
         m_objFile.ObjectClose();
     }
     if (m_objRenderer != null)
     {
         m_objRenderer.ObjectClose();
     }
     if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\settings.json"))
     {
         File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\settings.json");
     }
     System.IO.File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\settings.json", textBox3.Text);
 }