-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml.cs
30 lines (27 loc) · 944 Bytes
/
MainWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using MahApps.Metro.Controls;
using SistemaLibreriaImagina.Models;
using SistemaLibreriaImagina.ViewModels;
using System.Windows;
namespace SistemaLibreriaImagina
{
public partial class MainWindow : MetroWindow
{
private long usuario;
private USUARIO user;
private string token;
public MainWindow(USUARIO user, long usuario_id, string token)
{
InitializeComponent();
this.user = user;
this.usuario = usuario_id;
this.token = token;
WindowStartupLocation = WindowStartupLocation.CenterScreen;
// Asignar el token al ViewModel del MainWindow
var mainWindowViewModel = new MainWindowViewModel();
mainWindowViewModel.Token = token;
mainWindowViewModel.UserID = usuario_id;
mainWindowViewModel.Usuario = user;
DataContext = mainWindowViewModel;
}
}
}