42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using System.Windows;
|
|
|
|
namespace ZNTechClone
|
|
{
|
|
public class MapMarker
|
|
{
|
|
public double X { get; set; }
|
|
public double Y { get; set; }
|
|
public string Label { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>地图覆盖层的全局状态(安全区 / 路线 / 标记)。</summary>
|
|
public static class MapOverlay
|
|
{
|
|
public static bool Enabled { get; set; }
|
|
public static double CircleX { get; set; }
|
|
public static double CircleY { get; set; }
|
|
public static double CircleRadius { get; set; } = 120;
|
|
public static bool ShowOccluded { get; set; } = true;
|
|
public static List<MapMarker> Markers { get; } = new();
|
|
public static List<Point> RoutePoints { get; } = new();
|
|
|
|
public static void SeedDemo()
|
|
{
|
|
Markers.Clear();
|
|
RoutePoints.Clear();
|
|
var w = SystemParameters.PrimaryScreenWidth;
|
|
var h = SystemParameters.PrimaryScreenHeight;
|
|
CircleX = w / 2;
|
|
CircleY = h / 2;
|
|
Markers.Add(new MapMarker { X = w * 0.36, Y = h * 0.42, Label = "白骆驼路线" });
|
|
Markers.Add(new MapMarker { X = w * 0.62, Y = h * 0.55, Label = "精绝古城" });
|
|
Markers.Add(new MapMarker { X = w * 0.5, Y = h * 0.7, Label = "安全区" });
|
|
RoutePoints.Add(new Point(w * 0.36, h * 0.42));
|
|
RoutePoints.Add(new Point(w * 0.47, h * 0.5));
|
|
RoutePoints.Add(new Point(w * 0.62, h * 0.55));
|
|
RoutePoints.Add(new Point(w * 0.5, h * 0.7));
|
|
}
|
|
}
|
|
}
|