You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.8 KiB
60 lines
1.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using SiaSun.LMS.Interface;
|
|
using System.Threading;
|
|
using System.Globalization;
|
|
using System.Resources;
|
|
using System.Windows.Forms;
|
|
using System.Diagnostics;
|
|
using log4net;
|
|
using System.Reflection;
|
|
|
|
|
|
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log4Net.config", Watch = true)]
|
|
namespace SiaSun.LMS.LED
|
|
{
|
|
static class Program
|
|
{
|
|
public static ILog _log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
|
|
|
public static string _BaseUrl = SiaSun.LMS.Common.StringUtil.GetConfig("SiaSunSrvUrl");
|
|
|
|
//BX-5M系列
|
|
public static SiaSun.LMS.Interface.I_LEDService _I_LEDService
|
|
{
|
|
get { return SiaSun.LMS.Common.WCFHelper.Create<I_LEDService>(string.Format(_BaseUrl + "/LEDService")); }
|
|
}
|
|
|
|
|
|
public static SiaSun.LMS.Interface.I_BaseService _I_BaseService
|
|
{
|
|
get { return SiaSun.LMS.Common.WCFHelper.Create<I_BaseService>(string.Format(_BaseUrl + "/BaseService")); }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 应用程序的主入口点。
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
|
|
using (Process p = SiaSun.LMS.Common.SingleInstance.GetRunningInstance())
|
|
{
|
|
if (p != null) //已经有应用程序副本执行
|
|
{
|
|
if (!SiaSun.LMS.Common.SingleInstance.HandleRunningInstance(p))
|
|
{
|
|
Application.Run(new Main());
|
|
}
|
|
p.Dispose();
|
|
}
|
|
else
|
|
{
|
|
Application.Run(new Main());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|