231 lines
7.0 KiB
C#
231 lines
7.0 KiB
C#
using Cowain.Preheat.BLL;
|
|
using Prism.Mvvm;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Shapes;
|
|
using Unity;
|
|
|
|
namespace Cowain.Preheat.Main.Common
|
|
{
|
|
public class ConfigInfo : BindableBase
|
|
{
|
|
|
|
private static string equipmentCode;
|
|
/// <summary>
|
|
/// 设备ID
|
|
/// </summary>
|
|
public static string EquipmentCode
|
|
{
|
|
get { return equipmentCode; }
|
|
set { equipmentCode = value; }
|
|
}
|
|
|
|
private static string resourceCode;
|
|
/// <summary>
|
|
/// 资源编码
|
|
/// </summary>
|
|
public static string ResourceCode
|
|
{
|
|
get { return resourceCode; }
|
|
set { resourceCode = value; }
|
|
}
|
|
|
|
private static string dayShift = "";
|
|
/// <summary>
|
|
///早班交接班时间
|
|
/// </summary>
|
|
public static string DayShift
|
|
{
|
|
get { return dayShift; }
|
|
set { dayShift = value; }
|
|
}
|
|
|
|
|
|
private static string nightShift = "";
|
|
/// <summary>
|
|
///晚班交接班时间
|
|
/// </summary>
|
|
public static string NightShift
|
|
{
|
|
get { return nightShift; }
|
|
set { nightShift = value; }
|
|
}
|
|
|
|
private static int mESOnline ;
|
|
/// <summary>
|
|
/// MES是否在线(0为离线,1为在线)
|
|
/// </summary>
|
|
public static int MESOnline
|
|
{
|
|
get { return mESOnline; }
|
|
set { mESOnline = value; }
|
|
}
|
|
private static string debugMode = "";
|
|
/// <summary>
|
|
/// 是否测试模式(0为调试模式,1为正式生产)
|
|
/// </summary>
|
|
public static string DebugMode
|
|
{
|
|
get { return debugMode; }
|
|
set { debugMode = value; }
|
|
}
|
|
|
|
private static string operatorUserID = "";
|
|
/// <summary>
|
|
/// 操作员账号
|
|
/// </summary>
|
|
public static string OperatorUserID
|
|
{
|
|
get { return operatorUserID; }
|
|
set { operatorUserID = value; }
|
|
}
|
|
|
|
|
|
private static string operatorPassword = "";
|
|
/// <summary>
|
|
/// 操作员密码
|
|
/// </summary>
|
|
public static string OperatorPassword
|
|
{
|
|
get { return operatorPassword; }
|
|
set { operatorPassword = value; }
|
|
}
|
|
|
|
private static string equUserID = "";
|
|
/// <summary>
|
|
/// 设备接口认证操作账号
|
|
/// </summary>
|
|
public static string EquUserID
|
|
{
|
|
get { return equUserID; }
|
|
set { equUserID = value; }
|
|
}
|
|
|
|
private static string equPassword = "";
|
|
/// <summary>
|
|
/// 设备接口认证操作密码
|
|
/// </summary>
|
|
public static string EquPassword
|
|
{
|
|
get { return equPassword; }
|
|
set { equPassword = value; }
|
|
}
|
|
|
|
private static string fTPAddress = "";
|
|
/// <summary>
|
|
/// FTP 服务器地址
|
|
/// </summary>
|
|
public static string FTPAddress
|
|
{
|
|
get { return fTPAddress; }
|
|
set { fTPAddress = value; }
|
|
}
|
|
|
|
private static string fTPPassword = "";
|
|
/// <summary>
|
|
/// FTP 账号密码
|
|
/// </summary>
|
|
public static string FTPPassword
|
|
{
|
|
get { return fTPPassword; }
|
|
set { fTPPassword = value; }
|
|
}
|
|
|
|
private static string mESAddress = "";
|
|
/// <summary>
|
|
/// MES 服务器接口地址
|
|
/// </summary>
|
|
public static string MESAddress
|
|
{
|
|
get { return mESAddress; }
|
|
set { mESAddress = value; }
|
|
}
|
|
private static string stationCode = "";
|
|
/// <summary>
|
|
/// 工序编码
|
|
/// </summary>
|
|
public static string StationCode
|
|
{
|
|
get { return stationCode; }
|
|
set { stationCode = value; }
|
|
}
|
|
private static int heartbeatCycle ;
|
|
/// <summary>
|
|
/// 心跳接口调用周期(秒)
|
|
/// </summary>
|
|
public static int HeartbeatCycle
|
|
{
|
|
get { return heartbeatCycle; }
|
|
set { heartbeatCycle = value; }
|
|
}
|
|
|
|
private static int mESTimeout ;
|
|
/// <summary>
|
|
/// 各个接口 MES 超时时间(秒)
|
|
/// </summary>
|
|
public static int MESTimeout
|
|
{
|
|
get { return mESTimeout; }
|
|
set { mESTimeout = value; }
|
|
}
|
|
|
|
private static int dataCollectionCycle ;
|
|
/// <summary>
|
|
/// 设备过程参数上传频率(秒)
|
|
/// </summary>
|
|
public static int DataCollectionCycle
|
|
{
|
|
get { return dataCollectionCycle; }
|
|
set { dataCollectionCycle = value; }
|
|
}
|
|
|
|
private static int line;
|
|
/// <summary>
|
|
/// 产线编号
|
|
/// </summary>
|
|
public static int Line
|
|
{
|
|
get { return line; }
|
|
set { line = value; }
|
|
}
|
|
private static int qRCodeLength;
|
|
/// <summary>
|
|
/// 条码长度
|
|
/// </summary>
|
|
public static int QRCodeLength
|
|
{
|
|
get { return qRCodeLength; }
|
|
set { qRCodeLength = value; }
|
|
}
|
|
public static void InitConfigParm(IUnityContainer unityContainer)
|
|
{
|
|
// SysSetupService workOrderService = unityContainer.Resolve<SysSetupService>();
|
|
//var parms= workOrderService.GetAllPara();
|
|
// EquipmentCode= workOrderService.ParaDic["EquipmentCode"];
|
|
// ResourceCode = workOrderService.ParaDic["ResourceCode"];
|
|
// DayShift = workOrderService.ParaDic["DayShift"];
|
|
// NightShift = workOrderService.ParaDic["NightShift"];
|
|
// OperatorUserID = workOrderService.ParaDic["OperatorUserID"];
|
|
// OperatorPassword = workOrderService.ParaDic["OperatorPassword"];
|
|
// EquUserID = workOrderService.ParaDic["EquUserID"];
|
|
// EquPassword = workOrderService.ParaDic["EquPassword"];
|
|
// FTPAddress = workOrderService.ParaDic["FTPAddress"];
|
|
// FTPPassword = workOrderService.ParaDic["FTPPassword"];
|
|
// MESAddress = workOrderService.ParaDic["MESAddress"];
|
|
// StationCode = workOrderService.ParaDic["StationCode"];
|
|
// HeartbeatCycle = Convert.ToInt16( workOrderService.ParaDic["HeartbeatCycle"]);
|
|
// MESTimeout = Convert.ToInt16(workOrderService.ParaDic["MESTimeout"]);
|
|
// DataCollectionCycle = Convert.ToInt16(workOrderService.ParaDic["DataCollectionCycle"]);
|
|
// MESOnline = Convert.ToInt16(workOrderService.ParaDic["MESOnline"]);
|
|
// DebugMode =workOrderService.ParaDic["DebugMode"];
|
|
// Line = Convert.ToInt16(workOrderService.ParaDic["DataCollectionCycle"]);
|
|
// QRCodeLength = Convert.ToInt16(workOrderService.ParaDic["QRCodeLength"]);
|
|
|
|
}
|
|
|
|
}
|
|
}
|