using System;
using System.Collections.Generic;
using System.Text;
using Matrox.MatroxImagingLibrary;
namespace MDigGrab
{
class Program
{
static void Main(string[] args)
{
MIL_ID MilApplication = MIL.M_NULL;
MIL_ID MilSystem = MIL.M_NULL;
MIL_ID MilDisplay = MIL.M_NULL;
MIL_ID MilDigitizer = MIL.M_NULL;
MIL_ID MilImage = MIL.M_NULL;
MIL.MappAllocDefault(MIL.M_DEFAULT, ref MilApplication, ref MilSystem, ref MilDisplay, ref MilDigitizer, ref MilImage);
MIL.MdigGrabContinuous(MilDigitizer, MilImage);
Console.Write("\nDIGITIZER ACQUISITION:\n");
Console.Write("----------------------\n\n");
Console.Write("Continuous image grab in progress.\n");
Console.Write("Press <Enter> to stop.\n\n");
Console.ReadKey();
MIL.MdigHalt(MilDigitizer);
Console.Write("Continuous grab stopped.\n\n");
Console.Write("Press <Enter> to do a single image grab.\n\n");
Console.ReadKey();
MIL.MdigGrab(MilDigitizer, MilImage);
Console.Write("Displaying the grabbed image.\n");
Console.Write("Press <Enter> to end.\n\n");
Console.ReadKey();
MIL.MappFreeDefault(MilApplication, MilSystem, MilDisplay, MilDigitizer, MilImage);
}
}
}