spc-kiosk-pb/Kiosk/Common/SPC.Kiosk.Common/Functions/CommonValue.cs

138 lines
4.3 KiB
C#
Raw Permalink Normal View History

2019-06-16 05:12:09 +00:00
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Globalization;
using SPC.Kiosk.Base;
using Cosmos.BaseFrame;
namespace SPC.Kiosk.Common
{
public static class CommonValue
{
/// <summary>
/// PB Design Image Store Path
/// </summary>
public static string PBdesignImagesPath { get; set; } = @"Kiosk\PB";
/// <summary>
/// Intro Media Path
/// </summary>
public static string IntroMediaPath { get; set; } = @"Screen";
/// <summary>
/// Sign Save Width
/// </summary>
public static int SignWidth { get; set; } = 128;
/// <summary>
/// Sign Save Height
/// </summary>
public static int SignHeight { get; set; } = 64;
/// <summary>
/// Presave Sign File Name
/// </summary>
public static string SignFileName { get; set; } = "SIGN.BMP";
/// <summary>
/// Sign Poinnts Min
/// </summary>
public static long SingPointsMin { get; set; } = 30L;
/// <summary>
/// Sign Points Max Limit
/// </summary>
public static long SingPointsMax { get; set; } = 2048L;
/// <summary>
/// No Sign Amonut Limit
/// </summary>
public static double NoSignAmountMaxLimit { get; set; } = 50000d;
/// <summary>
/// AiScanner Program Path
/// </summary>
public static string AiScannerPath { get; set; } = "O2AiScannerHS.exe";
/// <summary>
/// Payments EndType
/// </summary>
public static PaymentEndWindowEndType PaymentEndType { get; set; } = PaymentEndWindowEndType.Bell;
/// <summary>
/// Payments Disable EndType
/// </summary>
public static PaymentEndWindowEndType DisableEndType { get; set; } = PaymentEndWindowEndType.Talk;
/// <summary>
/// Input Wait Time Out Seconds
/// </summary>
public static double TimeOutSeconds { get; set; } = 30d;
/// <summary>
/// Display Language
/// </summary>
public static SupportLanguageType CommonLanguageType { get; set; } = SupportLanguageType.ko;
public static string CashReceiptDefaultNo { get; set; } = "0100001234";
/// <summary>
/// check Touch Device Exist
/// </summary>
public static bool IsHasTouchDevice
{
get
{
return Tablet.TabletDevices.OfType<TabletDevice>().Any(t => t.Type.Equals(TabletDeviceType.Touch));
}
}
/// <summary>
/// check Mouse Exist
/// </summary>
public static bool IsHasMouse
{
get
{
return Mouse.PrimaryDevice != null;
}
}
/// <summary>
/// Default Item Image
/// </summary>
public static string ItemDefaultImage
{
get
{
return ResourceManager.GetNximagePathAdd("img_contents_default.png", CommonValue.PBdesignImagesPath);
}
}
public static string OptionDefaultImage
{
get
{
return ResourceManager.GetNximagePathAdd("ic_option_takein.png", CommonValue.PBdesignImagesPath);
}
}
/// <summary>
/// Log 파일 시작명 '명칭_YYYMMDD.log'
/// </summary>
public static string LogName { get; set; } = @"KioskPB";
/// <summary>
/// Log 보관 기한
/// </summary>
public static int LogSaveDays { get; set; } = 30;
/// <summary>
/// Log Setting
/// </summary>
public static Log_Setting KioskLogSetting
{
get
{
return new Log_Setting
{
LogPath = Path.Combine(BaseCom.NxBinPath ,@"Kiosk"),
LogName = LogName,
LogFrom = new string[] { LogName },
LogDates = LogSaveDays,
LogType = new Log_Type[] { Log_Type.Info,Log_Type.Error,Log_Type.Debug }
};
}
}
}
}