Browse Source

[fix] Environment.CurrentDirectory

HuiZhou
fajiao 2 years ago
parent
commit
3997fd831d
  1. 5
      AutoWeightServer/Model/Config/ServerConfig.cs

5
AutoWeightServer/Model/Config/ServerConfig.cs

@ -1,4 +1,5 @@
using System; using EC.Utils;
using System;
using System.IO; using System.IO;
namespace EC.AutoWeightServer.Model.Config namespace EC.AutoWeightServer.Model.Config
@ -44,7 +45,7 @@ namespace EC.AutoWeightServer.Model.Config
public static string LightRelayCom { get; } = GetAppConfig("Light_Relay_COM"); public static string LightRelayCom { get; } = GetAppConfig("Light_Relay_COM");
public static int LightRelayBaudRate { get; } = FormatCom.ToInt(GetAppConfig("Light_Relay_BaudRate")); public static int LightRelayBaudRate { get; } = FormatCom.ToInt(GetAppConfig("Light_Relay_BaudRate"));
public static string LightCodeName { get; } = Path.Combine(Environment.CurrentDirectory, "conf", GetAppConfig("Light_Code_Name")); public static string LightCodeName { get; } = Path.Combine(CommonUtil.GetWorkDirectory(), "conf", GetAppConfig("Light_Code_Name"));
public static int LightInterval { get; } = FormatCom.ToInt(GetAppConfig("Light_Interval")); public static int LightInterval { get; } = FormatCom.ToInt(GetAppConfig("Light_Interval"));
public static int LightBlink { get; } = FormatCom.ToInt(GetAppConfig("Light_Blink")); public static int LightBlink { get; } = FormatCom.ToInt(GetAppConfig("Light_Blink"));

Loading…
Cancel
Save