private bool CheckValidity(string strName)
{
if (strName.EndsWith(".avi") == false)
{
MessageBox.Show("File name must end with .avi", "Invaild File Type", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("Fill in the empty box");
return false;
}
else
{
btnOpenFile.Enabled = false;
btnEnter.Enabled = true;
return true;
}
}
private void btnLoadImage_Click(object sender, EventArgs e)
{
if (objOpenFileDialog.ShowDialog() == DialogResult.OK)
{
AVIFileVideoSource fileSource = new AVIFileVideoSource(objOpenFileDialog.FileName);
OpenVideoSource(fileSource);
}
}