presence/Presence.Desktop/Views/MainWindow.axaml.cs
2024-12-16 07:10:04 +03:00

28 lines
773 B
C#

using Avalonia.Controls;
using Avalonia.Interactivity;
using domain.UseCase;
using Presence.Desktop.ViewModels;
namespace Presence.Desktop.Views
{
public partial class MainWindow : Window
{
public MainWindow(GroupUseCase groupUseCase)
{
InitializeComponent();
DataContext = new MainWindowViewModel(groupUseCase);
}
private void OnDeleteUserClick(object sender, RoutedEventArgs e)
{
var viewModel = (MainWindowViewModel)DataContext;
viewModel.OnDeleteUserClick();
}
private void OnEditUserClick(object sender, RoutedEventArgs e)
{
var viewModel = (MainWindowViewModel)DataContext;
viewModel.OnEditUserClick();
}
}
}