2020-09-17 10:23:26 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace OnlineUserPool.Unility
|
|
|
|
|
|
{
|
|
|
|
|
|
class ConfigHelp
|
|
|
|
|
|
{
|
|
|
|
|
|
public static string Host { get; set; }
|
2021-01-18 20:24:19 +08:00
|
|
|
|
public static int Top
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Top"]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-09-17 10:23:26 +08:00
|
|
|
|
public static bool ShowVirtualUser { get; set; }
|
|
|
|
|
|
|
2021-01-18 20:24:19 +08:00
|
|
|
|
//public static string Ip { get; private set; }
|
2020-09-17 10:23:26 +08:00
|
|
|
|
|
2021-06-24 09:20:01 +08:00
|
|
|
|
public static int UdpPort { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
public static int TcpPort { get; private set; }
|
2020-09-17 10:23:26 +08:00
|
|
|
|
|
2022-05-10 19:23:32 +08:00
|
|
|
|
public static string GameRoomFilePath { get; private set; }
|
|
|
|
|
|
|
2020-09-17 10:23:26 +08:00
|
|
|
|
|
|
|
|
|
|
static ConfigHelp()
|
|
|
|
|
|
{
|
|
|
|
|
|
Host = System.Configuration.ConfigurationManager.AppSettings["Host"];
|
2021-01-18 20:24:19 +08:00
|
|
|
|
//Top = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Top"]);
|
2020-09-17 10:23:26 +08:00
|
|
|
|
ShowVirtualUser = bool.Parse(System.Configuration.ConfigurationManager.AppSettings["ShowVirtualUser"]);
|
2021-01-18 20:24:19 +08:00
|
|
|
|
//Ip = System.Configuration.ConfigurationManager.AppSettings["Ip"];
|
2021-06-24 09:20:01 +08:00
|
|
|
|
UdpPort = int.Parse(System.Configuration.ConfigurationManager.AppSettings["Port"]);
|
|
|
|
|
|
|
|
|
|
|
|
TcpPort = int.Parse(System.Configuration.ConfigurationManager.AppSettings["TcpPort"]);
|
2023-02-10 09:43:04 +08:00
|
|
|
|
#if DEBUG
|
|
|
|
|
|
Host = System.Configuration.ConfigurationManager.AppSettings["DevHost"];
|
|
|
|
|
|
//Top = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Top"]);
|
|
|
|
|
|
ShowVirtualUser = bool.Parse(System.Configuration.ConfigurationManager.AppSettings["DevShowVirtualUser"]);
|
|
|
|
|
|
//Ip = System.Configuration.ConfigurationManager.AppSettings["Ip"];
|
|
|
|
|
|
UdpPort = int.Parse(System.Configuration.ConfigurationManager.AppSettings["DevPort"]);
|
|
|
|
|
|
|
|
|
|
|
|
TcpPort = int.Parse(System.Configuration.ConfigurationManager.AppSettings["DevTcpPort"]);
|
|
|
|
|
|
#endif
|
2020-09-17 10:23:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|