Exemplo n.º 1
0
        private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (bPluginLoaded)
            {
                freeframe.deInstantiate(instanceID);
                freeframe.Dispose();
                bPluginLoaded = false;
            }

            freeframe = new FreeFrame(Application.StartupPath + "\\plugins", listBox1.SelectedItem.ToString());             // "MultipleStripsNEW.dll" "PeteLiveFeed2.dll"

            //if((int) freeframe.Supports32BitVideo == (int) FreeFrame.ReturnCode.FF_SUPPORTED)
            //{
            //	instanceID = freeframe.instantiate(320, 240, (uint) FreeFrame.PixelFormat.Format32bppArgb,(uint) FreeFrame.Orientation.OriginTopLeft);
            //	webcam.PixelFormat = PixelFormat.Format32bppArgb;
            //}
            //else
            if ((int)freeframe.Supports24BitVideo == (int)FreeFrame.ReturnCode.FF_SUPPORTED)
            {
                instanceID         = freeframe.instantiate(320, 240, (uint)FreeFrame.PixelFormat.Format24bppRgb, (uint)FreeFrame.Orientation.OriginTopLeft);
                webcam.PixelFormat = PixelFormat.Format24bppRgb;
            }
            else
            {
                freeframe.Dispose();
                return;
            }

            listBox2.Items.Clear();
            foreach (String param in freeframe.parameterName)
            {
                listBox2.Items.Add(param);
            }

            bPluginLoaded = true;
            pictureBox2.Refresh();
        }
Exemplo n.º 2
0
		private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e)
		{
			if (bPluginLoaded)
			{
				freeframe.deInstantiate(instanceID);
				freeframe.Dispose();
				bPluginLoaded = false;
			}

			freeframe = new FreeFrame(Application.StartupPath + "\\plugins", listBox1.SelectedItem.ToString()); // "MultipleStripsNEW.dll" "PeteLiveFeed2.dll"
			
			//if((int) freeframe.Supports32BitVideo == (int) FreeFrame.ReturnCode.FF_SUPPORTED)
			//{
			//	instanceID = freeframe.instantiate(320, 240, (uint) FreeFrame.PixelFormat.Format32bppArgb,(uint) FreeFrame.Orientation.OriginTopLeft);
			//	webcam.PixelFormat = PixelFormat.Format32bppArgb;
			//}
			//else
			if((int) freeframe.Supports24BitVideo == (int) FreeFrame.ReturnCode.FF_SUPPORTED)
			{
				instanceID = freeframe.instantiate(320, 240, (uint) FreeFrame.PixelFormat.Format24bppRgb,(uint) FreeFrame.Orientation.OriginTopLeft);
				webcam.PixelFormat = PixelFormat.Format24bppRgb;
			}
			else
			{
				freeframe.Dispose();
				return;
			}

			listBox2.Items.Clear();
			foreach (String param in freeframe.parameterName)
			{
				listBox2.Items.Add(param);
			}

			bPluginLoaded = true;
			pictureBox2.Refresh();
		}