Files
6098/Cowain.Bake.UI/UserManagerment/Views/DeviceModeView.xaml.cs

24 lines
780 B
C#

using Cowain.Bake.UI.UserManagerment.ViewModels;
using Prism.Events;
using System.Windows;
using Unity;
using static Cowain.Bake.UI.UserManagerment.ViewModels.DeviceModeViewModel;
namespace Cowain.Bake.UI.UserManagerment.Views
{
/// <summary>
/// DeviceModeView.xaml 的交互逻辑
/// </summary>
public partial class DeviceModeView : Window
{
private IEventAggregator _eventAggregator;
public DeviceModeView(IUnityContainer unityContainer, IEventAggregator eventAggregator)
{
InitializeComponent();
_eventAggregator = eventAggregator;
_eventAggregator.GetEvent<CloseWindowEvent>().Subscribe(() => Close());
unityContainer.Resolve<DeviceModeViewModel>().Refresh();
}
}
}