26 lines
712 B
C#
26 lines
712 B
C#
using System.Windows;
|
|
using Livia.Utility.DependencyInjection;
|
|
using LiviaAdmin.ViewModels;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace LiviaAdmin.Views;
|
|
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow
|
|
{
|
|
private readonly MainWindowViewModel _viewModel;
|
|
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
_viewModel = ActivatorUtilities.GetServiceOrCreateInstance<MainWindowViewModel>(ServiceProviderFactory.ServiceProvider);
|
|
DataContext = _viewModel;
|
|
}
|
|
|
|
private void GenerateAuthenticationKeyButtonClick(object sender, RoutedEventArgs e)
|
|
{
|
|
_viewModel.GenerateAuthenticationKey();
|
|
}
|
|
} |