|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using HKCardOUT.Views;
- using HKLib.Dto;
- using Logic.RemoteModel;
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Data;
- using XExten.Advance.StaticFramework;
-
- namespace HKCardOUT.Helper
- {
- public class DataBus
- {
- private static string _ConnectionString;
- public static string ConnectionString
- {
- get => _ConnectionString;
- set
- {
- var Route = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "DATA");
- _ConnectionString = $"DataSource={SyncStatic.CreateFile(Path.Combine(SyncStatic.CreateDir(Route), value))}";
- }
- }
- public static bool NetWordState { get; set; } = false;
- public static string Cron { get; set; }
- public static bool StartDevice { get; set; }
- public static bool Cancel { get; set; }
- public static string StoreId { get; set; }
- public static string TenantId { get; set; }
- public static string COM { get; set; }
- public static string SaasRoute { get; set; }
- public static int Count { get; set; }
- public static TimeSpilte Times { get; set; }
- public static StoreInfoResponse StoreInfo { get; set; }
- public static Dictionary<string, AdWindow> AdStatus { get; set; } = new Dictionary<string, AdWindow>();
- }
- public class ApiRoute
- {
- public static string GetTime = DataBus.SaasRoute + "api/one-card/eat-time-interval";
- /// <summary>
- /// 获取所有卡
- /// </summary>
- public static string CheckCardStatus = DataBus.SaasRoute + "api/one-card/card-list";
- /// <summary>
- /// 同步消费记录
- /// </summary>
- public static string SyncSaleLog = DataBus.SaasRoute + "api/member-helper/memberconsumptionorrecharge";
- /// <summary>
- /// 获取店铺信息
- /// </summary>
- public static string PullShopInfo = DataBus.SaasRoute + $"api/StoreHelper/GeBasisGateList?StoreId={DataBus.StoreId}";
- }
- public class HKConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return (bool)value ? "启用" : "禁用";
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return value;
- }
- }
- }
|