框架优化
This commit is contained in:
27
LAEPS/ViewModels/ViewModelBase/DialogViewModelBase.cs
Normal file
27
LAEPS/ViewModels/ViewModelBase/DialogViewModelBase.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Notifications.Wpf.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LAEPS.ViewModels
|
||||
{
|
||||
public abstract class DialogViewModelBase : BindableBase,IDialogAware
|
||||
{
|
||||
public DialogCloseListener RequestClose { get; set; }
|
||||
public IEventAggregator _eventAggregator;
|
||||
private INotificationManager _notificationManager;
|
||||
public DialogViewModelBase(IContainerProvider containerProvider)
|
||||
{
|
||||
_eventAggregator = containerProvider.Resolve<IEventAggregator>();
|
||||
_notificationManager = containerProvider.Resolve<INotificationManager>();
|
||||
}
|
||||
#region Dialog
|
||||
|
||||
public virtual bool CanCloseDialog() => true;
|
||||
public virtual void OnDialogClosed() { }
|
||||
public virtual void OnDialogOpened(IDialogParameters parameters) { }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user