33 lines
759 B
C#
33 lines
759 B
C#
using Common.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Common.DbExtends.Extends;
|
|
namespace Server.Timers
|
|
{
|
|
|
|
public class SystemTimer : MyTimer
|
|
{
|
|
public SystemTimer()
|
|
{
|
|
Client.SingleClient.Events.ExitWinform += Events_ExitWinform;
|
|
}
|
|
|
|
private void Events_ExitWinform(object sender, EventArgs e)
|
|
{
|
|
SaveConfig();
|
|
}
|
|
|
|
protected override void Run(object state, bool timedOut)
|
|
{
|
|
SaveConfig();
|
|
}
|
|
private void SaveConfig()
|
|
{
|
|
Client.SingleClient.Db.SetMapValue("系统缓存", Client.SingleClient.Config.RuntimeCache);
|
|
}
|
|
}
|
|
}
|