src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs
changeset 199 70e93b0bd778
parent 195 48b3139bb182
child 211 50e6fe2c2ea2
--- a/src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs	Fri Nov 13 22:11:50 2009 +0100
+++ b/src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs	Fri Nov 13 23:22:00 2009 +0100
@@ -81,7 +81,7 @@
                 // The orientation offset (default). 
                 tagDef.OrientationOffsetFromTag = 0.0;
                 // The physical offset (horizontal inches, vertical inches). 
-                tagDef.PhysicalCenterOffsetFromTag = new Vector(0.5, 0.25);
+                tagDef.PhysicalCenterOffsetFromTag = new Vector(0, 0);
                 // The tag removal behavior (default). 
                 tagDef.TagRemovedBehavior = TagRemovedBehavior.Fade;
                 // Orient UI to tag? (default). 
@@ -111,24 +111,20 @@
             //else if (((niveau == 1) || (niveau == 2) || (niveau == 3)) && lastSoundlevel == 0)
             else if (((niveau == 1) || (niveau == 2)) && lastSoundlevel == 0)
                 rise = true;
-
             
             if (!rise)
             {
                 niveau = (niveau - 10) % 10;
             }
-            //ToDo
-            //--1 Mute all other Players
-
-            //--2 Elipse visibility
-            tagsoundcontrol.TagVisuSoundLevelUpdate(niveau);
+            //--Elipse visibility
+            int elipseNB = tagsoundcontrol.TagVisuSoundLevelUpdate(niveau);
             //Set the Sound of the Player.
-            if (Math.Abs(lastSoundlevel - niveau) == 1)
+            if(elipseNB != -1)
             {
-                UserControlSyncSource.setUserPlayerVolume((double)niveau / 10.0);
+                UserControlSyncSource.setUserPlayerVolume(elipseNB/10.0);
             }
             lastSoundlevel = niveau;
-            tagsoundcontrol.volumeModel.Content = niveau;//deltaOrientation.ToString();
+            tagsoundcontrol.volumeModel.Content = elipseNB;//deltaOrientation.ToString();
 
         }
         private void OnVisualizationAdded(object sender, TagVisualizerEventArgs e)