Server Monitor Changes

- fixed the display of the map name.
- added the ports as a grid column.
- language file update
This commit is contained in:
Brett Hewitson 2022-06-22 22:53:41 +10:00
parent 09659d9ae2
commit f51e92c5a2
17 changed files with 175 additions and 51 deletions

View file

@ -253,6 +253,7 @@ namespace ServerManagerTool.Lib
{
SetValue(ServerPortProperty, value);
ServerPeerPort = value + 1;
UpdatePortsString();
}
}
@ -260,7 +261,11 @@ namespace ServerManagerTool.Lib
public int ServerPeerPort
{
get { return (int)GetValue(ServerPeerPortProperty); }
set { SetValue(ServerPeerPortProperty, value); }
set
{
SetValue(ServerPeerPortProperty, value);
UpdatePortsString();
}
}
public static readonly DependencyProperty QueryPortProperty = DependencyProperty.Register(nameof(QueryPort), typeof(int), typeof(ServerProfile), new PropertyMetadata(27015));
@ -269,7 +274,18 @@ namespace ServerManagerTool.Lib
public int QueryPort
{
get { return (int)GetValue(QueryPortProperty); }
set { SetValue(QueryPortProperty, value); }
set
{
SetValue(QueryPortProperty, value);
UpdatePortsString();
}
}
public static readonly DependencyProperty PortsStringProperty = DependencyProperty.Register(nameof(PortsString), typeof(string), typeof(ServerProfile), new PropertyMetadata(String.Empty));
public string PortsString
{
get { return (string)GetValue(PortsStringProperty); }
set { SetValue(PortsStringProperty, value); }
}
public static readonly DependencyProperty ServerIPProperty = DependencyProperty.Register(nameof(ServerIP), typeof(string), typeof(ServerProfile), new PropertyMetadata(String.Empty));
@ -4572,6 +4588,11 @@ namespace ServerManagerTool.Lib
return true;
}
public void UpdatePortsString()
{
this.PortsString = $"{this.ServerPort}, {this.ServerPeerPort}, {this.QueryPort}";
}
public bool UpdateSchedules()
{
SaveLauncher();
@ -5346,6 +5367,8 @@ namespace ServerManagerTool.Lib
this.ClearValue(QueryPortProperty);
this.ClearValue(ServerIPProperty);
UpdatePortsString();
this.ClearValue(EnableBanListURLProperty);
this.ClearValue(BanListURLProperty);
this.ClearValue(MaxPlayersProperty);