private void OnSelectResolution(object sender, EventArgs e) { if (toupcam_ != null) { uint eSize = 0; if (toupcam_.get_eSize(out eSize)) { if (eSize != comboBox1.SelectedIndex) { button2.ContextMenuStrip = null; toupcam_.Stop(); toupcam_.put_eSize((uint)comboBox1.SelectedIndex); InitSnapContextMenuAndExpoTimeRange(); OnEventTempTint(); int width = 0, height = 0; if (toupcam_.get_Size(out width, out height)) { bmp_ = new Bitmap(width, height, PixelFormat.Format24bppRgb); ev_ = new DelegateEvent(DelegateOnEvent); toupcam_.StartPullModeWithCallback(new ToupTek.ToupCam.DelegateEventCallback(DelegateOnEventCallback)); } } } } }
public bool setResolution(int mode) { bool ret = myCamera.put_eSize((uint)mode); return(ret); }