mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added better status detection for stopping servers
This commit is contained in:
parent
034a6228d7
commit
3c822fa982
14 changed files with 183 additions and 46 deletions
|
|
@ -435,7 +435,7 @@
|
|||
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusRunningLabel}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopping}">
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusOn.ico,Size=32}"/>
|
||||
<Setter Property="Source" Value="{com:Icon Path=/Ark Server Manager;component/Art/StatusStarting.ico,Size=32}"/>
|
||||
<Setter Property="ToolTip" Value="{DynamicResource ServerSettings_RuntimeStatusStoppingLabel}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Runtime.Status}" Value="{x:Static enum:ServerStatus.Stopped}">
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
using ServerManagerTool.Common;
|
||||
using ServerManagerTool.Common.Utils;
|
||||
using ServerManagerTool.Enums;
|
||||
using ServerManagerTool.Lib;
|
||||
using ServerManagerTool.Plugin.Common;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using ServerManagerTool.Common;
|
||||
using ServerManagerTool.Common.Utils;
|
||||
using ServerManagerTool.Enums;
|
||||
using ServerManagerTool.Lib;
|
||||
using ServerManagerTool.Plugin.Common;
|
||||
using WPFSharp.Globalizer;
|
||||
|
||||
namespace ServerManagerTool
|
||||
|
|
@ -230,6 +230,13 @@ namespace ServerManagerTool
|
|||
SendAlerts = true,
|
||||
ServerProcess = RestartServer ? ServerProcessType.Restart : ServerProcessType.Shutdown,
|
||||
ProgressCallback = (p, m, n) => { TaskUtils.RunOnUIThreadAsync(() => { this.AddMessage(m, n); }).DoNotWait(); },
|
||||
ServerStatusChangeCallback = (ServerStatus serverStatus) =>
|
||||
{
|
||||
TaskUtils.RunOnUIThreadAsync(() =>
|
||||
{
|
||||
Server.Runtime.UpdateServerStatus(serverStatus, serverStatus != ServerStatus.Unknown);
|
||||
}).Wait();
|
||||
}
|
||||
};
|
||||
|
||||
// if restarting the serverm, then check and update the public IP address
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue