using ReAct_PME.ViewModels;
using System.Windows;
using System.Windows.Media;

namespace ReAct_PME
{
    /// <summary>
    /// Logique d'interaction pour ParametresFaceRecognition.xaml
    /// </summary>
    public partial class ParametresFaceRecognition : Window
    {
        ParametresFaceRecognition_VM _VM;
        public ParametresFaceRecognition()
        {
            InitializeComponent();
            _VM = new();
            this.DataContext = _VM;
        }


        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var b = _VM.SaveData();
            if (b)
            {
                Message.Text = "Données sauvegardées...";
                Message.Foreground = Brushes.Green;
            }
            else
            {
                Message.Text = "Erreur dans la sauvegarde des données...";
                Message.Foreground = Brushes.Red;

            }
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
