public CounterpartScanService(CounterpartScanServiceCallback cb) { this.callback = cb; this.connTimer = new Timer(20000D); this.connTimer.Elapsed += (sender, args) => { if (!m_connected) { try { m_wlanInterface.Scan(); m_wlanInterface.DeleteProfile(m_cur_profile); App.WriteLog("Connect error: (" + m_cur_profile + ") release token and delelte profile anyway.", Log.MsgType.Information); } catch { } if (callback != null) callback.ConnFailed(); } stop_scan = false; connTimer.Stop(); }; }
public static CounterpartScanService GenerateScanSoftApService(CounterpartScanServiceCallback cb) { return new CounterpartScanService(cb); }