using HH.WMS.BLL;
|
using HH.WMS.Common;
|
using HH.WMS.Entitys;
|
using HH.WMS.Entitys.Sys;
|
using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Configuration;
|
using System.Linq;
|
using System.ServiceProcess;
|
using System.Threading.Tasks;
|
using System.Windows.Forms;
|
|
namespace HH.WMS.CoreServer
|
{
|
static class Program
|
{
|
/// <summary>
|
/// 应用程序的主入口点。
|
/// </summary>
|
[STAThread]
|
static void Main()
|
{
|
|
#region 初始化加载系统配置
|
try
|
{
|
string wms_ipAddress = ConfigurationManager.AppSettings["wms_ipAddress"].ToString();
|
if (wms_ipAddress != "")
|
{
|
//获取服务端配置的Config
|
Constants.SysConfig.WMS_API= wms_ipAddress;
|
string strResult = WebApiManager.HttpWMS_Get("api/Login/InitConfig");
|
OperateResult or = JsonConvert.DeserializeObject<OperateResult>(strResult);
|
if (or.Status == ResultStatus.Success)
|
{
|
Constants.SysConfig = JsonConvert.DeserializeObject<SysConfigParamEntity>(or.Data.ToString());
|
Constants.SysConfig.WMS_API=wms_ipAddress;
|
}
|
}
|
}
|
catch (Exception ex)
|
{
|
}
|
#endregion
|
|
Application.EnableVisualStyles();
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
Application.Run(CoreMain.GetInstance());
|
//Application.Run(new HH.WMS.CoreServer.Service.Wave());
|
|
//ServiceBase[] ServicesToRun;
|
//ServicesToRun = new ServiceBase[]
|
//{
|
// new U8DataAynchronizationService()
|
//};
|
//ServiceBase.Run(ServicesToRun);
|
}
|
}
|
}
|