public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. _scanApi.SetNotification(this); _scanApi.Open(); _timer.Elapsed += (object sender, ElapsedEventArgs e) => InvokeOnMainThread(() => _scanApi.DoScanAPIReceive()); _timer.Interval = 200; _timer.Start(); }
public SocketScannerHelper() { if (MonoTouch.ObjCRuntime.Runtime.Arch == MonoTouch.ObjCRuntime.Arch.SIMULATOR) return; ScanApi = new ScanApiHelper (); ScanApi.Delegate = new ScanDelegate (this); ScanApi.Open (); timer = NSTimer.CreateRepeatingScheduledTimer (.2, () => { var r = ScanApi.DoScanApiReceive(); }); }
public SocketScannerHelper() { if (MonoTouch.ObjCRuntime.Runtime.Arch == MonoTouch.ObjCRuntime.Arch.SIMULATOR) { return; } ScanApi = new ScanApiHelper(); ScanApi.Delegate = new ScanDelegate(this); ScanApi.Open(); timer = NSTimer.CreateRepeatingScheduledTimer(.2, () => { var r = ScanApi.DoScanApiReceive(); }); }