Esempio n. 1
0
 public MusicPlayer(Settings settings)
 {
     for (int i = 1; i <= settings.GetInt("General", "Rows"); i++)
     {
         for (int j = 1; j <= settings.GetInt("General", "Columns"); j++)
         {
             mediaPlayers.Add("Button" + i + j, new MediaPlayer());
             Load("Button" + i + j, settings.GetString("Button" + i + j, "File"));
         }
     }
 }
Esempio n. 2
0
        public ButtonEdit(Settings settings, String target)
        {
            InitializeComponent();

            Brush backgroundBrush = settings.GetButtonBrush(target, "Background");
            if (backgroundBrush.GetType() == typeof(ImageBrush))
            {
                backgroundTypeImage.IsChecked = true;
                backgroundUri.Text = settings.GetString(target, "Background");
            }
            else if (backgroundBrush.GetType() == typeof(SolidColorBrush))
            {
                backgroundTypeColor.IsChecked = true;
                backgroundColor.SelectedColor = settings.GetColor(target, "Background");
            }

            foregroundColor.SelectedColor = settings.GetColor(target, "Foreground");
            foregroundText.Text = settings.GetString(target, "Text");

            musicfileUri.Text = settings.GetString(target, "File");
        }