--- a/src/FingersDance.Control.Pivot/UserControlPivot.xaml.cs Fri Oct 16 02:35:11 2009 +0200
+++ b/src/FingersDance.Control.Pivot/UserControlPivot.xaml.cs Fri Oct 16 03:37:48 2009 +0200
@@ -7,6 +7,7 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
+using FingersDance.Factory;
namespace FingersDance.Control.Pivot
{
@@ -65,5 +66,28 @@
{
SurfaceButtonPlayer4_ContactDown(this, null);
}
+
+ public void ApplyColor(int id, string color)
+ {
+ try
+ {
+ switch (id)
+ {
+ case 1:
+ SurfaceButtonPlayer1.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+ break;
+ case 2:
+ SurfaceButtonPlayer2.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+ break;
+ case 3:
+ SurfaceButtonPlayer3.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+ break;
+ case 4:
+ SurfaceButtonPlayer4.Background = (Brush)FindResource((new ColorFactory()).Colors[color]);
+ break;
+ }
+ }
+ catch (Exception) { }
+ }
}
}
\ No newline at end of file