using DNScanner.Scan; using System; using System.Windows.Forms; namespace WinFormsApp1 { public partial class Form1 : Form { private static HgScan scan; public Form1() { InitializeComponent(); scan = new HgScan(); } private void button1_Click(object sender, EventArgs e) { scan.initDriver(); scan.initInstance(); scan.scanExec(); } private void button2_Click(object sender, EventArgs e) { scan.stopscan(); } } }