Exemple #1
0
        private void btnBTPrinter_Click(object sender, EventArgs e)
        {
            Comm.BT.BTPort   btPort = new Comm.BT.BTPort();
            BluetoothConnect dlg    = new BluetoothConnect(ref btPort);

            dlg.ShowDialog();
        }
Exemple #2
0
 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();
 }
Exemple #3
0
        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);
            //        }
            //    }
            //}
        }
Exemple #4
0
 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)
         ;
 }
Exemple #5
0
 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);
     //        }
     //    }
     //}
 }