131 lines
3.7 KiB
C#
131 lines
3.7 KiB
C#
using System;
|
|
using System.Web;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
using System.Deployment.Application;
|
|
using SuperMap.RealEstate.Windows.Utility;
|
|
using SuperMap.RealEstate.Identity;
|
|
using System.Collections.Specialized;
|
|
using SuperMap.RealEstate.Windows;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.PrintCommodity
|
|
{
|
|
static class Program
|
|
{
|
|
#region 静态属性 -> Module_ID <-
|
|
public static string Module_ID
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
#region 静态属性 -> Module_Guid <-
|
|
public static string Module_Guid
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
#region 静态属性 -> Passport_Guid <-
|
|
public static string Passport_Guid
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
#region 静态属性 -> Passport_Name <-
|
|
public static string Passport_Name
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
#region 静态属性 -> AcceptCode <-
|
|
public static string AcceptCode
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
#region 静态属性 -> Archives_ID <-
|
|
public static string Archives_ID
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
#region 静态属性 -> ServerPart_ID <-
|
|
public static int ServerPart_ID
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 应用程序的主入口点。
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
{
|
|
//判断是否已有实例运行
|
|
//if (ApplicationHelper.ExistsProcess("TermiteControl.PrintCenter", ""))
|
|
//{
|
|
// return;
|
|
//}
|
|
|
|
//string Module_Guid = "bbc3f8a9-4f64-4d60-8acc-d373af47aa15";
|
|
#if DEBUG
|
|
args = new string[7];
|
|
args[0] = "http://localhost:8000";
|
|
//参数是加密的,避免中间出现空格等特殊字符
|
|
args[1] = "Arguments:68AE6B5DD7AAC86C";
|
|
args[2] = "PassportGuid:";
|
|
args[3] = "UserName:System";
|
|
args[4] = "Module_ID:"; //数字
|
|
args[5] = "ProInst_ID:"; //数字
|
|
args[6] = "NowActInst_ID:"; //数字
|
|
|
|
string Passport_Name = "system";
|
|
int ServerPart_ID = 25;
|
|
#else
|
|
NameValueCollection _NameValueCollection = new NameValueCollection();
|
|
_NameValueCollection = HttpUtility.ParseQueryString(ApplicationDeployment.CurrentDeployment.ActivationUri.Query);
|
|
Passport_Guid = _NameValueCollection.Get("Passport_Guid");
|
|
Passport_Name = _NameValueCollection.Get("Passport_Name");
|
|
Module_ID = _NameValueCollection.Get("Module_ID");
|
|
Module_Guid = _NameValueCollection.Get("Module_Guid");
|
|
ServerPart_ID = int.Parse(_NameValueCollection.Get("ServerPart_ID"));
|
|
#endif
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
try
|
|
{
|
|
//if (args.Length > 0)
|
|
//{
|
|
// //正式发布
|
|
// Application.Run(new frmPrintMain(Module_Guid, args, ServerPart_ID));
|
|
//}
|
|
//else
|
|
//{
|
|
// //调试模式
|
|
// Application.Run(new frmPrintMain(Module_Guid, Passport_Name, ServerPart_ID));
|
|
//}
|
|
Application.Run(new frmPrintMain());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
}
|
|
}
|