Пример #1
0
 public LiveViewForm(BluetoothConnector connector)
 {
     InitializeComponent();
       _connector = connector;
       _connector.SubscribeTo(OnMessageReceived, BluetoothCommandResponse.AllPositions);
       _creator = new DriveImageCreator();
       _bitmap = new Bitmap(image.Width, image.Height);
       image.Image = _bitmap;
       _shallRefresh = true;
 }
Пример #2
0
 public FormDriveControl()
 {
     InitializeComponent();
       _connector = new BluetoothConnector();
       _connector.SubscribeTo(_connector_OnMessageReceived, BluetoothCommandResponse.Started,
                                                    BluetoothCommandResponse.Status,
                                                    BluetoothCommandResponse.TrackReceived);
       _connectWorker = new BackgroundWorker();
       _connectWorker.DoWork += ConnectWorkerOnDoWork;
       _connectWorker.RunWorkerCompleted += ConnectWorkerRunWorkerCompleted;
       _discoverWorker = new BackgroundWorker();
       _discoverWorker.DoWork += DiscoverWorkerOnDoWork;
       _discoverWorker.RunWorkerCompleted += DiscoverWorkerOnRunDiscoverWorkerCompleted;
 }