From 487e963b081d7ffe2ddf489e11d927982c9101a6 Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 2 Sep 2011 15:43:24 +0000 Subject: debut implementation remove strip --- ProjectedStripBoard/FormProjectedStripBoard.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ProjectedStripBoard/FormProjectedStripBoard.cs b/ProjectedStripBoard/FormProjectedStripBoard.cs index 41fb303..8dd4436 100644 --- a/ProjectedStripBoard/FormProjectedStripBoard.cs +++ b/ProjectedStripBoard/FormProjectedStripBoard.cs @@ -152,6 +152,7 @@ namespace ProjectedStripBoard IvyBus.ivy.Start(IvyDomaine); // IvyBus.ivy.BindMsg(@"^ShowStrip FlightId=([0-9]+) Name=(.*) Show=(True|False) x=(.*) y=(.*)", ShowStrip, null); IvyBus.ivy.BindMsg(@"^MarkerMoveCalibrated cam=(.*) id=(.*) time=(.*) confidence=(.*) area=(.*) dir=(.*) x=(.*) y=(.*)", ShowStrip, null); + IvyBus.ivy.BindMsg(@"^MarkerRemove cam=(.*) id=(.*)", UnShowStrip ); IvyBus.ivy.BindMsg(@"^SeleteAircraftFromRadarScreen AircraftId=(.*)", SeleteAircraftFromRadarScreen, null); @@ -276,7 +277,28 @@ namespace ProjectedStripBoard RebuildTexture(); }*/ } + /// + /// IvyBus.ivy.BindMsg(@"^ + /// MarkerMove cam=(.*) id=(.*) time=(.*) confidence=(.*) area=(.*) dir=(.*) x=(.*) y=(.*) distance=(.*)", ShowStrip, null); + /// 0 1 2 3 4 5 6 7 8 + /// + /// + /// + private void UnShowStrip(object sender, IvyMessageEventArgs e) + { + string camId = e[0]; + int markerId = int.Parse(e[1]); + //Find the corresponding strip + int idIndex = -1; + //remove the strip if all tags not vilible + ProjectedStrip strip = ProjectedStrip.FindStrip(ProjectedStrips, markerId, out idIndex); + if (strip != null) + { + //strip. + NeedRefresh = true; + } + } private void RebuildTexture() { NeedRefresh = true; -- cgit v1.1