using Avalonia.Controls;
using pavesys_iRAP.Business;
using System;
using System.Diagnostics;
using System.Linq;

namespace pavesys_iRAP.Views
{
    public partial class LoginPageView : UserControl
    {
        public LoginPageView()
        {
            InitializeComponent();

            //Código para focar no componente de input do login
            var txtLogin = this.FindControl<TextBox>("txtLogin");
            if(txtLogin != null )
            { 
                txtLogin.AttachedToVisualTree += (s, e) => txtLogin.Focus();
            }
        }

        private void Button_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
        {
            Environment.Exit(0);
        }

        private void Button_Click_1(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
        {
            Debug.WriteLine("aaa");
        }
    }
}
    