Publish Zonghengjia Windows 0.3.13 client source
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
namespace UCVL.VPNPlus;
|
||||
namespace UCVL.VPNPlus;
|
||||
|
||||
internal sealed partial class MainForm
|
||||
{
|
||||
@@ -25,20 +25,24 @@ internal sealed partial class MainForm
|
||||
ClientSize = new Size(ScaleLogical(size.Width), ScaleLogical(size.Height));
|
||||
SetTailnetTrafficVisibility(false); LayoutDashboard();
|
||||
var baseline = (_trafficCard.Bounds, _dailyCard.Bounds, _footer.Bounds, _dashboardBody.Size);
|
||||
checks[$"no_tailnet_one_local_chart_{size.Width}"] = !_tailnetTrafficCard.Visible
|
||||
&& _speedTrendCard.Width == _statusCard.Width && _dailyCard.Top > _speedTrendCard.Bottom;
|
||||
SetTailnetTrafficVisibility(true);
|
||||
checks[$"tailnet_does_not_duplicate_local_chart_{size.Width}"] = !_tailnetTrafficCard.Visible && !_trafficCard.Visible
|
||||
var key = $"{size.Width}x{size.Height}";
|
||||
Control chartContainer = WideDashboardPresentation ? _wideMonitor : _dashboardBody;
|
||||
checks[$"no_tailnet_one_local_chart_{key}"] = !_tailnetTrafficCard.Visible
|
||||
&& _speedTrendCard.Parent == chartContainer
|
||||
&& _speedTrendCard.Controls.OfType<TrafficChart>().Single() == _trafficChart
|
||||
&& _dailyCard.Top > _speedTrendCard.Bottom;
|
||||
checks[$"tailnet_never_increases_page_{size.Width}"] = _footer.Bounds == baseline.Item3 && _dashboardBody.Size == baseline.Item4
|
||||
SetTailnetTrafficVisibility(true);
|
||||
checks[$"tailnet_does_not_duplicate_local_chart_{key}"] = !_tailnetTrafficCard.Visible && !_trafficCard.Visible
|
||||
&& _dailyCard.Top > _speedTrendCard.Bottom;
|
||||
checks[$"tailnet_never_increases_page_{key}"] = _footer.Bounds == baseline.Item3 && _dashboardBody.Size == baseline.Item4
|
||||
&& !_dashboardScrollBar.Visible && _dashboardBody.Location == Point.Empty;
|
||||
checks[$"all_card_controls_fit_{size.Width}"] = DashboardControlsFit();
|
||||
checks[$"all_card_controls_fit_{key}"] = DashboardControlsFit();
|
||||
using(var headingGraphics=_nodeCard.CreateGraphics())
|
||||
checks[$"dense_headings_remain_complete_when_resized_{size.Width}"] = new[]
|
||||
{ _nodeHeading, _routeHeading, _actualModeHeading, _trafficHeading, _dailyHeading }
|
||||
checks[$"dense_headings_remain_complete_when_resized_{key}"] = new[]
|
||||
{ _nodeHeading, _selectionHeading, _routeHeading, _actualModeHeading, _dailyHeading }
|
||||
.All(label=>TextRenderer.MeasureText(headingGraphics,label.Text,label.Font,Size.Empty,TextFormatFlags.SingleLine).Width<=label.Width);
|
||||
SetTailnetTrafficVisibility(false);
|
||||
checks[$"tailnet_hide_restores_geometry_{size.Width}"] = _trafficCard.Bounds == baseline.Item1
|
||||
checks[$"tailnet_hide_restores_geometry_{key}"] = _trafficCard.Bounds == baseline.Item1
|
||||
&& _dailyCard.Bounds == baseline.Item2 && _footer.Bounds == baseline.Item3;
|
||||
}
|
||||
ClientSize=new Size(ScaleLogical(480),ScaleLogical(360));
|
||||
|
||||
Reference in New Issue
Block a user