using Client.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Client.View
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window, IClosable
    {
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = new MainWindowViewModel();
            this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight;
            this.MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var buttons = this.MainMenuPanel.Children.OfType<Button>();

            foreach(var button in buttons)
            {
                button.Style = this.FindResource("MainMenuButton") as Style;
            }
            var pressedButton = sender as Button;
            pressedButton.Style = this.FindResource("MainMenuButtonClicked") as Style;
        }
    }
}
