Develop #10

Merged
SemvdH merged 229 commits from develop into master 2020-10-29 22:50:49 +00:00
Showing only changes of commit 2cb3fd5ec3 - Show all commits

View File

@@ -16,6 +16,7 @@ using System.Windows.Shapes;
using ClientApp.Utils;
using Hardware.Simulators;
using System.Threading;
using ProftaakRH;
namespace ClientApp
{
@@ -24,31 +25,33 @@ namespace ClientApp
/// </summary>
public partial class MainWindow : Window
{
private IHandler handler;
public MainWindow()
{
Client client = new Client();
InitializeComponent();
DataContext = new MainWindowViewModel(client);
//BLEHandler bLEHandler = new BLEHandler(client);
//bLEHandler.Connect();
//client.setHandler(bLEHandler);
BikeSimulator bikeSimulator = new BikeSimulator(client);
Thread newThread = new Thread(new ThreadStart(bikeSimulator.StartSimulation));
newThread.Start();
client.SetHandler(bikeSimulator);
handler = bikeSimulator;
}
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
handler.stop();
}
}
}