using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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 WpfBrowserApplication
{
    /// <summary>
    /// Interaction logic for PageFunction1.xaml
    /// </summary>
    public partial class PageFunction1 : PageFunction<Favourites>
    {
        public PageFunction1()
        {
            InitializeComponent();
        }


        void okButton_Click(object sender, RoutedEventArgs e)
        {
            // akceptacja i zwrocenie danych wartości
            Favourites favourites = new Favourites();
            favourites.Color = textColor.Text;
            favourites.Movie = textMovie.Text;
            OnReturn(new ReturnEventArgs<Favourites>(favourites));

        }

        void cancelButton_Click(object sender, RoutedEventArgs e)
        {
            // anulowanie i zwrócenie null 
            OnReturn(null);
        }
    }
}
