Пример #1
0
        private void CKProps_Click(object sender, EventArgs e)
        {
            if (dataGridViewStreams.SelectedRows != null && dataGridViewStreams.SelectedRows.Count > 0)
            {
                MCHROMAKEYLib.MChromaKey objChromaKey = GetChromakeyFilter(dataGridViewStreams.SelectedRows[0].Tag);
                if (objChromaKey != null)
                {
                    FormChromaKey formCK = new FormChromaKey(objChromaKey);

                    formCK.ShowDialog();
                }
            }
        }
Пример #2
0
        public Object SetControlledObject(Object pObject)
        {
            Object pOld = (Object)m_pChromaKey;

            try
            {
                m_pChromaKey = (MCHROMAKEYLib.MChromaKey)pObject;
                m_pChromaKey.KeyGet(null, out m_pKey, "");
                UpdateKey();

                mImageBoxPreview.ZoomToFit();                 //Zoom to fit picturebox and set minimum zoom
                comboBoxDetectType.SelectedIndex  = 0;
                comboScale.SelectedIndex          = 0;
                mCollapsibleGroupBox1.IsCollapsed = true;
            }
            catch (System.Exception ex)
            {
            }

            return(pOld);
        }
Пример #3
0
 private MCHROMAKEYLib.MChromaKey GetChromakeyFilter(object source)
 {
     MCHROMAKEYLib.MChromaKey pChromaKey = null;
     try
     {
         int       nCount   = 0;
         IMPlugins pPlugins = (IMPlugins)source;
         pPlugins.PluginsGetCount(out nCount);
         for (int i = 0; i < nCount; i++)
         {
             object pPlugin;
             long   nCBCookie;
             pPlugins.PluginsGetByIndex(i, out pPlugin, out nCBCookie);
             try
             {
                 pChromaKey = (MCHROMAKEYLib.MChromaKey)pPlugin;
                 break;
             }
             catch { }
         }
     }
     catch { }
     return(pChromaKey);
 }