private void btnBTPrinter_Click(object sender, EventArgs e) { Comm.BT.BTPort btPort = new Comm.BT.BTPort(); BluetoothConnect dlg = new BluetoothConnect(ref btPort); dlg.ShowDialog(); }
private void mnuConnectBT_Click(object sender, EventArgs e) { byte[] bdAddress = new byte[6]; BluetoothConnect dlg = new BluetoothConnect(ref btport); if (dlg.ShowDialog() == DialogResult.OK) { bUseSocket = true; bdAddress = dlg.bdAddress; dlg.Dispose(); showLangSelect(ref comport, ref btport); } else dlg.Dispose(); }
private void mnuSocketConnect_Click(object sender, EventArgs e) { byte[] bdAddress = new byte[6]; BluetoothConnect dlg = new BluetoothConnect(ref btport); if (dlg.ShowDialog() == DialogResult.OK) { bUseSocket = true; bdAddress = dlg.bdAddress; } dlg.Dispose(); //if (bUseSocket) //{ // if (_thread == null) // { // System.Net.Sockets.NetworkStream ns = connectBT(bdAddress); // if (ns != null) // { // _thread.BTDataReceived += new myThread.BTDataReceivedEventHandler(_thread_BTDataReceived); // _thread = new myThread(ref ns); // } // } //} }
private void btnBTPrinter_Click(object sender, EventArgs e) { Comm.BT.BTPort btPort = new Comm.BT.BTPort(); BluetoothConnect dlg = new BluetoothConnect(ref btPort); dlg.ShowDialog(); if (dlg.DialogResult == DialogResult.OK) ; }
private void mnuSocketConnect_Click(object sender, EventArgs e) { byte[] bdAddress = new byte[6]; BluetoothConnect dlg = new BluetoothConnect(ref btport); if (dlg.ShowDialog() == DialogResult.OK) { bUseSocket = true; bdAddress=dlg.bdAddress; } dlg.Dispose(); //if (bUseSocket) //{ // if (_thread == null) // { // System.Net.Sockets.NetworkStream ns = connectBT(bdAddress); // if (ns != null) // { // _thread.BTDataReceived += new myThread.BTDataReceivedEventHandler(_thread_BTDataReceived); // _thread = new myThread(ref ns); // } // } //} }