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.Navigation;
using System.Windows.Shapes;

namespace KoloryWPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Escape) Close();
        }

        /*
private Color KolorProstokąta
{
    get
    {
        return (rectangle.Fill as SolidColorBrush).Color;
    }
    set
    {
        (rectangle.Fill as SolidColorBrush).Color = value;
    }
}

private void Window_Closed(object sender, EventArgs e)
{
    Model.Kolor kolor = new Model.Kolor() { R = KolorProstokąta.R, B = KolorProstokąta.B, G = KolorProstokąta.G };
    Model.Ustawienia.Zapisz(kolor);
}
*/
    }
}
