예제 #1
0
        void CheckLineIn()
        {
            comboBoxVideoLine.Items.Clear();
            string strCurrent;
            string strOptions;
            string strHelp;
            int    nSel = -1;
            int    nCount;

            m_objLive.PropsGet("line-in", out strCurrent);

            m_objLive.PropsOptionGetCount("line-in", out nCount);
            if (nCount > 0)
            {
                for (int i = 0; i < nCount; i++)
                {
                    m_objLive.PropsOptionGetByIndex("line-in", i, out strOptions, out strHelp);
                    comboBoxVideoLine.Items.Add(strHelp);

                    if (strCurrent == strOptions)
                    {
                        nSel = i;
                    }
                }

                if (nSel >= 0)
                {
                    comboBoxVideoLine.SelectedIndex = nSel;
                }
                else
                {
                    comboBoxVideoLine.SelectedIndex = 0;
                }
            }
        }