initial commit
Pulsar .NET 9.0 Windows Release / build (push) Waiting to run
Mirror to Codeberg and Gitea / mirror (push) Waiting to run

This commit is contained in:
i2p
2026-08-27 10:57:58 -06:00
commit 773d05f8f1
1038 changed files with 109261 additions and 0 deletions
@@ -0,0 +1,47 @@
using System.Windows.Forms;
using System.Windows.Forms.Integration;
using Pulsar.Server.Controls.Wpf;
using Pulsar.Server.Statistics;
#nullable enable
namespace Pulsar.Server.Controls
{
public sealed class HeatMapElementHost : ElementHost
{
private readonly HeatMapView _heatMapView;
private ClientGeoSnapshot? _lastSnapshot;
public HeatMapElementHost()
{
_heatMapView = new HeatMapView();
Child = _heatMapView;
Dock = DockStyle.Fill;
}
public void ShowLoading()
{
_heatMapView.ShowLoading();
}
public void ShowError(string message)
{
_heatMapView.ShowError(message);
}
public void UpdateSnapshot(ClientGeoSnapshot snapshot)
{
_lastSnapshot = snapshot;
_heatMapView.UpdateSnapshot(snapshot);
}
public void ApplyTheme(bool isDarkMode)
{
_heatMapView.ApplyTheme(isDarkMode);
if (_lastSnapshot != null && !_lastSnapshot.HasError)
{
_heatMapView.UpdateSnapshot(_lastSnapshot);
}
}
}
}