protected virtual void Dispose(bool disposing) { if (disposing) { if (_form != null) { MethodInvoker dlgt = DisposeForm; _form.Invoke(dlgt); _form = null; // if (_formThread != null) { int bigTimeoutAllowForDebugging = 60 * 1000; bool terminated = _formThread.Join(bigTimeoutAllowForDebugging); Debug.Assert(terminated, "!terminated"); if (_formThreadException != null) { throw _formThreadException; } _formThread = null; } } } }
private void CreateForm() { _form = new BtEventsForm(this); _form.btRegister(_bluetoothRadioHandle); }