I have this code which was written in VB and works in VB, but I have started to convert it to c#. But now I'm stuck. Can somebody help me to finish the conversion please. This is as far as I could get.
Expand|Select|Wrap|Line Numbers
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Threading;
- using System.IO;
- namespace Vision
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- picOutputLeft.SizeMode = PictureBoxSizeMode.StretchImage;
- picOutputRight.SizeMode = PictureBoxSizeMode.StretchImage;
- myCamLeft = new ICam();
- myCamRight = new ICam;
- myCamLeft.initCam(picOutputLeft.Handle.ToInt32);
- myCamRight.initCam(picOutputRight.Handle.ToInt32);
- }
- public myCamLeft as ICam;
- public myCamRight as ICam;
- private void btnViewLeftStill_Click(object sender, EventArgs e)
- {
- if (myCamLeft.iRunning = true)
- {
- FrmImage FrmImage = new FrmImage();
- FrmImage.picImage.Image = myCamLeft.copyFrame(picOutputLeft, new RectangleF(0, 0, picOutputLeft.Width, picOutputLeft.Height));
- FrmImage.Show();
- }
- else
- {
- MessageBox.Show("Left Camera Is Not Running!");
- }
- }
- public void btnViewRightStill_Click(object sender, EventArgs e)
- {
- if (myCamRight.iRunning = true)
- {
- FrmImage FrmImage = new FrmImage();
- FrmImage.picImage.Image = myCamRight.copyFrame(picOutputRight, new RectangleF(40, 0, picOutputRight.Width, picOutputRight.Height));
- FrmImage.Show();
- }
- else
- {
- MessageBox.Show("Right Camera Is Not Running!");
- }
- }
- }
- }