mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-18 09:35:48 +00:00
source code checkin
This commit is contained in:
parent
5f8fb2c825
commit
7e57b72e35
675 changed files with 168433 additions and 0 deletions
40
src/ARKServerManager/Lib/Model/RCONParameters.cs
Normal file
40
src/ARKServerManager/Lib/Model/RCONParameters.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System.Net;
|
||||
using System.Windows;
|
||||
|
||||
namespace ServerManagerTool.Lib
|
||||
{
|
||||
public class RCONParameters : PlayerListParameters
|
||||
{
|
||||
public static readonly DependencyProperty MaxPlayersProperty = DependencyProperty.Register(nameof(MaxPlayers), typeof(int), typeof(RCONParameters), new PropertyMetadata(0));
|
||||
|
||||
public string RCONHost { get; set; }
|
||||
|
||||
public IPAddress RCONHostIP
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
var ipAddresses = Dns.GetHostAddresses(RCONHost);
|
||||
if (ipAddresses.Length > 0)
|
||||
return ipAddresses[0].MapToIPv4();
|
||||
}
|
||||
catch {}
|
||||
|
||||
return IPAddress.None;
|
||||
}
|
||||
}
|
||||
|
||||
public int RCONPort { get; set; }
|
||||
|
||||
public string AdminPassword { get; set; }
|
||||
|
||||
public int MaxPlayers
|
||||
{
|
||||
get { return (int)GetValue(MaxPlayersProperty); }
|
||||
set { SetValue(MaxPlayersProperty, value); }
|
||||
}
|
||||
|
||||
public double PlayerListWidth { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue