// using System.Reflection;
using Windows.UI;
using Windows.UI.Xaml.Controls;
using Petzold.ProgrammingWindows6.Chapter11;

namespace ClockRack
{
    public sealed partial class SettingsDialog : UserControl
    {
        public SettingsDialog(TimeZoneManager timeZoneManager)
        {
            this.InitializeComponent();

            // Ustawienie ItemsSource for dla elementu ComboBox ze strefami czasowymi
            timeZoneComboBox.ItemsSource = timeZoneManager.DisplayInformation;

            // Ustawienie ItemsSource dla elementów ComboBox z kolorem zegara i tła
            foregroundComboBox.ItemsSource = NamedColor.All;
            backgroundComboBox.ItemsSource = NamedColor.All;
        }

        void OnLocationTextBoxTextChanged(object sender, TextChangedEventArgs args)
        {
            (this.DataContext as TimeZoneClockViewModel).Location = (sender as TextBox).Text;
        }
    }
}
