/// <summary> /// Initialize all the components /// </summary> public MainGUI() { InitializeComponent(); m_camCapture = CamCapture.getInstance(); //Set up combo box with devices m_capDevBinding = new BindingSource(); m_capDevBinding.DataSource = CamCapture.CapDev; comboBox1.DisplayMember = "Name"; /* use Name feild for display */ comboBox1.ValueMember = "DevicePath"; /* use DevicePath (moniker) for value */ comboBox1.DataSource = m_capDevBinding.DataSource; mainAlteredFeed.SizeMode = PictureBoxSizeMode.StretchImage; capturePic.SizeMode = PictureBoxSizeMode.StretchImage; testingPic.SizeMode = PictureBoxSizeMode.StretchImage; transperency.SizeMode = PictureBoxSizeMode.StretchImage; //Set up processing m_processing = Processing.getInstance(); setupProcessingListener(); //I want to have the feed running right when the aplication starts m_camCapture.CaptureWindow = mainLiveFeed; m_camCapture.start(); }
/// <summary> /// Singleton instantiation /// </summary> /// <returns>A running instance if one exists or create a blank one</returns> public static CamCapture getInstance() { if (m_instance == null) { m_instance = new CamCapture(); } return(m_instance); }