public DialogResult ShowDialog(MobileRemoteUI parentForm, WaitHandle waitResult, AddressSelector.BluetoothDevice device, BluetoothHidWriter hidWriter)
{
_statusLabel.Text = "Connecting...";
_hidWriter = hidWriter;
_waitResult = waitResult;
if (device.Address > 0)
{
_existingMachine.Dock = DockStyle.Fill;
_existingMachine.Visible = true;
_newMachineLabel.Visible = false;
}
else
{
_newMachineLabel.Dock = DockStyle.Fill;
_newMachineLabel.Visible = true;
_existingMachine.Visible = false;
}
timer1.Enabled = true;
if (waitResult.WaitOne(1000, false))
{
//return DialogResult.OK;
}
try
{
return base.ShowDialog(parentForm);
}
finally
{
timer1.Enabled = false;
}
}