Procházet zdrojové kódy

海康签到服务调试

大厂分支
liangkun před 4 roky
rodič
revize
1bb4e3f10f
7 změnil soubory, kde provedl 198 přidání a 202 odebrání
  1. +2
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ADR_Device/ADR_DeviceEntity.cs
  2. +1
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ADR_DeviceLog/ADR_DeviceLogEntity.cs
  3. +1
    -0
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config
  4. +2
    -2
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/CHCNetSDK.cs
  5. +192
    -108
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Service1.cs
  6. +0
    -60
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/_sgbak/ProjectInstaller.Designer.cs.14225.1.2020-01-10.16-40-55.0229
  7. +0
    -19
      Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/_sgbak/ProjectInstaller.cs.14224.1.2020-01-10.16-40-55.0289

+ 2
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ADR_Device/ADR_DeviceEntity.cs Zobrazit soubor

@@ -1,6 +1,7 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.InteropServices;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
@@ -11,6 +12,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2020-09-03 12:11
/// 描 述:考勤设备管理
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public class ADR_DeviceEntity
{
#region 实体成员
@@ -109,9 +111,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
this.Id = Guid.NewGuid().ToString();
this.F_CreateDate = DateTime.Now;
UserInfo userInfo = LoginUserInfo.Get();
this.F_CreateUserId = userInfo.userId;
this.F_CreateUserName = userInfo.realName;
}
/// <summary>
/// 编辑调用
@@ -121,9 +120,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
this.Id = keyValue;
this.F_ModifyDate = DateTime.Now;
UserInfo userInfo = LoginUserInfo.Get();
this.F_ModifyUserId = userInfo.userId;
this.F_ModifyUserName = userInfo.realName;
}
#endregion
#region 扩展字段


+ 1
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ADR_DeviceLog/ADR_DeviceLogEntity.cs Zobrazit soubor

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 日 期:2020-09-03 12:18
/// 描 述:考勤设备日志
/// </summary>
public class ADR_DeviceLogEntity
public class ADR_DeviceLogEntity
{
#region 实体成员
/// <summary>
@@ -74,9 +74,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
this.LogId = Guid.NewGuid().ToString();
this.F_CreateDate = DateTime.Now;
UserInfo userInfo = LoginUserInfo.Get();
this.F_CreateUserId = userInfo.userId;
this.F_CreateUserName = userInfo.realName;
}
/// <summary>
/// 编辑调用
@@ -86,9 +83,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
this.LogId = keyValue;
this.F_ModifyDate = DateTime.Now;
UserInfo userInfo = LoginUserInfo.Get();
this.F_ModifyUserId = userInfo.userId;
this.F_ModifyUserName = userInfo.realName;
}
#endregion
#region 扩展字段


+ 1
- 0
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/App.config Zobrazit soubor

@@ -23,6 +23,7 @@
<appSettings>
<add key="dbbackuppath" value="E:\西昌程序单校区版2019_09_16\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource\DataBaseBackup" />
<add key="AttendancePhotoPath" value="E:\西昌程序单校区版2019_09_16\Learun.Framework.Ultimate V7\Learun.Application.Web\Resource\AttendancePhoto" />
<add key="enableHK" value="true"/>
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">


+ 2
- 2
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/CHCNetSDK.cs Zobrazit soubor

@@ -22,7 +22,7 @@ namespace AlarmCSharpDemo
public const int MAX_NAMELEN = 16;//DVR本地登陆名
public const int ACS_CARD_NO_LEN = 32; //门禁卡号长度

public delegate void LOGINRESULTCALLBACK(int lUserID, int dwResult, IntPtr lpDeviceInfo, IntPtr pUser);
public delegate void LoginResultCallBack(int lUserID, uint dwResult, ref NET_DVR_DEVICEINFO_V30 lpDeviceInfo, IntPtr pUser);
/*********************************************************
Function: EXCEPYIONCALLBACK
Desc: (回调函数)
@@ -91,7 +91,7 @@ namespace AlarmCSharpDemo
public byte[] sUserName;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_LOGIN_PASSWD_MAX_LEN, ArraySubType = UnmanagedType.I1)]
public byte[] sPassword;
public LOGINRESULTCALLBACK cbLoginResult;
public LoginResultCallBack cbLoginResult;
public IntPtr pUser;
public bool bUseAsynLogin;
public byte byProxyType; //0:不使用代理,1:使用标准代理,2:使用EHome代理


+ 192
- 108
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/Service1.cs Zobrazit soubor

@@ -28,139 +28,223 @@ namespace Quanjiang.DigitalScholl.JobService
private ADR_RecordIBLL adrRecordIbll = new ADR_RecordBLL();

//海康考勤机回调
public CHCNetSDK.LOGINRESULTCALLBACK LoginCallBack = null;
public CHCNetSDK.LoginResultCallBack LoginCallBack = null;
private CHCNetSDK.EXCEPYIONCALLBACK m_fExceptionCB = null;
private CHCNetSDK.MSGCallBack_V31 m_falarmData_V31 = null;

public QuanjiangDigitalSchollJobService()
{
InitializeComponent();
GlobalConfiguration.Configuration.UseSqlServerStorage("HangfireConnString");
try
{
InitializeComponent();
GlobalConfiguration.Configuration.UseSqlServerStorage("HangfireConnString");
}
catch (Exception e)
{
ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
adrDeviceLogEntity.LogData = "服务初始化失败:" + e.Message + ",详细:" + e.StackTrace;
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
}
}

protected override void OnStart(string[] args)
{
var options = new BackgroundJobServerOptions
{
ServerName = "QuanjiangDigitalSchollJobService"
};
_server = new BackgroundJobServer(options);
//海康考勤机对接
#region 海康考勤机对接
//初始化SDK
bool m_bInitSDK = CHCNetSDK.NET_DVR_Init();
if (m_bInitSDK)
try
{
//保存SDK日志 To save the SDK log
CHCNetSDK.NET_DVR_SetLogToFile(3, "C:\\HKSdkLog\\", true);
var options = new BackgroundJobServerOptions
{
ServerName = "QuanjiangDigitalSchollJobService"
};
_server = new BackgroundJobServer(options);
if (!string.IsNullOrEmpty(ConfigurationManager.AppSettings["enableHK"])&&Convert.ToBoolean(ConfigurationManager.AppSettings["enableHK"]))
{
//海康考勤机对接
#region 海康考勤机对接
//初始化SDK
bool m_bInitSDK = CHCNetSDK.NET_DVR_Init();
if (m_bInitSDK)
{
//保存SDK日志 To save the SDK log
CHCNetSDK.NET_DVR_SetLogToFile(3, "C:\\HKSdkLog\\", true);

//设置透传报警信息类型
CHCNetSDK.NET_DVR_LOCAL_GENERAL_CFG struLocalCfg = new CHCNetSDK.NET_DVR_LOCAL_GENERAL_CFG();
struLocalCfg.byAlarmJsonPictureSeparate = 1;//控制JSON透传报警数据和图片是否分离,0-不分离(COMM_VCA_ALARM返回),1-分离(分离后走COMM_ISAPI_ALARM回调返回)
//设置透传报警信息类型
CHCNetSDK.NET_DVR_LOCAL_GENERAL_CFG struLocalCfg = new CHCNetSDK.NET_DVR_LOCAL_GENERAL_CFG();
struLocalCfg.byAlarmJsonPictureSeparate = 1;//控制JSON透传报警数据和图片是否分离,0-不分离(COMM_VCA_ALARM返回),1-分离(分离后走COMM_ISAPI_ALARM回调返回)

Int32 nSize = Marshal.SizeOf(struLocalCfg);
IntPtr ptrLocalCfg = Marshal.AllocHGlobal(nSize);
Marshal.StructureToPtr(struLocalCfg, ptrLocalCfg, false);
Int32 nSize = Marshal.SizeOf(struLocalCfg);
IntPtr ptrLocalCfg = Marshal.AllocHGlobal(nSize);
Marshal.StructureToPtr(struLocalCfg, ptrLocalCfg, false);

if (!CHCNetSDK.NET_DVR_SetSDKLocalCfg(17, ptrLocalCfg)) //NET_DVR_LOCAL_CFG_TYPE_GENERAL
{
string strErr = "海康NET_DVR_SetSDKLocalCfg 失败, error code= " + CHCNetSDK.NET_DVR_GetLastError();
ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
adrDeviceLogEntity.LogData = strErr;
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
}
Marshal.FreeHGlobal(ptrLocalCfg);
if (!CHCNetSDK.NET_DVR_SetSDKLocalCfg(17, ptrLocalCfg)) //NET_DVR_LOCAL_CFG_TYPE_GENERAL
{
string strErr = "海康NET_DVR_SetSDKLocalCfg 失败, error code= " + CHCNetSDK.NET_DVR_GetLastError();
ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
adrDeviceLogEntity.LogData = strErr;
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
}
Marshal.FreeHGlobal(ptrLocalCfg);

//设置异常消息回调函数
if (m_fExceptionCB == null)
{
m_fExceptionCB = new CHCNetSDK.EXCEPYIONCALLBACK(cbExceptionCB);
}
CHCNetSDK.NET_DVR_SetExceptionCallBack_V30(0, IntPtr.Zero, m_fExceptionCB, IntPtr.Zero);
//设置异常消息回调函数
if (m_fExceptionCB == null)
{
m_fExceptionCB = new CHCNetSDK.EXCEPYIONCALLBACK(cbExceptionCB);
}
CHCNetSDK.NET_DVR_SetExceptionCallBack_V30(0, IntPtr.Zero, m_fExceptionCB, IntPtr.Zero);

//设置报警回调函数
if (m_falarmData_V31 == null)
{
m_falarmData_V31 = new CHCNetSDK.MSGCallBack_V31(MsgCallback_V31);
}
CHCNetSDK.NET_DVR_SetDVRMessageCallBack_V31(m_falarmData_V31, IntPtr.Zero);
//设置报警回调函数
if (m_falarmData_V31 == null)
{
m_falarmData_V31 = new CHCNetSDK.MSGCallBack_V31(MsgCallback_V31);
}
CHCNetSDK.NET_DVR_SetDVRMessageCallBack_V31(m_falarmData_V31, IntPtr.Zero);

//获取设备
var devicelist = adrDeviceIbll.GetAllUnconnectedList(true);
//登录设备
foreach (var deviceEntity in devicelist)
{
CHCNetSDK.NET_DVR_USER_LOGIN_INFO struLogInfo = new CHCNetSDK.NET_DVR_USER_LOGIN_INFO();

//设备IP地址或者域名
byte[] byIP = System.Text.Encoding.Default.GetBytes(deviceEntity.IpAddress);
struLogInfo.sDeviceAddress = new byte[129];
byIP.CopyTo(struLogInfo.sDeviceAddress, 0);

//设备用户名
byte[] byUserName = System.Text.Encoding.Default.GetBytes(deviceEntity.AdminAccount);
struLogInfo.sUserName = new byte[64];
byUserName.CopyTo(struLogInfo.sUserName, 0);

//设备密码
byte[] byPassword = System.Text.Encoding.Default.GetBytes(deviceEntity.AdminPwd);
struLogInfo.sPassword = new byte[64];
byPassword.CopyTo(struLogInfo.sPassword, 0);

struLogInfo.wPort = ushort.Parse(deviceEntity.PortNumber.ToString());//设备服务端口号

struLogInfo.cbLoginResult = LoginCallBack;
struLogInfo.bUseAsynLogin = true; //是否异步登录:0- 否,1- 是
//用户数据,回调时可用
//获取大小
uint dwSize = (uint)Marshal.SizeOf(deviceEntity);
//分配内存
IntPtr ptrCond = Marshal.AllocHGlobal((int)dwSize);
//写入内存
Marshal.StructureToPtr(deviceEntity, ptrCond, false);
//用户数据,回调时可用
struLogInfo.pUser = ptrCond;
if ((struLogInfo.bUseAsynLogin == true) && (LoginCallBack == null))
//获取设备
var devicelist = adrDeviceIbll.GetAllUnconnectedList(true);
//登录设备
foreach (var deviceEntity in devicelist)
{
CHCNetSDK.NET_DVR_USER_LOGIN_INFO struLogInfo = new CHCNetSDK.NET_DVR_USER_LOGIN_INFO();

//设备IP地址或者域名
byte[] byIP = System.Text.Encoding.Default.GetBytes(deviceEntity.IpAddress);
struLogInfo.sDeviceAddress = new byte[129];
byIP.CopyTo(struLogInfo.sDeviceAddress, 0);

//设备用户名
byte[] byUserName = System.Text.Encoding.Default.GetBytes(deviceEntity.AdminAccount);
struLogInfo.sUserName = new byte[64];
byUserName.CopyTo(struLogInfo.sUserName, 0);

//设备密码
byte[] byPassword = System.Text.Encoding.Default.GetBytes(deviceEntity.AdminPwd);
struLogInfo.sPassword = new byte[64];
byPassword.CopyTo(struLogInfo.sPassword, 0);

struLogInfo.wPort = ushort.Parse(deviceEntity.PortNumber.ToString());//设备服务端口号
//用户数据,回调时可用
//获取大小
//uint dwSize = (uint)Marshal.SizeOf(deviceEntity);
////分配内存
//IntPtr ptrCond = Marshal.AllocHGlobal((int)dwSize);
////写入内存
//Marshal.StructureToPtr(deviceEntity, ptrCond, false);
////用户数据,回调时可用
//struLogInfo.pUser = ptrCond;
//struLogInfo.bUseAsynLogin = false; //是否异步登录:0- 否,1- 是
//struLogInfo.cbLoginResult = new CHCNetSDK.LoginResultCallBack(AsynLoginMsgCallback);//注册回调函数;

struLogInfo.byLoginMode = 0; //0-Private, 1-ISAPI, 2-自适应
struLogInfo.byHttps = 0; //0-不适用tls,1-使用tls 2-自适应

CHCNetSDK.NET_DVR_DEVICEINFO_V40 DeviceInfo = new CHCNetSDK.NET_DVR_DEVICEINFO_V40();
DeviceInfo.struDeviceV30.sSerialNumber = new byte[CHCNetSDK.SERIALNO_LEN];
//登录设备 Login the device
var lUserID = CHCNetSDK.NET_DVR_Login_V40(ref struLogInfo, ref DeviceInfo);
//释放内存
//Marshal.FreeHGlobal(ptrCond);
//同步登录方法
string strLoginCallBack = "";
if (lUserID < 0)
{
uint iErrCode = CHCNetSDK.NET_DVR_GetLastError();
strLoginCallBack = "登录设备失败,lUserID:" + lUserID + ",错误号:" + iErrCode;
ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
if (deviceEntity != null && !string.IsNullOrEmpty(deviceEntity.Id))
{
adrDeviceLogEntity.DeviceId = deviceEntity.Id;
strLoginCallBack += ",设备IP:" + deviceEntity.IpAddress;
}
adrDeviceLogEntity.LogData = strLoginCallBack;
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
}
else
{
//登录成功
strLoginCallBack = "登录设备成功,lUserID:" + lUserID;

ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
if (deviceEntity != null && !string.IsNullOrEmpty(deviceEntity.Id))
{
adrDeviceLogEntity.DeviceId = deviceEntity.Id;
strLoginCallBack += ",设备IP:" + deviceEntity.IpAddress;
}
adrDeviceLogEntity.LogData = strLoginCallBack;
adrDeviceLogEntity.LogType = "0";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
//设备布防
CHCNetSDK.NET_DVR_SETUPALARM_PARAM struAlarmParam = new CHCNetSDK.NET_DVR_SETUPALARM_PARAM();
struAlarmParam.dwSize = (uint)Marshal.SizeOf(struAlarmParam);
struAlarmParam.byLevel = 1; //0- 一级布防,1- 二级布防
struAlarmParam.byAlarmInfoType = 1;//智能交通设备有效,新报警信息类型
struAlarmParam.byDeployType = 0;
struAlarmParam.byFaceAlarmDetection = 1;//1-人脸侦测
var m_lUserID = CHCNetSDK.NET_DVR_SetupAlarmChan_V41(lUserID, ref struAlarmParam);
if (m_lUserID < 0)
{
string strErr = "布防失败,错误号:" + CHCNetSDK.NET_DVR_GetLastError(); //布防失败,输出错误号
adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
if (deviceEntity != null && !string.IsNullOrEmpty(deviceEntity.Id))
{
adrDeviceLogEntity.DeviceId = deviceEntity.Id;
strErr += ",设备IP:" + deviceEntity.IpAddress;
}
adrDeviceLogEntity.LogData = strErr;
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
//更新设备状态
deviceEntity.DOnlineStatus = false;
}
else
{
adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
string strNotice = "布防成功";
if (deviceEntity != null && !string.IsNullOrEmpty(deviceEntity.Id))
{
adrDeviceLogEntity.DeviceId = deviceEntity.Id;
strNotice += ",设备IP:" + deviceEntity.IpAddress;
}
adrDeviceLogEntity.LogData = strNotice;
adrDeviceLogEntity.LogType = "0";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
//更新设备状态
deviceEntity.DOnlineStatus = true;
}
//更新设备状态
adrDeviceIbll.SaveEntity(deviceEntity.Id, deviceEntity);
}

}
}
else//初始化失败
{
LoginCallBack = new CHCNetSDK.LOGINRESULTCALLBACK(cbLoginCallBack);//注册回调函数
ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
adrDeviceLogEntity.LogData = "海康SDK初始化失败";
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
}

struLogInfo.byLoginMode = 0; //0-Private, 1-ISAPI, 2-自适应
struLogInfo.byHttps = 0; //0-不适用tls,1-使用tls 2-自适应

CHCNetSDK.NET_DVR_DEVICEINFO_V40 DeviceInfo = new CHCNetSDK.NET_DVR_DEVICEINFO_V40();

//登录设备 Login the device
CHCNetSDK.NET_DVR_Login_V40(ref struLogInfo, ref DeviceInfo);
//释放内存
Marshal.FreeHGlobal(ptrCond);
//同步登录方法
//if (m_lUserID < 0)
//{
// iLastErr = CHCNetSDK.NET_DVR_GetLastError();
// strErr = "NET_DVR_Login_V30 failed, error code= " + iLastErr; //登录失败,输出错误号 Failed to login and output the error code
// MessageBox.Show(strErr);
//}
//else
//{
// //登录成功
// iDeviceNumber++;
// string str1 = "" + m_lUserID;
// listViewDevice.Items.Add(new ListViewItem(new string[] { str1, textBoxIP.Text, "未布防" }));//将已注册设备添加进列表
//}
#endregion
}

}
else//初始化失败
catch (Exception e)
{
ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity();
adrDeviceLogEntity.Create();
adrDeviceLogEntity.LogData = "海康SDK初始化失败";
adrDeviceLogEntity.LogData = "服务启动失败:" + e.Message + ",详细:" + e.StackTrace;
adrDeviceLogEntity.LogType = "2";
adrDeviceLogIbll.SaveEntity(null, adrDeviceLogEntity);
}
#endregion

}
/// <summary>
/// 海康登录回调
@@ -169,7 +253,7 @@ namespace Quanjiang.DigitalScholl.JobService
/// < param name="dwResult"></param>
/// <param name = "lpDeviceInfo" ></ param >
/// < param name="pUser"></param>
public void cbLoginCallBack(int lUserID, int dwResult, IntPtr lpDeviceInfo, IntPtr pUser)
public void AsynLoginMsgCallback(Int32 lUserID, UInt32 dwResult, ref CHCNetSDK.NET_DVR_DEVICEINFO_V30 lpDeviceInfo, IntPtr pUser)
{
try
{


+ 0
- 60
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/_sgbak/ProjectInstaller.Designer.cs.14225.1.2020-01-10.16-40-55.0229 Zobrazit soubor

@@ -1,60 +0,0 @@
namespace Quanjiang.DigitalScholl.JobService
{
partial class ProjectInstaller
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region 组件设计器生成的代码

/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
//
// serviceProcessInstaller1
//
this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem;
this.serviceProcessInstaller1.Password = null;
this.serviceProcessInstaller1.Username = null;
//
// serviceInstaller1
//
this.serviceInstaller1.Description = "数字化校园定时器服务";
this.serviceInstaller1.DisplayName = "QuanjiangDigitalSchollJobService";
this.serviceInstaller1.ServiceName = "QuanjiangDigitalSchollJobService";
this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
//
// ProjectInstaller
//
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.serviceProcessInstaller1,
this.serviceInstaller1});

}

#endregion

private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
private System.ServiceProcess.ServiceInstaller serviceInstaller1;
}
}

+ 0
- 19
Learun.Framework.Ultimate V7/Quanjiang.DigitalScholl.JobService/_sgbak/ProjectInstaller.cs.14224.1.2020-01-10.16-40-55.0289 Zobrazit soubor

@@ -1,19 +0,0 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.Threading.Tasks;

namespace Quanjiang.DigitalScholl.JobService
{
[RunInstaller(true)]
public partial class ProjectInstaller : System.Configuration.Install.Installer
{
public ProjectInstaller()
{
InitializeComponent();
}
}
}

Načítá se…
Zrušit
Uložit