コード例 #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();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: hjgode/pricemarkdown
 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();
 }
コード例 #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);
            //        }
            //    }
            //}
        }
コード例 #4
0
ファイル: ConnectDlg.cs プロジェクト: hjgode/pricemarkdown
 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)
         ;
 }
コード例 #5
0
ファイル: Form1.cs プロジェクト: andrejpanic/win-mobile-code
 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);
     //        }
     //    }
     //}
 }