private void notify_Clicked(object sender, EventArgs e) { if (SelectCharacteristic != null) { if (notify_btn.Text.ToLower() == "notify") { isnotify = true; notify_btn.Text = "Stop Notify"; SelectCharacteristic.NotifyEvent += SelectCharacteristic_NotifyEvent; SelectCharacteristic.Notify(); } else { isnotify = false; notify_btn.Text = "Notify"; SelectCharacteristic.StopNotify(); SelectCharacteristic.NotifyEvent -= SelectCharacteristic_NotifyEvent; } } }