using Example;
using FreeSql;
using OrpaonEMS.App.Services;
using OrpaonEMS.App.ViewModels;
using OrpaonEMS.App.Views;
using OrpaonEMS.Core;
using OrpaonEMS.Model;
using Prism.DryIoc;
using Prism.Ioc;
using Prism.Regions;
using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace OrpaonEMS.App
{
///
/// Interaction logic for App.xaml
///
public partial class App : PrismApplication
{
public App()
{
try
{
//24.2.7
//Syncfusion.SfSkinManager.SfSkinManager.ApplyStylesOnApplication = true;
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MzEyMzM3NkAzMjM0MmUzMDJlMzBHdjVKNUNpNWZxYXQwR05ZbVYvUEtzbGxXMnVxRjYvRGtLSlZUOGpjQW44PQ==");
//e0397905-7455-4533-8c7a-3ec89b68b2a7
// 授权 a717c797-59e3-48de-b6b4-574a4e03dc79
if (!HslCommunication.Authorization.SetAuthorizationCode("e0397905-7455-4533-8c7a-3ec89b68b2a7"))
{
//active failed
MessageBox.Show("授权失败!当前程序只能使用8小时!");
return;
}
else
{
//IsActive = true;
}
//SfSkinManager.ApplyStylesOnApplication = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
//string DataDirectory = AppDomain.CurrentDomain.BaseDirectory + @"Db\ems.db";//应用程序内部的Db信息
string DataDirectory = @"C:\Db\ems.db";//直接的路径信息
///
/// 注册服务
///
private EnergyStorageService energyStorageService { get; set; }
protected override Window CreateShell()
{
var container = ContainerLocator.Container;
var shell = container.Resolve