private void BTDisconnect() { btConnect.Text = "Connect"; if (k9BTSocket == null) { K9Helper.dialogOKBox("BT was not connected!", this); return; } k9BTSocket.Close(); K9Helper.dialogOKBox("Disconnected!", this); txInfo.Text = "Disconnected."; }
private void BTConnect() { txInfo.Text = "Connecting.."; btConnect.Text = "Connect"; K9Bluetooth bt = new K9Bluetooth(); string message = string.Empty; bool IsConnected = bt.Connect(this.ApplicationContext, btConnect, out k9BTSocket, out message); if (!IsConnected) { K9Helper.dialogOKBox("Failed to connect.." + message, this); txInfo.Text = "Connect failed"; btConnect.Text = "Connect"; } txInfo.Text = "Connected."; }