Ejemplo n.º 1
0
        private void EnableControls()
        {
            bool isOffscreenAvailable = (m_sapDisplay != null) ? m_sapDisplay.IsOffscreenAvailable(m_format) : true;
            bool isOverLayAvailable   = (m_sapDisplay != null) ? m_sapDisplay.IsOverlayAvailable(m_format) : true;

            radioButton1_Offscreen_Video.Enabled = isOffscreenAvailable;
            radioButton1_Overlay.Enabled         = isOverLayAvailable;
            radioButton1_Virtual.Enabled         = !m_isXfer;
            textBox1_Width.Enabled   = !m_isXfer;
            textBox1_Height.Enabled  = !m_isXfer;
            comboBox1_Format.Enabled = !m_isXfer;

            // Is pixel depth adjustable?
            if (SapManager.GetPixelDepthMin(m_format) != SapManager.GetPixelDepthMax(m_format))
            {
                textBox1_PixelDepth.Enabled = true;
                textBox1_PixelDepth.Text    = m_pixelDepth.ToString();
            }
            else
            {
                textBox1_PixelDepth.Enabled = false;
            }
        }