updated NLog to v5
fixed most of issues with world creating/loading fixed log window lags fixed some compiler warnings fixed empty log files creating fixed logging performance added better logging of load process
This commit is contained in:
@@ -8,6 +8,8 @@ using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Threading;
|
||||
using Sandbox;
|
||||
using Torch.API;
|
||||
using Torch.API.Managers;
|
||||
using Torch.Server.Annotations;
|
||||
using Torch.Server.Managers;
|
||||
@@ -32,15 +34,26 @@ namespace Torch.Server.Views
|
||||
|
||||
public ConfigControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
_instanceManager = TorchBase.Instance.Managers.GetManager<InstanceManager>();
|
||||
#pragma warning disable CS0618
|
||||
var instance = TorchBase.Instance;
|
||||
#pragma warning restore CS0618
|
||||
instance.GameStateChanged += InstanceOnGameStateChanged;
|
||||
|
||||
_instanceManager = instance.Managers.GetManager<InstanceManager>();
|
||||
_instanceManager.InstanceLoaded += _instanceManager_InstanceLoaded;
|
||||
DataContext = _instanceManager.DedicatedConfig;
|
||||
TorchSettings.DataContext = (TorchConfig)TorchBase.Instance.Config;
|
||||
InitializeComponent();
|
||||
TorchSettings.DataContext = (TorchConfig)instance.Config;
|
||||
// Gets called once all children are loaded
|
||||
Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(ApplyStyles));
|
||||
}
|
||||
|
||||
private void InstanceOnGameStateChanged(MySandboxGame game, TorchGameState newState)
|
||||
{
|
||||
if (newState > TorchGameState.Creating)
|
||||
Dispatcher.InvokeAsync(() => DediConfigScrollViewer.IsEnabled = false);
|
||||
}
|
||||
|
||||
private void CheckValid()
|
||||
{
|
||||
ConfigValid = !_bindingExpressions.Any(x => x.HasError);
|
||||
|
Reference in New Issue
Block a user