添加项目文件。
This commit is contained in:
1 parent
54c7b83029
commit
ef50fa0620
84 files changed
+9188
No files matched your search
@@ -0,0 +1,51 @@
|
||||
using Prism.Ioc;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Services.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using Store.Management.Framework.Extensions;
|
||||
using Prism.Autofac;
|
||||
|
||||
namespace Store.Management.Framework;
|
||||
|
||||
public abstract class FrameworkApplication : PrismApplication
|
||||
{
|
||||
|
||||
protected FrameworkApplication()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
DISource.Resolver = Resolve;
|
||||
base.OnStartup(e);
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
(Container as IContainerExtension).RegisterDialog<DialogWindow>();
|
||||
base.OnInitialized();
|
||||
}
|
||||
|
||||
|
||||
private object Resolve(Type type, string name)
|
||||
{
|
||||
if (type == null || Container is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (name != null)
|
||||
{
|
||||
return Container.Resolve(type, name);
|
||||
}
|
||||
|
||||
return Container.Resolve(type);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user