mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2025-12-06 07:12:04 +01:00
Clean up old messages on new device
This commit is contained in:
parent
adad914582
commit
9183781a5e
|
|
@ -68,6 +68,10 @@ namespace SampleApp.WinDesktop
|
||||||
satSnr.ClearGsv();
|
satSnr.ClearGsv();
|
||||||
//Start new device
|
//Start new device
|
||||||
currentDevice = device;
|
currentDevice = device;
|
||||||
|
foreach(var child in MessagePanel.Children.OfType<UnknownMessageControl>().ToArray())
|
||||||
|
{
|
||||||
|
MessagePanel.Children.Remove(child);
|
||||||
|
}
|
||||||
currentDevice.MessageReceived += device_MessageReceived;
|
currentDevice.MessageReceived += device_MessageReceived;
|
||||||
view2d.NmeaDevice = device;
|
view2d.NmeaDevice = device;
|
||||||
view3d.NmeaDevice = device;
|
view3d.NmeaDevice = device;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue