Windows 0.2.22 clean UI-maintenance source delta; no private history or other platform changes
This commit is contained in:
@@ -16,7 +16,14 @@ internal sealed class DailyTrafficChart : Control
|
||||
$"套餐全部设备 · {_series.Timezone}\n{_series.Note}\n本期总量不随筛选改变;本次流量仅指本机当前连接。";
|
||||
internal string SelectedRange => _period.Key;
|
||||
internal int PointCount => _series?.Points.Count ?? 0;
|
||||
internal DailyTrafficChart() { DoubleBuffered = true; BackColor = Color.White; Font = Brand.Font(7.3f); }
|
||||
internal DailyTrafficChart()
|
||||
{
|
||||
DoubleBuffered = true;
|
||||
SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint, true);
|
||||
SetStyle(ControlStyles.Opaque, false);
|
||||
BackColor = Color.Transparent;
|
||||
Font = Brand.Font(7.3f);
|
||||
}
|
||||
internal void SetHistory(List<DailyUsage> history, Dictionary<string, UsageHistorySeries>? ranges = null)
|
||||
{ _legacy = history; _ranges = ranges; RefreshSeries(); }
|
||||
internal void SetPeriod(UsageHistoryPeriod period) { _period = period; RefreshSeries(); }
|
||||
@@ -46,7 +53,8 @@ internal sealed class DailyTrafficChart : Control
|
||||
if (points.Count == 0 || points.All(p => p.UploadBytes is null && p.DownloadBytes is null))
|
||||
{
|
||||
var message = _series is null ? "此范围需后台提供明细" : "暂无此范围代理流量明细";
|
||||
TextRenderer.DrawText(e.Graphics, message, Font, Rectangle.Round(_plot), Brand.Muted, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter);
|
||||
TextRenderer.DrawText(e.Graphics, message, Font, Rectangle.Round(_plot), Brand.Muted,
|
||||
ChartAxis.PaintFlags | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter);
|
||||
}
|
||||
void Line(bool up)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user