Windows 0.2.22 clean UI-maintenance source delta; no private history or other platform changes

This commit is contained in:
2026-10-13 04:32:04 +00:00
parent 901f27baf5
commit 3ccaea3d52
19 changed files with 393 additions and 74 deletions
+7
View File
@@ -99,5 +99,12 @@
], ],
"OriginalPrivateSourcesModified": false, "OriginalPrivateSourcesModified": false,
"ProductionAccepted": false, "ProductionAccepted": false,
"SourceOnly": true,
"Windows022MaintenanceDelta": {
"ExampleEndpointChanges": [],
"OptionalUnlicensedSceneRemainsOmitted": true,
"OtherComponentsModified": false,
"ProductionAccepted": false,
"SourceOnly": true "SourceOnly": true
} }
}
+1 -1
View File
@@ -1,6 +1,6 @@
# 纵横家开源源码 # 纵横家开源源码
此仓库是无私有 Git 历史的清洁源码快照:Windows 0.2.21、Django 后台及 iPhone/iPad 1.0.2。公司自有代码按 MIT 开源;第三方组件遵守原许可,公司商标及 Logo 不在 MIT 授权范围。Android 保留原 GPL-3.0 公开仓库,不重复拷贝或改换许可。 此仓库是无私有 Git 历史的清洁源码快照:Windows 0.2.22、Django 后台及 iPhone/iPad 1.0.2。公司自有代码按 MIT 开源;第三方组件遵守原许可,公司商标及 Logo 不在 MIT 授权范围。Android 保留原 GPL-3.0 公开仓库,不重复拷贝或改换许可。
| 目录 | 内容与状态 | | 目录 | 内容与状态 |
| --- | --- | | --- | --- |
+48 -15
View File
@@ -4,7 +4,7 @@
"ExportDiffersFromOriginalCandidates": true, "ExportDiffersFromOriginalCandidates": true,
"FilesBeforeProvenanceAndAudit": { "FilesBeforeProvenanceAndAudit": {
"LICENSE": "b7e94910b8dc377b0a05ccde3c6e5941838dfc15c9dd790078d11728205b524e", "LICENSE": "b7e94910b8dc377b0a05ccde3c6e5941838dfc15c9dd790078d11728205b524e",
"README.md": "5bd226c3cf2855eabf3fae2758944b94fa14ceb16f8ad3a2449e4f97a7a794ae", "README.md": "607d74c04a6642f9cb596000f9b7f2b790610aa89dd32aeef007f254a406e89d",
"SECURITY.md": "34e56cd9b8f6aa5fee45921c6eb831a542e05e76e41850fc31c44e09de088b3c", "SECURITY.md": "34e56cd9b8f6aa5fee45921c6eb831a542e05e76e41850fc31c44e09de088b3c",
"THIRD_PARTY_NOTICES.md": "8c862f2f6b71440616a887e6deb7444a1262cf7d9f144208cc04041c3f9a3371", "THIRD_PARTY_NOTICES.md": "8c862f2f6b71440616a887e6deb7444a1262cf7d9f144208cc04041c3f9a3371",
"android/README.md": "bb4387da9a055e97f33bb29a883c543e0938fa858df3fd744abc80553a5ec65c", "android/README.md": "bb4387da9a055e97f33bb29a883c543e0938fa858df3fd744abc80553a5ec65c",
@@ -191,9 +191,11 @@
"windows/ConnectionSelection.cs": "def94b338b9e1fd940c19b8991e4268a4e59bec741ea624f5a6e4fb7a7d3bbcc", "windows/ConnectionSelection.cs": "def94b338b9e1fd940c19b8991e4268a4e59bec741ea624f5a6e4fb7a7d3bbcc",
"windows/ConnectionSelectionSelfTest.cs": "12bd82071989c5e539031f6e7921660edb4eb10a4136ac332cc84eca2e2d96de", "windows/ConnectionSelectionSelfTest.cs": "12bd82071989c5e539031f6e7921660edb4eb10a4136ac332cc84eca2e2d96de",
"windows/ConnectionSelfTest.cs": "6511feda4c81da766e745a499c682d2d0b3be0386c4ba424e7ddc04029ebca12", "windows/ConnectionSelfTest.cs": "6511feda4c81da766e745a499c682d2d0b3be0386c4ba424e7ddc04029ebca12",
"windows/DailyTrafficChart.cs": "5006497ef28cd8a7a00f8553d729220f559cc5205ea0471bdc16be5a7e97fc7d", "windows/DailyTrafficChart.cs": "4af8d8a91559e6a3fc1dd56db11f3534606aeb486ff918b2b301db0b82e4c716",
"windows/DashboardControls.cs": "f58f30cbd766c0b912afc9b3bda6bc3b88073cb40dc04986c0286790ff2bb758", "windows/DashboardControls.cs": "b7b1ec34e78d96d23861b0236b945239f4e389d6b8494f53e95e5efe3f4c2182",
"windows/DashboardInteractionSelfTest.cs": "0c91f8ccb702891395d85e4901220381468f576f3ed5b88972a7d7bd12f215e7",
"windows/DashboardLayout.cs": "a761de5842c1aa03e68089dc90f73e0a2372532e5367b8e64198ba7b5bd6f8a8", "windows/DashboardLayout.cs": "a761de5842c1aa03e68089dc90f73e0a2372532e5367b8e64198ba7b5bd6f8a8",
"windows/DashboardWheelRouter.cs": "d903097a5febbff296febb65855dc10b4e056ea5bb54d2df71b5d1f0297dcc1f",
"windows/GitReleasePolicySelfTest.cs": "c43d0e63e9c00a7c6b376ed204bc6c400572085075397685c92862e8318fe369", "windows/GitReleasePolicySelfTest.cs": "c43d0e63e9c00a7c6b376ed204bc6c400572085075397685c92862e8318fe369",
"windows/GitReleaseUpdater.cs": "dcd00a0feca6801aad4e346c7565d8bcd80b3fd24a4accbe5cd4643d04264b9b", "windows/GitReleaseUpdater.cs": "dcd00a0feca6801aad4e346c7565d8bcd80b3fd24a4accbe5cd4643d04264b9b",
"windows/InstallationIntegration.cs": "af4e5d0cd78d66546079f452e110be627494550594e847d13b77178494fb3bda", "windows/InstallationIntegration.cs": "af4e5d0cd78d66546079f452e110be627494550594e847d13b77178494fb3bda",
@@ -213,11 +215,11 @@
"windows/LearningSelfTest.cs": "786587e8a145bbcd86acfc77f8f204958a6576aa008a19637e521ebb93926b10", "windows/LearningSelfTest.cs": "786587e8a145bbcd86acfc77f8f204958a6576aa008a19637e521ebb93926b10",
"windows/LearningStore.cs": "cc1c6cf1b0c5b948e16be24a46dc2429a020cafa176a36ad9c450d887410169e", "windows/LearningStore.cs": "cc1c6cf1b0c5b948e16be24a46dc2429a020cafa176a36ad9c450d887410169e",
"windows/LearningTransportSelfTest.cs": "05dcfd3fcfc6f25e20612c020583eb6c36934c1b251e50e70fcd29501ad0efe7", "windows/LearningTransportSelfTest.cs": "05dcfd3fcfc6f25e20612c020583eb6c36934c1b251e50e70fcd29501ad0efe7",
"windows/MainForm.Chrome.cs": "b537ae6528d5fb592d99915af27bdf2dd819604543a9b5a91d8bf3190b52ca4f", "windows/MainForm.Chrome.cs": "30dc6520a44a5120c78c472c9fb053e2e4dea8e254b5531d04a5342964969c7a",
"windows/MainForm.Dashboard.cs": "9d4774789f74c97f9b47c676d37b1739718cefbd3b51e8dc74b5ab5d565e3dc7", "windows/MainForm.Dashboard.cs": "f11943211bd43259e90ae357512870132fc4e6bdb6cf1b2cdca40382b47170d6",
"windows/MainForm.Handover.cs": "a7c6e81186be1d7a154c6997b7d44621543c163ba703901d7974632dd462d25f", "windows/MainForm.Handover.cs": "a7c6e81186be1d7a154c6997b7d44621543c163ba703901d7974632dd462d25f",
"windows/MainForm.Selection.cs": "297186f274b45cd9bf14fbc15492cbe026aea8902ffda386029cbcb75901e469", "windows/MainForm.Selection.cs": "297186f274b45cd9bf14fbc15492cbe026aea8902ffda386029cbcb75901e469",
"windows/MainForm.cs": "becb27dfb9f94c17506f94f2d7479e5db51033a31b0f3dc1d755634c1310f46a", "windows/MainForm.cs": "729a5364fcb7d20b53198ba9619a28971029ab4162cced1b2fd4ba49812beccc",
"windows/NOTICE.md": "8c862f2f6b71440616a887e6deb7444a1262cf7d9f144208cc04041c3f9a3371", "windows/NOTICE.md": "8c862f2f6b71440616a887e6deb7444a1262cf7d9f144208cc04041c3f9a3371",
"windows/NetworkHandover.cs": "b43548be0051cf92dfd332e537951e4b5083f2a123be8021994513bbc3748d46", "windows/NetworkHandover.cs": "b43548be0051cf92dfd332e537951e4b5083f2a123be8021994513bbc3748d46",
"windows/NetworkHandoverSelfTest.cs": "681d0154dc0aa5f49d7ce1f3088b465eea3ed82571b464951df8d4c89cecdf73", "windows/NetworkHandoverSelfTest.cs": "681d0154dc0aa5f49d7ce1f3088b465eea3ed82571b464951df8d4c89cecdf73",
@@ -238,16 +240,16 @@
"windows/PrivateAuxiliaryRoutingSelfTest.cs": "1a955b2d8e7e9ffe8ff0c6a7bc717877ccd0f7681ff8a65219bb2fe93c230382", "windows/PrivateAuxiliaryRoutingSelfTest.cs": "1a955b2d8e7e9ffe8ff0c6a7bc717877ccd0f7681ff8a65219bb2fe93c230382",
"windows/PrivateAuxiliaryRuntime.cs": "dcfb406508e3d7e9a9163163cfe5e2724a6955a18ae4604e2d9f890da61308cf", "windows/PrivateAuxiliaryRuntime.cs": "dcfb406508e3d7e9a9163163cfe5e2724a6955a18ae4604e2d9f890da61308cf",
"windows/PrivateTransportProbe.cs": "e29e9bd0180a37bdcecf7104fde5069be799aca92b747881d0485a62d382d9b3", "windows/PrivateTransportProbe.cs": "e29e9bd0180a37bdcecf7104fde5069be799aca92b747881d0485a62d382d9b3",
"windows/Program.cs": "cd3f3d5dbb194ac8bb89de151bec0c3494ecae2bb52dffdfee29296449c09c4c", "windows/Program.cs": "3545afc128a41b77d8c7365e36075bf01ebe379d8119e40343466968e7c25dea",
"windows/ProxyDnsPolicy.cs": "997e2e922ad43956932c1bd0a6da3457bc308ee723f4f77ff8e52aa23fa954c0", "windows/ProxyDnsPolicy.cs": "997e2e922ad43956932c1bd0a6da3457bc308ee723f4f77ff8e52aa23fa954c0",
"windows/ProxyProbe.cs": "5d27b5a6c6b192a0c0f3ec4637c5a876a71130497af57f7cb4a04ab4735ca1ec", "windows/ProxyProbe.cs": "5d27b5a6c6b192a0c0f3ec4637c5a876a71130497af57f7cb4a04ab4735ca1ec",
"windows/README.md": "bbefa88371cca54662456dac7f1aa48ef030a372695a25b5d1adadc3287f371c", "windows/README.md": "e57715545f39c8e4ad0cbd0198ecfcb82be1601b5d1d8bad89abed6eb6ad1513",
"windows/ReplacementContinuitySelfTest.cs": "107878ab2b367f1812377c0b209f6d620da390091c3882e4be53a48e517d86a1", "windows/ReplacementContinuitySelfTest.cs": "107878ab2b367f1812377c0b209f6d620da390091c3882e4be53a48e517d86a1",
"windows/RouteLeaseSelfTest.cs": "6189c66b9f66c58bed26de4441c58a9ec02b67257bfa04ed66d702acfcd054d9", "windows/RouteLeaseSelfTest.cs": "6189c66b9f66c58bed26de4441c58a9ec02b67257bfa04ed66d702acfcd054d9",
"windows/RoutingRuleBatches.cs": "9997bfa766fffe7bed7352f307c1f6f118a9be9aa86653eaefae3b2bdaa26c1e", "windows/RoutingRuleBatches.cs": "9997bfa766fffe7bed7352f307c1f6f118a9be9aa86653eaefae3b2bdaa26c1e",
"windows/RoutingUpdateSelfTest.cs": "48c99fc7a01037aa0368c53ccdb7eec0fea1edfac3bb2532c0de89631343206d", "windows/RoutingUpdateSelfTest.cs": "48c99fc7a01037aa0368c53ccdb7eec0fea1edfac3bb2532c0de89631343206d",
"windows/ScenicTheme.cs": "faa259b527d9753bb7915f76f8b5f40f1e066b11d0a5c891e55fd6aaae48b071", "windows/ScenicTheme.cs": "d0c22d7c38071c37f56a5d0e2e7eadb3d30a3435d0bdd9e921259375c2f0f117",
"windows/StartupSelfTest.cs": "54be29a94bcb4ac20da8fd232e93b363f29c21fcb15608bc8171772da524b68b", "windows/StartupSelfTest.cs": "cb035bf5d22624ed5034b719f0c52a4c1527ace4c371e966f15f7c25c8126013",
"windows/SystemPowerShell.cs": "1f9247d2e4f8c9bad1d71105886d2ab33d8958006dcff7fadc63f27502eda6fe", "windows/SystemPowerShell.cs": "1f9247d2e4f8c9bad1d71105886d2ab33d8958006dcff7fadc63f27502eda6fe",
"windows/SystemProxy.cs": "beaf443f1e285e227e0c390d8e9114d5cf8464e0078a8bb842efa9eeb2b5e916", "windows/SystemProxy.cs": "beaf443f1e285e227e0c390d8e9114d5cf8464e0078a8bb842efa9eeb2b5e916",
"windows/THIRD_PARTY_NOTICES.md": "c7141fe279b2c364c868888db37bd995feba1552025e2259dc4662a01e5122bb", "windows/THIRD_PARTY_NOTICES.md": "c7141fe279b2c364c868888db37bd995feba1552025e2259dc4662a01e5122bb",
@@ -255,7 +257,7 @@
"windows/TailnetTransportProbe.cs": "d0811b7d9cddcbf622d88e502c7eb05c6afbddbbc0caf3077fa9ec769e52cf50", "windows/TailnetTransportProbe.cs": "d0811b7d9cddcbf622d88e502c7eb05c6afbddbbc0caf3077fa9ec769e52cf50",
"windows/TailnetTransportSelfTest.cs": "573b3271f377a04455339fb67837ed85f8a288b5f9efebd7e73d97fac08def53", "windows/TailnetTransportSelfTest.cs": "573b3271f377a04455339fb67837ed85f8a288b5f9efebd7e73d97fac08def53",
"windows/TokenStore.cs": "e07cf7d1a4cf7a1bba871c19e50b9d6355cb8c1546657346b0256c8215fed8bb", "windows/TokenStore.cs": "e07cf7d1a4cf7a1bba871c19e50b9d6355cb8c1546657346b0256c8215fed8bb",
"windows/TrafficChart.cs": "8ac141da28a350327874485004520c3a159246d2107f3b1152253f4254e76961", "windows/TrafficChart.cs": "d34dc4b5575604cef3d617e3e95562e6b0088ebf9d29ee7c6e6bda2675442137",
"windows/TunConfigBuilder.cs": "f651c0525ee0e083d4e723f9409c0992b8cc274105bb8ad1e4c7d1c75f3b4354", "windows/TunConfigBuilder.cs": "f651c0525ee0e083d4e723f9409c0992b8cc274105bb8ad1e4c7d1c75f3b4354",
"windows/TunConnectivitySelfTest.cs": "a7d7aff1d03e45dff921807cbfb8f83b5013c9df5c7e06b6662d84a8686b2f86", "windows/TunConnectivitySelfTest.cs": "a7d7aff1d03e45dff921807cbfb8f83b5013c9df5c7e06b6662d84a8686b2f86",
"windows/TunRouting.cs": "c6b3e1070a0ba0a3c42dbd12becba55404e540d06aba03cb1cc1053fa426a4c1", "windows/TunRouting.cs": "c6b3e1070a0ba0a3c42dbd12becba55404e540d06aba03cb1cc1053fa426a4c1",
@@ -263,10 +265,10 @@
"windows/UpdateSelfTest.cs": "453165bb611efb8db0d8a8c9ea13f3553e0047aa22b838c43096e3d83fe18771", "windows/UpdateSelfTest.cs": "453165bb611efb8db0d8a8c9ea13f3553e0047aa22b838c43096e3d83fe18771",
"windows/UpdateStreamSelfTest.cs": "ad059016c0197f33582b1969ab3280c5b9589a28d659613b3e97ce4a357d38c1", "windows/UpdateStreamSelfTest.cs": "ad059016c0197f33582b1969ab3280c5b9589a28d659613b3e97ce4a357d38c1",
"windows/UsageHistorySeries.cs": "9e7515ceede1899e06116352de79edd6252c921048bcae9958bf9358d93b3069", "windows/UsageHistorySeries.cs": "9e7515ceede1899e06116352de79edd6252c921048bcae9958bf9358d93b3069",
"windows/VPNPlus.csproj": "b85db9d1bbadc126d5e9112d4f78eb33fe8478fd5fb0c9818483a538af68d91b", "windows/VPNPlus.csproj": "8623063d4b69ff256adb3f5565193a758318fd0173152543745cda9b9fb275d2",
"windows/VpnApiClient.cs": "6e227467981bbc68aac7fb93fe32cfb96f06b0d06f04405209512f1a11c971af", "windows/VpnApiClient.cs": "6e227467981bbc68aac7fb93fe32cfb96f06b0d06f04405209512f1a11c971af",
"windows/WindowChrome.cs": "f7f74759d9ca149c00abd3a7e2ac1556d6630df29eb1e6afc66884dff01f66b9", "windows/WindowChrome.cs": "0eceea0879e792b8ae83a74eaf5658d4a7be6a798fbdb026ff8d19fa9aa6af2c",
"windows/WindowChromeSelfTest.cs": "9643c547733b3274c866122504cd733f1ea6b4c8ce7f0146b5298e7800c25c5b", "windows/WindowChromeSelfTest.cs": "4bc45ed8c7357f360e1d17fe189698102b249cf6d7226c887faf5be4104f55af",
"windows/XrayManager.cs": "90b69de09884d037d21f05c411aef83087ce58ceeeffaca295e583ec6be91b50", "windows/XrayManager.cs": "90b69de09884d037d21f05c411aef83087ce58ceeeffaca295e583ec6be91b50",
"windows/XrayRoutingUpdater.cs": "91fd2b5db25477dbe4de7118faef79f9c51f9a8a3dd86e8b26c676092de3bca5", "windows/XrayRoutingUpdater.cs": "91fd2b5db25477dbe4de7118faef79f9c51f9a8a3dd86e8b26c676092de3bca5",
"windows/app.manifest": "4c9a2e8e2056c3bb0ae45a5f7b2e223298ee683a82b70ba4910e17f5728cf5b6", "windows/app.manifest": "4c9a2e8e2056c3bb0ae45a5f7b2e223298ee683a82b70ba4910e17f5728cf5b6",
@@ -301,7 +303,8 @@
"windows/licenses/NSIS-COPYING.txt": "388357c1215ff403c5ebde3a5ecd273e68f8b79a579996775245d1ee65442aba", "windows/licenses/NSIS-COPYING.txt": "388357c1215ff403c5ebde3a5ecd273e68f8b79a579996775245d1ee65442aba",
"windows/licenses/Wintun-License.txt": "183adac21e7d96c508c8fd34d394b7b6708bc81564ad1bad61ab66143a008cd2", "windows/licenses/Wintun-License.txt": "183adac21e7d96c508c8fd34d394b7b6708bc81564ad1bad61ab66143a008cd2",
"windows/licenses/Xray-MPL-2.0.txt": "1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5", "windows/licenses/Xray-MPL-2.0.txt": "1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5",
"windows/release/RELEASE-NOTES-0.2.21.md": "839f36685e39c04bf692ffd2896bab4538577c0b3bbddd0a3cc335fe13b65d4c" "windows/release/RELEASE-NOTES-0.2.21.md": "839f36685e39c04bf692ffd2896bab4538577c0b3bbddd0a3cc335fe13b65d4c",
"windows/release/RELEASE-NOTES-0.2.22.md": "bf6c8b448481f59a05e8653fbaa1356d986d2d481c3cbaf02fe6402dcf55d499"
}, },
"IosSourceCommit": "b07d085413b1b6370245866fd82271b76590b6d6", "IosSourceCommit": "b07d085413b1b6370245866fd82271b76590b6d6",
"Kind": "clean-history-free-open-source-export", "Kind": "clean-history-free-open-source-export",
@@ -324,5 +327,35 @@
"Wintun-License.txt": "183adac21e7d96c508c8fd34d394b7b6708bc81564ad1bad61ab66143a008cd2", "Wintun-License.txt": "183adac21e7d96c508c8fd34d394b7b6708bc81564ad1bad61ab66143a008cd2",
"Xray-MPL-2.0.txt": "1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5" "Xray-MPL-2.0.txt": "1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5"
}, },
"Windows022MaintenanceDelta": {
"ChangedWindowsFiles": [
"windows/DailyTrafficChart.cs",
"windows/DashboardControls.cs",
"windows/DashboardInteractionSelfTest.cs",
"windows/DashboardWheelRouter.cs",
"windows/MainForm.Chrome.cs",
"windows/MainForm.Dashboard.cs",
"windows/MainForm.cs",
"windows/Program.cs",
"windows/ScenicTheme.cs",
"windows/StartupSelfTest.cs",
"windows/TrafficChart.cs",
"windows/VPNPlus.csproj",
"windows/WindowChrome.cs",
"windows/WindowChromeSelfTest.cs",
"windows/release/RELEASE-NOTES-0.2.22.md"
],
"MacosExcludedTransferredToSeparateMaintainer": true,
"OriginalAcceptanceTransferred": false,
"OriginalSourceManifestSha256": "b249400a314a1430f80e5609cd67c1360d3a3df8cde2f72be7e513fbdc0a025d",
"OtherComponentsModified": false,
"PrivateHistoryIncluded": false,
"PrivateSourceCommit": "279b4e8813391d994f89fd9128b960fd3c37d396",
"ProductionAccepted": false,
"PublicBaseCommit": "901f27baf5436a5318ef4e1e87f48782a0da73d1",
"SourceOnly": true,
"UnlicensedLoginSceneOmitted": true,
"Version": "0.2.22"
},
"WindowsSourceCommit": "0d463e6af91a3802c564b06dabb6bf86ebff5a38" "WindowsSourceCommit": "0d463e6af91a3802c564b06dabb6bf86ebff5a38"
} }
+10 -2
View File
@@ -16,7 +16,14 @@ internal sealed class DailyTrafficChart : Control
$"套餐全部设备 · {_series.Timezone}\n{_series.Note}\n本期总量不随筛选改变;本次流量仅指本机当前连接。"; $"套餐全部设备 · {_series.Timezone}\n{_series.Note}\n本期总量不随筛选改变;本次流量仅指本机当前连接。";
internal string SelectedRange => _period.Key; internal string SelectedRange => _period.Key;
internal int PointCount => _series?.Points.Count ?? 0; 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) internal void SetHistory(List<DailyUsage> history, Dictionary<string, UsageHistorySeries>? ranges = null)
{ _legacy = history; _ranges = ranges; RefreshSeries(); } { _legacy = history; _ranges = ranges; RefreshSeries(); }
internal void SetPeriod(UsageHistoryPeriod period) { _period = period; 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)) if (points.Count == 0 || points.All(p => p.UploadBytes is null && p.DownloadBytes is null))
{ {
var message = _series 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) void Line(bool up)
{ {
+4 -3
View File
@@ -110,8 +110,9 @@ internal sealed class MetricCard : CardPanel
using var headingFont = Brand.Font(9); using var headingFont = Brand.Font(9);
using var unitFont = Brand.Font(9); using var unitFont = Brand.Font(9);
using var hintFont = Brand.Font(7.8f); using var hintFont = Brand.Font(7.8f);
TextRenderer.DrawText(g, Heading, headingFont, new Rectangle(x, S(10), available, S(23)), Brand.Text, TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis); var paintFlags = TextFormatFlags.PreserveGraphicsTranslateTransform | TextFormatFlags.PreserveGraphicsClipping;
var flags = TextFormatFlags.NoPadding | TextFormatFlags.SingleLine; TextRenderer.DrawText(g, Heading, headingFont, new Rectangle(x, S(10), available, S(23)), Brand.Text, paintFlags | TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);
var flags = TextFormatFlags.NoPadding | TextFormatFlags.SingleLine | paintFlags;
var unitWidth = TextRenderer.MeasureText(g, UnitText, unitFont, Size.Empty, flags).Width; var unitWidth = TextRenderer.MeasureText(g, UnitText, unitFont, Size.Empty, flags).Width;
var size = 22f; var size = 22f;
Font valueFont; Font valueFont;
@@ -127,7 +128,7 @@ internal sealed class MetricCard : CardPanel
TextRenderer.DrawText(g, ValueText, valueFont, new Rectangle(x, S(31), available - unitWidth - S(4), S(32)), Brand.Navy, flags | TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis); TextRenderer.DrawText(g, ValueText, valueFont, new Rectangle(x, S(31), available - unitWidth - S(4), S(32)), Brand.Navy, flags | TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);
TextRenderer.DrawText(g, UnitText, unitFont, new Rectangle(x + valueWidth + S(4), S(40), unitWidth, S(23)), Brand.Muted, flags | TextFormatFlags.VerticalCenter); TextRenderer.DrawText(g, UnitText, unitFont, new Rectangle(x + valueWidth + S(4), S(40), unitWidth, S(23)), Brand.Muted, flags | TextFormatFlags.VerticalCenter);
} }
TextRenderer.DrawText(g, Hint, hintFont, new Rectangle(x, S(64), available, S(17)), Brand.Muted, TextFormatFlags.EndEllipsis); TextRenderer.DrawText(g, Hint, hintFont, new Rectangle(x, S(64), available, S(17)), Brand.Muted, paintFlags | TextFormatFlags.EndEllipsis);
} }
} }
+139
View File
@@ -0,0 +1,139 @@
using System.Text.Json;
namespace UCVL.VPNPlus;
internal static class DashboardInteractionSelfTest
{
internal static int Run()
{
var checks = new Dictionary<string, bool>();
string? error = null;
try
{
using var form = new MainForm(preview: true, uiOnly: true) { Opacity = 0, ShowInTaskbar = false };
foreach (var check in form.CheckDashboardInteraction()) checks.Add(check.Key, check.Value);
}
catch (Exception exception) { error = exception.ToString(); }
var passed = error is null && checks.Count >= 15 && checks.Values.All(value => value);
File.WriteAllText(Path.Combine(AppContext.BaseDirectory, "dashboard-interaction-self-test.json"),
JsonSerializer.Serialize(new { passed, checks, error, scope = "owned synthetic WinForms fixture; no physical user-input or production acceptance claim",
network_modified = false, installed_client_modified = false, credentials_loaded = false }, new JsonSerializerOptions { WriteIndented = true }));
return passed ? 0 : 28;
}
}
internal sealed partial class MainForm
{
internal Dictionary<string, bool> CheckDashboardInteraction()
{
var checks = new Dictionary<string, bool>();
var profile = new Profile
{
DisplayName = "滚动测试", Email = "fixture@example.invalid",
Nodes = [new NodeInfo { Slug = "fixture", Name = "测试节点" }],
RouteModes = [new RouteModeInfo { Id = "smart", Name = "AI 智能代理" }]
};
Show();
ShowDashboard(profile);
_refreshTimer.Stop();
Size = MinimumSize;
PerformLayout();
LayoutDashboard();
Application.DoEvents();
int Limit() => Math.Max(0, _dashboardScrollBar.Maximum - _dashboardScrollBar.LargeChange + 1);
bool Wheel(Control target, int delta, Point? screenPoint = null)
{
var screen = screenPoint ?? _dashboardView.PointToScreen(new Point(20, 20));
var packedPoint = unchecked((int)((ushort)screen.X | (uint)(ushort)screen.Y << 16));
var packedDelta = unchecked((int)((uint)(ushort)(short)delta << 16));
var message = Message.Create(target.Handle, 0x20a, (IntPtr)packedDelta, (IntPtr)packedPoint);
return Application.FilterMessage(ref message);
}
checks["compact_view_has_real_scroll_range"] = _dashboardScrollBar.Visible && Limit() > 0;
foreach (var (name, control) in new (string, Control)[]
{
("card", _trafficCard), ("nested_metric", _uploadMetric), ("chart", _trafficChart),
("nested_label", _uploadLegend), ("closed_history_combo", _historyRangeCombo),
("closed_node_combo", _connectionModeCombo), ("closed_mode_combo", _routeCombo),
("button", _connectButton)
})
{
_dashboardScrollBar.Value = 0;
var oldSelection = control is ComboBox combo ? combo.SelectedIndex : -1;
checks["wheel_scrolls_over_" + name] = Wheel(control, -120) && _dashboardScrollBar.Value > 0
&& (control is not ComboBox selector || selector.SelectedIndex == oldSelection);
}
_dashboardScrollBar.Value = 0;
var halfHandled = Wheel(_trafficChart, -60);
var firstHalf = _dashboardScrollBar.Value;
checks["high_resolution_wheel_accumulates_half_notches"] = halfHandled && firstHalf == 0
&& Wheel(_trafficChart, -60) && _dashboardScrollBar.Value > 0;
_dashboardScrollBar.Value = Limit();
checks["wheel_bottom_clamped"] = Wheel(_dailyChart, -240) && _dashboardScrollBar.Value == Limit();
checks["wheel_up_returns_from_bottom"] = Wheel(_dailyChart, 120) && _dashboardScrollBar.Value < Limit();
_dashboardScrollBar.Value = Math.Min(137, Limit());
var previous = _dashboardScrollBar.Value;
UpdateProfile(profile, preserveSelections: true);
DisplayTraffic(1234, 5678, "隔离刷新");
LayoutDashboard();
checks["profile_and_metric_refresh_preserve_scroll"] = _dashboardScrollBar.Value == previous && _dashboardBody.Top == -previous;
ClientSize = new Size(ClientSize.Width, ClientSize.Height + ScaleLogical(20));
LayoutDashboard();
checks["resize_preserves_valid_scroll"] = _dashboardScrollBar.Value == Math.Min(previous, Limit());
_dashboardScrollBar.Value = Limit();
checks["footer_reachable_without_horizontal_scroll"] = !_dashboardView.HorizontalScroll.Visible
&& _footer.RectangleToScreen(_footer.ClientRectangle).Bottom <= _dashboardView.RectangleToScreen(_dashboardView.ClientRectangle).Bottom;
previous = _dashboardScrollBar.Value;
checks["header_pointer_does_not_scroll_dashboard"] = !Wheel(_trafficChart, -120, _brandHeader.PointToScreen(new Point(20, 20)))
&& _dashboardScrollBar.Value == previous;
using (var other = new Form())
checks["other_window_messages_not_captured"] = !Wheel(other, -120) && _dashboardScrollBar.Value == previous;
_dashboardScrollBar.Value = 0;
_historyRangeCombo.DroppedDown = true;
checks["open_combo_keeps_native_wheel_navigation"] = !Wheel(_historyRangeCombo, -120) && _dashboardScrollBar.Value == 0;
_historyRangeCombo.DroppedDown = false;
checks["dashboard_reuses_full_login_artwork"] = _dashboardView.LoginArtwork && _dashboardBody.ParentArtwork;
checks["card_surface_is_half_transparent"] = CardPanel.SurfaceAlpha == 128;
checks["whole_content_composition_disabled"] = !_content.ComposeChildren;
checks["metric_dirty_refresh_clears_previous_digits"] = CheckMetricRefreshPaint();
ShowLogin();
checks["hidden_dashboard_does_not_consume_login_wheel"] = !Wheel(_loginText, -120);
RequestExit();
return checks;
}
private static bool CheckMetricRefreshPaint()
{
// Repaint only an owned control into a deliberately dirty backing
// surface. This checks the real WM_PRINTCLIENT path, not OnPaint alone.
using var parent = new ScenicPanel { LoginArtwork = true, Size = new Size(700, 500) };
using var card = new CardPanel { Bounds = new Rectangle(30, 150, 500, 170), MetricBand = true };
using var metric = new MetricCard("本次代理流量", DashboardIcon.Document)
{ Embedded = true, Bounds = new Rectangle(30, 40, 250, 85) };
parent.Controls.Add(card);
card.Controls.Add(metric);
_ = parent.Handle; _ = card.Handle; _ = metric.Handle;
using var actual = new Bitmap(metric.Width, metric.Height);
void Print()
{
using var graphics = Graphics.FromImage(actual);
var hdc = graphics.GetHdc();
try { ChromeNative.SendMessage(metric.Handle, 0x318, hdc, (IntPtr)(0x4 | 0x8)); }
finally { graphics.ReleaseHdc(hdc); }
}
metric.SetBytes(1_073_741_824, hint: "本次连接累计");
Print();
using var expected = new Bitmap(actual);
for (var iteration = 0; iteration < 5; iteration++)
{
metric.SetBytes(999_999_999_999, hint: "旧数据应清除");
Print();
metric.SetBytes(1_073_741_824, hint: "本次连接累计");
Print();
for (var y = 0; y < actual.Height; y++)
for (var x = 0; x < actual.Width; x++)
if (actual.GetPixel(x, y) != expected.GetPixel(x, y)) return false;
}
return true;
}
}
+60
View File
@@ -0,0 +1,60 @@
namespace UCVL.VPNPlus;
// WinForms does not bubble wheel input reliably through nested controls. Route
// only this dashboard's queued wheel messages before charts/native closed combos
// consume them. No global hook, focus stealing or installed-window lookup.
internal sealed class DashboardWheelRouter : IMessageFilter, IDisposable
{
private readonly Control _viewport;
private readonly VScrollBar _scrollBar;
private int _remainder;
private bool _disposed;
internal DashboardWheelRouter(Control viewport, VScrollBar scrollBar)
{
_viewport = viewport;
_scrollBar = scrollBar;
viewport.Disposed += ViewportDisposed;
viewport.VisibleChanged += ViewportVisibilityChanged;
Application.AddMessageFilter(this);
}
public bool PreFilterMessage(ref Message message)
{
if (_disposed || message.Msg != 0x20a /* WM_MOUSEWHEEL */ || !_viewport.Visible
|| !_viewport.Enabled || !_scrollBar.Visible || !_viewport.IsHandleCreated) return false;
var target = Control.FromChildHandle(message.HWnd);
if (target is null || target.FindForm() != _viewport.FindForm()) return false;
var packed = message.LParam.ToInt64();
var point = new Point(unchecked((short)(packed & 0xffff)), unchecked((short)((packed >> 16) & 0xffff)));
if (!_viewport.RectangleToScreen(_viewport.ClientRectangle).Contains(point)) return false;
// Open combo lists own their wheel navigation; closed selectors must
// not silently change node/mode/history when scrolling the page.
for (Control? control = target; control is not null; control = control.Parent)
if (control is ComboBox { DroppedDown: true }) return false;
var delta = unchecked((short)((message.WParam.ToInt64() >> 16) & 0xffff));
if (delta == 0) return false;
_remainder += delta;
var notches = _remainder / 120;
_remainder %= 120;
if (notches != 0)
{
var lines = SystemInformation.MouseWheelScrollLines;
var step = lines < 0 ? _scrollBar.LargeChange : (int)Math.Round(18 * _viewport.DeviceDpi / 96d) * lines;
var limit = Math.Max(0, _scrollBar.Maximum - _scrollBar.LargeChange + 1);
_scrollBar.Value = (int)Math.Clamp((long)_scrollBar.Value - (long)notches * step, 0, limit);
}
return true;
}
private void ViewportDisposed(object? sender, EventArgs e) => Dispose();
private void ViewportVisibilityChanged(object? sender, EventArgs e) => _remainder = 0;
public void Dispose()
{
if (_disposed) return;
_disposed = true;
Application.RemoveMessageFilter(this);
_viewport.Disposed -= ViewportDisposed;
_viewport.VisibleChanged -= ViewportVisibilityChanged;
}
}
+30 -6
View File
@@ -3,6 +3,7 @@ namespace UCVL.VPNPlus;
internal sealed partial class MainForm internal sealed partial class MainForm
{ {
private WindowChrome? _windowChrome; private WindowChrome? _windowChrome;
private bool _minimizedToTray;
internal WindowChrome? WindowChromeForTest => _windowChrome; internal WindowChrome? WindowChromeForTest => _windowChrome;
// Remove the native caption before HWND creation, not only after its first // Remove the native caption before HWND creation, not only after its first
@@ -29,23 +30,46 @@ internal sealed partial class MainForm
private void InitializeWindowChrome(Panel header) private void InitializeWindowChrome(Panel header)
{ {
if (_windowChrome is not null) return; if (_windowChrome is not null) return;
_windowChrome = new WindowChrome(this, header, RequestExit); _windowChrome = new WindowChrome(this, header, RequestExit, MinimizeToTray);
_windowChrome.SetLoginMode(true); _windowChrome.SetLoginMode(true);
} }
private void LayoutWindowChrome() => _windowChrome?.LayoutButtons(); private void LayoutWindowChrome() => _windowChrome?.LayoutButtons();
// Minimize is a normal taskbar state, never Hide() or a disconnect. Avoid // Keep the core and timers alive. Only the window presentation changes;
// presenting a second, tray-only entry while the taskbar owns restoration. // restore/exit remain the existing tray menu actions.
private void MinimizeToTray()
{
if (_exiting || IsDisposed || Disposing || _windowChrome is not { LoginMode: false }) return;
_minimizedToTray = true;
Hide();
ShowInTaskbar = false;
UpdateTaskbarPresentation();
}
private void RestoreFromTrayPresentation()
{
_minimizedToTray = false;
ShowInTaskbar = true;
WindowState = FormWindowState.Normal;
UpdateTaskbarPresentation();
}
private void UpdateTaskbarPresentation() private void UpdateTaskbarPresentation()
{ {
if (_exitResourcesDisposed) return; if (_exitResourcesDisposed) return;
if (!_minimizedToTray && Visible && WindowState == FormWindowState.Minimized
&& _windowChrome is { LoginMode: false })
{
MinimizeToTray();
return;
}
_notifyIcon.Visible = ShouldShowTrayIcon(WindowState, _preview || _uiOnly || _exiting); _notifyIcon.Visible = ShouldShowTrayIcon(WindowState, _preview || _uiOnly || _exiting);
} }
internal static bool ShouldShowTrayIcon(FormWindowState state, bool suppressed) => internal static bool ShouldShowTrayIcon(FormWindowState state, bool suppressed) =>
!suppressed && state != FormWindowState.Minimized; !suppressed;
internal bool MinimizedToTaskbarForTest => WindowState == FormWindowState.Minimized internal bool MinimizedToTrayForTest => _minimizedToTray && !Visible && !ShowInTaskbar && !_exiting
&& ShowInTaskbar && Visible && !_notifyIcon.Visible && !_exiting; && (_preview || _uiOnly || _notifyIcon.Visible);
} }
+13 -12
View File
@@ -29,22 +29,29 @@ internal sealed partial class MainForm
private readonly DashboardGlyph _trafficIcon = new(DashboardIcon.Chart), _dailyIcon = new(DashboardIcon.History); private readonly DashboardGlyph _trafficIcon = new(DashboardIcon.Chart), _dailyIcon = new(DashboardIcon.History);
private readonly Label _trafficHeading = new(), _dailyHeading = new(); private readonly Label _trafficHeading = new(), _dailyHeading = new();
private bool _layingOutDashboard; private bool _layingOutDashboard;
private DashboardWheelRouter? _dashboardWheelRouter;
private void BuildDashboardView() private void BuildDashboardView()
{ {
_dashboardView.Dock = DockStyle.Fill; _dashboardView.Dock = DockStyle.Fill;
_dashboardView.BackColor = Brand.Surface; _dashboardView.BackColor = Brand.Surface;
_dashboardView.LoginArtwork = true;
_dashboardView.AutoScroll = false; _dashboardView.AutoScroll = false;
_dashboardView.Visible = false; _dashboardView.Visible = false;
_dashboardView.Resize += (_, _) => LayoutDashboard(); _dashboardView.Resize += (_, _) => LayoutDashboard();
_content.Controls.Add(_dashboardView); _content.Controls.Add(_dashboardView);
_dashboardBody.BackColor = Brand.Surface; _dashboardBody.BackColor = Brand.Surface;
_dashboardBody.ParentArtwork = true;
_dashboardView.Controls.Add(_dashboardBody); _dashboardView.Controls.Add(_dashboardBody);
_dashboardView.Controls.Add(_dashboardScrollBar); _dashboardView.Controls.Add(_dashboardScrollBar);
_dashboardScrollBar.AccessibleName = "主界面垂直滚动"; _dashboardScrollBar.AccessibleName = "主界面垂直滚动";
_dashboardScrollBar.ValueChanged += (_, _) => _dashboardBody.Top = -_dashboardScrollBar.Value; _dashboardScrollBar.ValueChanged += (_, _) =>
_dashboardView.MouseWheel += DashboardMouseWheel; {
_dashboardBody.MouseWheel += DashboardMouseWheel; _dashboardBody.Top = -_dashboardScrollBar.Value;
// Child surfaces use the viewport's fixed backdrop coordinates.
// Moving a canvas must repaint them, not bit-blit old transparent pixels.
_dashboardBody.Invalidate(true);
};
ConfigureLabel(_welcomeLabel, "", Brand.Font(15, FontStyle.Bold), Brand.Navy); ConfigureLabel(_welcomeLabel, "", Brand.Font(15, FontStyle.Bold), Brand.Navy);
ConfigureLabel(_accountLabel, "", Brand.Font(9.5f), Brand.Muted); ConfigureLabel(_accountLabel, "", Brand.Font(9.5f), Brand.Muted);
ConfigureLabel(_identityBadge, "", Brand.Font(8.5f), Brand.RoyalBlue); ConfigureLabel(_identityBadge, "", Brand.Font(8.5f), Brand.RoyalBlue);
@@ -147,6 +154,7 @@ internal sealed partial class MainForm
} }
_sessionMetric.SetBytes(0, hint: "本次连接累计"); _sessionMetric.SetBytes(0, hint: "本次连接累计");
DisplayTraffic(null, null, "仅代理流量 · 近 5 分钟"); DisplayTraffic(null, null, "仅代理流量 · 近 5 分钟");
_dashboardWheelRouter = new DashboardWheelRouter(_dashboardView, _dashboardScrollBar);
LayoutDashboard(); LayoutDashboard();
} }
@@ -159,14 +167,6 @@ internal sealed partial class MainForm
_downloadLegend.Text = download.HasValue ? $"● 下载 {FormatBytes((long)download.Value)}/s" : "● 下载 —"; _downloadLegend.Text = download.HasValue ? $"● 下载 {FormatBytes((long)download.Value)}/s" : "● 下载 —";
} }
private void DashboardMouseWheel(object? sender, MouseEventArgs e)
{
if (!_dashboardScrollBar.Visible || e is HandledMouseEventArgs { Handled: true }) return;
var limit = Math.Max(0, _dashboardScrollBar.Maximum - _dashboardScrollBar.LargeChange + 1);
_dashboardScrollBar.Value = Math.Clamp(_dashboardScrollBar.Value - Math.Sign(e.Delta) * ScaleLogical(54), 0, limit);
if (e is HandledMouseEventArgs handled) handled.Handled = true;
}
private void LayoutDashboard() private void LayoutDashboard()
{ {
if (_layingOutDashboard || _dashboardView.ClientSize.Width <= 0) return; if (_layingOutDashboard || _dashboardView.ClientSize.Width <= 0) return;
@@ -305,7 +305,8 @@ internal sealed partial class MainForm
checks["product_header_named_zonghengjia"] = form.Text == "纵横家" && form._brandHeader.Controls.OfType<Label>().Any(label => label.Text == "纵横家"); checks["product_header_named_zonghengjia"] = form.Text == "纵横家" && form._brandHeader.Controls.OfType<Label>().Any(label => label.Text == "纵横家");
checks["powered_by_removed_from_login_and_footer"] = !form._footer.Controls.OfType<Label>().Concat(form._loginView.Controls.OfType<Label>()) checks["powered_by_removed_from_login_and_footer"] = !form._footer.Controls.OfType<Label>().Concat(form._loginView.Controls.OfType<Label>())
.Any(label => label.Text.Contains("Powered by", StringComparison.OrdinalIgnoreCase) || label.Text == "优创未来"); .Any(label => label.Text.Contains("Powered by", StringComparison.OrdinalIgnoreCase) || label.Text == "优创未来");
checks["content_composes_child_painting"] = form._content.ComposeChildren; checks["content_uses_local_buffers_not_composited_subtree"] = !form._content.ComposeChildren;
checks["dashboard_reuses_login_backdrop"] = form._dashboardView.LoginArtwork && form._dashboardBody.ParentArtwork;
checks["header_only_has_minimize_button"] = form._brandHeader.Controls.OfType<CaptionButton>().Count() == 1; checks["header_only_has_minimize_button"] = form._brandHeader.Controls.OfType<CaptionButton>().Count() == 1;
checks["scenic_asset_is_decoration_only"] = form._brandHeader.BackgroundImage is null && form._trafficChart.Parent == form._trafficCard; checks["scenic_asset_is_decoration_only"] = form._brandHeader.BackgroundImage is null && form._trafficChart.Parent == form._trafficCard;
checks["scenic_artwork_packaged_in_exe"] = ScenicTheme.ArtworkAvailable; checks["scenic_artwork_packaged_in_exe"] = ScenicTheme.ArtworkAvailable;
+14 -10
View File
@@ -37,7 +37,7 @@ internal sealed partial class MainForm : Form
private readonly bool _preview; private readonly bool _preview;
private readonly Func<CancellationToken, Task>? _startupRecovery; private readonly Func<CancellationToken, Task>? _startupRecovery;
private readonly ScenicPanel _content = new() { ComposeChildren = true, LoginArtwork = true }; private readonly ScenicPanel _content = new() { ComposeChildren = false, LoginArtwork = true };
private readonly BrandHeaderPanel _brandHeader = new(); private readonly BrandHeaderPanel _brandHeader = new();
private readonly Label _headerPoem = new(); private readonly Label _headerPoem = new();
private readonly RoundedCardPanel _loginView = new(); private readonly RoundedCardPanel _loginView = new();
@@ -98,6 +98,7 @@ internal sealed partial class MainForm : Form
AutoScaleMode = AutoScaleMode.Dpi; AutoScaleMode = AutoScaleMode.Dpi;
Font = Brand.Font(9.5f); Font = Brand.Font(9.5f);
DoubleBuffered = true; DoubleBuffered = true;
ResizeRedraw = true;
Icon = LoadIcon(); Icon = LoadIcon();
SuspendLayout(); SuspendLayout();
@@ -1185,6 +1186,7 @@ internal sealed partial class MainForm : Form
// Windows can deliver a queued tray event while the form is already // Windows can deliver a queued tray event while the form is already
// shutting down. Ignore it instead of touching disposed WinForms state. // shutting down. Ignore it instead of touching disposed WinForms state.
if (_exiting || IsDisposed || Disposing || !IsHandleCreated) return; if (_exiting || IsDisposed || Disposing || !IsHandleCreated) return;
RestoreFromTrayPresentation();
Show(); Show();
WindowState = FormWindowState.Normal; WindowState = FormWindowState.Normal;
if (!Screen.AllScreens.Any(screen => screen.WorkingArea.IntersectsWith(Bounds))) CenterToScreen(); if (!Screen.AllScreens.Any(screen => screen.WorkingArea.IntersectsWith(Bounds))) CenterToScreen();
@@ -1391,19 +1393,21 @@ internal sealed partial class MainForm : Form
internal class CardPanel : Panel internal class CardPanel : Panel
{ {
internal const int SurfaceAlpha = 128;
internal bool Embedded { get; set; } internal bool Embedded { get; set; }
internal bool ScenicStatus { get; set; } internal bool ScenicStatus { get; set; }
internal bool AccentBar { get; set; } internal bool AccentBar { get; set; }
internal bool MetricBand { get; set; } internal bool MetricBand { get; set; }
internal CardPanel() internal CardPanel()
{ {
SetStyle(ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); SetStyle(ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw
| ControlStyles.AllPaintingInWmPaint | ControlStyles.SupportsTransparentBackColor, true);
SetStyle(ControlStyles.Opaque, false);
BackColor = Color.Transparent;
} }
protected override void OnPaintBackground(PaintEventArgs eventArgs) protected override void OnPaintBackground(PaintEventArgs eventArgs)
{ {
if (Embedded) { eventArgs.Graphics.Clear(Color.White); return; }
if (Width < 16 || Height < 16) return;
var g = eventArgs.Graphics; var g = eventArgs.Graphics;
if (Parent is not null) if (Parent is not null)
{ {
@@ -1413,22 +1417,22 @@ internal class CardPanel : Panel
g.Restore(state); g.Restore(state);
} }
else g.Clear(Brand.Surface); else g.Clear(Brand.Surface);
// Metrics inherit the freshly painted card; never retain the previous
// number, or add another white tint on every child repaint.
if (Embedded || Width < 16 || Height < 16) return;
g.SmoothingMode = SmoothingMode.AntiAlias; g.SmoothingMode = SmoothingMode.AntiAlias;
var s = DeviceDpi / 96f; var s = DeviceDpi / 96f;
var radius = Math.Max(6, (int)(11 * s)); var radius = Math.Max(6, (int)(11 * s));
using var shadow = UiGeometry.RoundedRectangle(new Rectangle(1, 3, Width - 3, Height - 4), radius); using var shadow = UiGeometry.RoundedRectangle(new Rectangle(1, 3, Width - 3, Height - 4), radius);
using var shadowBrush = new SolidBrush(Color.FromArgb(215, 237, 249)); using var shadowPen = new Pen(Color.FromArgb(32, 110, 169, 199), Math.Max(1, 2 * s));
g.FillPath(shadowBrush, shadow); g.DrawPath(shadowPen, shadow);
using var path = UiGeometry.RoundedRectangle(new Rectangle(1, 1, Width - 3, Height - 5), radius); using var path = UiGeometry.RoundedRectangle(new Rectangle(1, 1, Width - 3, Height - 5), radius);
using var fill = new SolidBrush(Color.White); using var fill = new SolidBrush(Color.FromArgb(SurfaceAlpha, Color.White));
using var border = new Pen(ScenicStatus ? Color.White : Color.FromArgb(201, 227, 249), Math.Max(1, s * (ScenicStatus ? 1.7f : .75f))); using var border = new Pen(ScenicStatus ? Color.White : Color.FromArgb(201, 227, 249), Math.Max(1, s * (ScenicStatus ? 1.7f : .75f)));
g.FillPath(fill, path); g.FillPath(fill, path);
if (ScenicStatus) if (ScenicStatus)
{ {
var state = g.Save(); g.SetClip(path); var state = g.Save(); g.SetClip(path);
ScenicTheme.Art(g, ClientRectangle, .19f);
using var mist = new LinearGradientBrush(ClientRectangle, Color.FromArgb(200, 243, 255, 252), Color.FromArgb(100, 228, 250, 253), 0f);
g.FillRectangle(mist, ClientRectangle);
ScenicTheme.Clouds(g, new Rectangle(Width - (int)(260*s), (int)(14*s), (int)(120*s), (int)(50*s)), .6f); ScenicTheme.Clouds(g, new Rectangle(Width - (int)(260*s), (int)(14*s), (int)(120*s), (int)(50*s)), .6f);
g.Restore(state); g.Restore(state);
} }
+5
View File
@@ -27,6 +27,11 @@ internal static class Program
ApplicationConfiguration.Initialize(); ApplicationConfiguration.Initialize();
return WindowChromeSelfTest.Run(); return WindowChromeSelfTest.Run();
} }
if (args.Length == 1 && args[0] == "--dashboard-interaction-self-test")
{
ApplicationConfiguration.Initialize();
return DashboardInteractionSelfTest.Run();
}
if (args.Length == 2 && args[0] == "--learning-expiry-soak" && int.TryParse(args[1], out var soakMinutes) && soakMinutes is >= 1 and <= 35) if (args.Length == 2 && args[0] == "--learning-expiry-soak" && int.TryParse(args[1], out var soakMinutes) && soakMinutes is >= 1 and <= 35)
return LearningExpirySoakSelfTest.RunAsync(soakMinutes).GetAwaiter().GetResult(); return LearningExpirySoakSelfTest.RunAsync(soakMinutes).GetAwaiter().GetResult();
if (args.Length == 1 && args[0] == "--learning-self-test") return LearningSelfTest.Run(); if (args.Length == 1 && args[0] == "--learning-self-test") return LearningSelfTest.Run();
+4 -2
View File
@@ -1,6 +1,6 @@
# 纵横家 Windows 0.2.21 开源源码 # 纵横家 Windows 0.2.22 开源源码
基于已冻结的 0.2.21 r22 第一方 Windows Forms / .NET 8 源码整理。此导出不是原安装包的逐字节副本:删除许可来源不明的可选登录插图及内部运维历史,保留原创山水缺图 fallback;端点为示例配置。原候选测试报告不能当作本导出的构建或生产验收证明。 基于已冻结的 0.2.22 r2 第一方 Windows Forms / .NET 8 源码整理。此导出不是原安装包的逐字节副本:删除许可来源不明的可选登录插图及内部运维历史,保留原创山水缺图 fallback;端点为示例配置。原候选测试报告不能当作本导出的构建或生产验收证明。
## 构建 ## 构建
@@ -16,3 +16,5 @@ dotnet publish VPNPlus.csproj -c Release -r win-x64 --self-contained true
公司公开 API/下载域名保留兼容用途,内部节点值已替换为示例;不能直接连接公司生产服务。请使用自有环境配置。登录令牌由运行时产生,不应提交进源码。 公司公开 API/下载域名保留兼容用途,内部节点值已替换为示例;不能直接连接公司生产服务。请使用自有环境配置。登录令牌由运行时产生,不应提交进源码。
公司自有代码适用 LICENSE;公司 Logo/商标保留来源识别用途、不授予品牌权利;第三方许可文本在 licenses/ 中,原 THIRD_PARTY_NOTICES.md 保持原文。 公司自有代码适用 LICENSE;公司 Logo/商标保留来源识别用途、不授予品牌权利;第三方许可文本在 licenses/ 中,原 THIRD_PARTY_NOTICES.md 保持原文。
本次只同步Windows界面维护代码:滚动/刷新、托盘与透明卡片。清洁导出继续省略可选登录人物插图,使用已有原创山水fallback;未重新导出或修改其它平台。安装包发布证据不能转移为此脱敏源码的构建/真实网络验收。
+9
View File
@@ -155,6 +155,7 @@ internal sealed class ScenicPanel : Panel
internal bool ComposeChildren { get; set; } internal bool ComposeChildren { get; set; }
internal bool FooterArtwork { get; set; } internal bool FooterArtwork { get; set; }
internal bool LoginArtwork { get; set; } internal bool LoginArtwork { get; set; }
internal bool ParentArtwork { get; set; }
protected override CreateParams CreateParams protected override CreateParams CreateParams
{ {
get get
@@ -167,6 +168,14 @@ internal sealed class ScenicPanel : Panel
internal ScenicPanel() { DoubleBuffered = true; ResizeRedraw = true; BackColor = Brand.Surface; } internal ScenicPanel() { DoubleBuffered = true; ResizeRedraw = true; BackColor = Brand.Surface; }
protected override void OnPaintBackground(PaintEventArgs e) protected override void OnPaintBackground(PaintEventArgs e)
{ {
if (ParentArtwork && Parent is { } parent)
{
var state = e.Graphics.Save();
e.Graphics.TranslateTransform(-Left, -Top);
InvokePaintBackground(parent, new PaintEventArgs(e.Graphics, parent.ClientRectangle));
e.Graphics.Restore(state);
return;
}
if (!LoginArtwork) if (!LoginArtwork)
{ {
ScenicTheme.Backdrop(e.Graphics, ClientSize, DeviceDpi, footer: FooterArtwork); ScenicTheme.Backdrop(e.Graphics, ClientSize, DeviceDpi, footer: FooterArtwork);
+6 -6
View File
@@ -99,21 +99,21 @@ internal static class StartupSelfTest
form.ShowFromTray(); form.ShowFromTray();
report["hidden_window_restored"] = form.LoginReadyForTest; report["hidden_window_restored"] = form.LoginReadyForTest;
form.WindowState = FormWindowState.Minimized; form.WindowState = FormWindowState.Minimized;
report["minimized_only_in_taskbar_without_exit"] = form.MinimizedToTaskbarForTest; report["minimized_only_in_tray_without_exit"] = form.MinimizedToTrayForTest;
report["production_minimized_tray_hidden"] = !MainForm.ShouldShowTrayIcon(FormWindowState.Minimized, false); report["production_minimized_tray_available"] = MainForm.ShouldShowTrayIcon(FormWindowState.Minimized, false);
report["production_restored_tray_available"] = MainForm.ShouldShowTrayIcon(FormWindowState.Normal, false); report["production_restored_tray_available"] = MainForm.ShouldShowTrayIcon(FormWindowState.Normal, false);
report["offline_preview_never_publishes_tray"] = Enum.GetValues<FormWindowState>() report["offline_preview_never_publishes_tray"] = Enum.GetValues<FormWindowState>()
.All(state => !MainForm.ShouldShowTrayIcon(state, true)); .All(state => !MainForm.ShouldShowTrayIcon(state, true));
form.ShowFromTray(); form.ShowFromTray();
report["minimized_window_restored"] = form.WindowState == FormWindowState.Normal && form.LoginReadyForTest; report["minimized_window_restored"] = form.WindowState == FormWindowState.Normal && form.LoginReadyForTest;
var minimizeButton = form.Controls.OfType<BrandHeaderPanel>().Single().Controls.OfType<CaptionButton>().Single(); var minimizeButton = form.Controls.OfType<BrandHeaderPanel>().Single().Controls.OfType<CaptionButton>().Single();
var programmaticMinimize = await WindowChromeSelfTest.ProbeMinimizeInputAsync(form, minimizeButton, mouse: false); var programmaticMinimize = await WindowChromeSelfTest.ProbeMinimizeInputAsync(form, minimizeButton, mouse: false, tray: true);
report["mainform_performclick_detail"] = programmaticMinimize; report["mainform_performclick_detail"] = programmaticMinimize;
report["mainform_performclick_minimizes"] = programmaticMinimize.Passed && form.MinimizedToTaskbarForTest; report["mainform_performclick_minimizes_to_tray"] = programmaticMinimize.Passed && form.MinimizedToTrayForTest;
form.ShowFromTray(); form.ShowFromTray();
var mouseMinimize = await WindowChromeSelfTest.ProbeMinimizeInputAsync(form, minimizeButton, mouse: true); var mouseMinimize = await WindowChromeSelfTest.ProbeMinimizeInputAsync(form, minimizeButton, mouse: true, tray: true);
report["mainform_mouse_minimize_detail"] = mouseMinimize; report["mainform_mouse_minimize_detail"] = mouseMinimize;
report["mainform_mouse_down_up_click_minimizes"] = mouseMinimize.Passed && form.MinimizedToTaskbarForTest; report["mainform_mouse_down_up_click_minimizes_to_tray"] = mouseMinimize.Passed && form.MinimizedToTrayForTest;
form.ShowFromTray(); form.ShowFromTray();
report["mainform_mouse_minimize_restores"] = form.WindowState == FormWindowState.Normal && form.LoginReadyForTest; report["mainform_mouse_minimize_restores"] = form.WindowState == FormWindowState.Normal && form.LoginReadyForTest;
chrome.SetLoginMode(true); chrome.SetLoginMode(true);
+14 -5
View File
@@ -6,7 +6,14 @@ namespace UCVL.VPNPlus;
internal sealed class TrafficChart : Control internal sealed class TrafficChart : Control
{ {
private readonly Queue<(DateTimeOffset Time, double Up, double Down)> _points = new(); private readonly Queue<(DateTimeOffset Time, double Up, double Down)> _points = new();
internal TrafficChart() { DoubleBuffered = true; BackColor = Color.White; Font = Brand.Font(7.3f); } internal TrafficChart()
{
DoubleBuffered = true;
SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.Opaque, false);
BackColor = Color.Transparent;
Font = Brand.Font(7.3f);
}
internal void Add(double up, double down, DateTimeOffset? time = null) internal void Add(double up, double down, DateTimeOffset? time = null)
{ {
var at = time ?? DateTimeOffset.Now; var at = time ?? DateTimeOffset.Now;
@@ -27,7 +34,8 @@ internal sealed class TrafficChart : Control
ChartAxis.TimeLabels(e.Graphics, chart.Plot, Font, [end.AddMinutes(-5).ToString("HH:mm"), end.AddMinutes(-2.5).ToString("HH:mm"), end.ToString("HH:mm")]); ChartAxis.TimeLabels(e.Graphics, chart.Plot, Font, [end.AddMinutes(-5).ToString("HH:mm"), end.AddMinutes(-2.5).ToString("HH:mm"), end.ToString("HH:mm")]);
if (points.Length == 0) if (points.Length == 0)
{ {
TextRenderer.DrawText(e.Graphics, "等待代理流量采样", Font, Rectangle.Round(chart.Plot), Brand.Muted, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter); TextRenderer.DrawText(e.Graphics, "等待代理流量采样", Font, Rectangle.Round(chart.Plot), Brand.Muted,
ChartAxis.PaintFlags | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter);
return; return;
} }
PointF[] Line(bool up) => points.Select(p => new PointF( PointF[] Line(bool up) => points.Select(p => new PointF(
@@ -40,6 +48,7 @@ internal sealed class TrafficChart : Control
internal static class ChartAxis internal static class ChartAxis
{ {
internal const TextFormatFlags PaintFlags = TextFormatFlags.PreserveGraphicsTranslateTransform | TextFormatFlags.PreserveGraphicsClipping;
internal static (RectangleF Plot, double Maximum) Draw(Graphics g, Rectangle bounds, Font font, int dpi, double peak, bool speed) internal static (RectangleF Plot, double Maximum) Draw(Graphics g, Rectangle bounds, Font font, int dpi, double peak, bool speed)
{ {
var scale = dpi / 96f; var scale = dpi / 96f;
@@ -53,13 +62,13 @@ internal static class ChartAxis
var left = Math.Max(31 * scale, TextRenderer.MeasureText(g, maximum.ToString("0.#"), font).Width + 5 * scale); var left = Math.Max(31 * scale, TextRenderer.MeasureText(g, maximum.ToString("0.#"), font).Width + 5 * scale);
var plot = new RectangleF(left, fontHeight + 1, Math.Max(1, bounds.Width - left - 9 * scale), Math.Max(1, bounds.Height - fontHeight * 2 - 7 * scale)); var plot = new RectangleF(left, fontHeight + 1, Math.Max(1, bounds.Width - left - 9 * scale), Math.Max(1, bounds.Height - fontHeight * 2 - 7 * scale));
g.SmoothingMode = SmoothingMode.AntiAlias; g.SmoothingMode = SmoothingMode.AntiAlias;
TextRenderer.DrawText(g, unitName + (speed ? "/s" : ""), font, new Rectangle(0, 0, bounds.Width, fontHeight), Brand.Muted, TextFormatFlags.NoPadding); TextRenderer.DrawText(g, unitName + (speed ? "/s" : ""), font, new Rectangle(0, 0, bounds.Width, fontHeight), Brand.Muted, PaintFlags | TextFormatFlags.NoPadding);
using var grid = new Pen(Color.FromArgb(218, 230, 245), Math.Max(1, scale * .6f)) { DashStyle = DashStyle.Dash }; using var grid = new Pen(Color.FromArgb(218, 230, 245), Math.Max(1, scale * .6f)) { DashStyle = DashStyle.Dash };
for (var i = 0; i <= 2; i++) for (var i = 0; i <= 2; i++)
{ {
var y = plot.Bottom - plot.Height * i / 2; var y = plot.Bottom - plot.Height * i / 2;
g.DrawLine(grid, plot.Left, y, plot.Right, y); g.DrawLine(grid, plot.Left, y, plot.Right, y);
TextRenderer.DrawText(g, (maximum * i / 2).ToString("0.#"), font, new Rectangle(0, (int)y - fontHeight / 2, (int)left - 4, fontHeight), Brand.Muted, TextFormatFlags.Right | TextFormatFlags.NoPadding); TextRenderer.DrawText(g, (maximum * i / 2).ToString("0.#"), font, new Rectangle(0, (int)y - fontHeight / 2, (int)left - 4, fontHeight), Brand.Muted, PaintFlags | TextFormatFlags.Right | TextFormatFlags.NoPadding);
} }
for (var i = 0; i <= 6; i++) for (var i = 0; i <= 6; i++)
{ {
@@ -77,7 +86,7 @@ internal static class ChartAxis
var x = plot.Left + i * plot.Width / Math.Max(1, labels.Length - 1); var x = plot.Left + i * plot.Width / Math.Max(1, labels.Length - 1);
// Align edge labels inside the chart rather than cutting their final digits. // Align edge labels inside the chart rather than cutting their final digits.
var left = i == 0 ? x : i == labels.Length - 1 ? x - width : x - width / 2; var left = i == 0 ? x : i == labels.Length - 1 ? x - width : x - width / 2;
TextRenderer.DrawText(g, labels[i], font, new Point((int)left, (int)plot.Bottom + 3), Brand.Muted, TextFormatFlags.NoPadding); TextRenderer.DrawText(g, labels[i], font, new Point((int)left, (int)plot.Bottom + 3), Brand.Muted, PaintFlags | TextFormatFlags.NoPadding);
} }
} }
+4 -4
View File
@@ -10,10 +10,10 @@
<ApplicationIcon>assets\zonghengjia-app-v1.ico</ApplicationIcon> <ApplicationIcon>assets\zonghengjia-app-v1.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode> <ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
<Version>0.2.21</Version> <Version>0.2.22</Version>
<AssemblyVersion>0.2.21.0</AssemblyVersion> <AssemblyVersion>0.2.22.0</AssemblyVersion>
<FileVersion>0.2.21.0</FileVersion> <FileVersion>0.2.22.0</FileVersion>
<InformationalVersion>0.2.21</InformationalVersion> <InformationalVersion>0.2.22</InformationalVersion>
<Product>纵横家</Product> <Product>纵横家</Product>
<Company>优创未来(UCVL)</Company> <Company>优创未来(UCVL)</Company>
<Description>纵横家 Windows 智能网络客户端</Description> <Description>纵横家 Windows 智能网络客户端</Description>
+9 -3
View File
@@ -15,6 +15,7 @@ internal sealed class WindowChrome : IDisposable
private readonly Form _form; private readonly Form _form;
private readonly Panel _header; private readonly Panel _header;
private readonly Action _requestExit; private readonly Action _requestExit;
private readonly Action _minimize;
private readonly ToolTip _toolTip = new(); private readonly ToolTip _toolTip = new();
private readonly ChromeFormWindow _window; private readonly ChromeFormWindow _window;
private readonly Dictionary<Control, ChromeChildWindow> _children = new(); private readonly Dictionary<Control, ChromeChildWindow> _children = new();
@@ -27,11 +28,12 @@ internal sealed class WindowChrome : IDisposable
internal CaptionButton MinimizeButton { get; } = new(CaptionAction.Minimize); internal CaptionButton MinimizeButton { get; } = new(CaptionAction.Minimize);
internal WindowChrome(Form form, Panel header, Action requestExit) internal WindowChrome(Form form, Panel header, Action requestExit, Action? minimize = null)
{ {
_form = form; _form = form;
_header = header; _header = header;
_requestExit = requestExit; _requestExit = requestExit;
_minimize = minimize ?? (() => _form.WindowState = FormWindowState.Minimized);
_window = new ChromeFormWindow(this); _window = new ChromeFormWindow(this);
// Managed geometry must see a client-only form. Leaving Sizable here // Managed geometry must see a client-only form. Leaving Sizable here
// makes WinForms add the removed caption dimensions again on restore. // makes WinForms add the removed caption dimensions again on restore.
@@ -88,7 +90,7 @@ internal sealed class WindowChrome : IDisposable
if (generation != _handleGeneration || modeGeneration != _modeGeneration) return; if (generation != _handleGeneration || modeGeneration != _modeGeneration) return;
_minimizePending = false; _minimizePending = false;
if (LoginMode || _disposed || _form.IsDisposed || _form.Disposing || !_form.IsHandleCreated) return; if (LoginMode || _disposed || _form.IsDisposed || _form.Disposing || !_form.IsHandleCreated) return;
_form.WindowState = FormWindowState.Minimized; _minimize();
}); });
} }
catch (InvalidOperationException) catch (InvalidOperationException)
@@ -317,7 +319,11 @@ internal sealed class WindowChrome : IDisposable
if (ChromeNative.GetMonitorInfo(monitor, ref info)) if (ChromeNative.GetMonitorInfo(monitor, ref info))
Marshal.StructureToPtr(info.Work, m.LParam, false); Marshal.StructureToPtr(info.Work, m.LParam, false);
} }
m.Result = IntPtr.Zero; // The client-owned header spans the resized window. Retaining
// the old client bits leaves the newly exposed header strip
// unpainted on some DWM/scaling paths. Repaint the complete
// client after a valid NCCALCSIZE sizing transaction.
m.Result = m.WParam != IntPtr.Zero ? (IntPtr)0x300 /* WVR_REDRAW */ : IntPtr.Zero;
return; return;
} }
if (m.Msg == ChromeNative.WmNcHitTest) if (m.Msg == ChromeNative.WmNcHitTest)
+5 -4
View File
@@ -346,15 +346,15 @@ internal static class WindowChromeSelfTest
private static int Distance(Color a, Color b) => Math.Abs(a.R - b.R) + Math.Abs(a.G - b.G) + Math.Abs(a.B - b.B); private static int Distance(Color a, Color b) => Math.Abs(a.R - b.R) + Math.Abs(a.G - b.G) + Math.Abs(a.B - b.B);
internal sealed record MinimizeInputProbe(bool Mouse, bool PointTargetsButton, bool CapturedAfterDown, internal sealed record MinimizeInputProbe(bool Mouse, bool PointTargetsButton, bool CapturedAfterDown,
int Clicks, bool CapturedDuringClick, bool ManagedMinimized, bool NativeMinimized, bool Visible, int Clicks, bool CapturedDuringClick, bool ManagedMinimized, bool NativeMinimized, bool Visible,
long ReadyElapsedMilliseconds, bool ReadyTimedOut) long ReadyElapsedMilliseconds, bool ReadyTimedOut, bool ExpectedTray = false, bool HiddenFromTaskbar = false)
{ {
public bool Passed => (!Mouse || PointTargetsButton && CapturedAfterDown) && Clicks == 1 public bool Passed => (!Mouse || PointTargetsButton && CapturedAfterDown) && Clicks == 1
&& ManagedMinimized && NativeMinimized && Visible; && (ExpectedTray ? HiddenFromTaskbar : ManagedMinimized && NativeMinimized && Visible);
} }
// Call only for a fixture created by the caller. No global input injection, // Call only for a fixture created by the caller. No global input injection,
// external HWND search, live client, token, process or network interaction. // external HWND search, live client, token, process or network interaction.
internal static Task<MinimizeInputProbe> ProbeMinimizeInputAsync(Form form, CaptionButton button, bool mouse) internal static Task<MinimizeInputProbe> ProbeMinimizeInputAsync(Form form, CaptionButton button, bool mouse, bool tray = false)
{ {
form.BringToFront(); form.BringToFront();
form.Activate(); form.Activate();
@@ -435,7 +435,8 @@ internal static class WindowChromeSelfTest
var style = ChromeNative.GetWindowLongPtr(form.Handle, ChromeNative.GwlStyle).ToInt64(); var style = ChromeNative.GetWindowLongPtr(form.Handle, ChromeNative.GwlStyle).ToInt64();
completion.SetResult(new(mouse, pointTargetsButton, capturedAfterDown, clicks, capturedDuringClick, completion.SetResult(new(mouse, pointTargetsButton, capturedAfterDown, clicks, capturedDuringClick,
form.WindowState == FormWindowState.Minimized, (style & 0x20000000L /* WS_MINIMIZE */) != 0, form.Visible, form.WindowState == FormWindowState.Minimized, (style & 0x20000000L /* WS_MINIMIZE */) != 0, form.Visible,
ReadyElapsedMilliseconds: readyElapsedMilliseconds, ReadyTimedOut: readyTimedOut)); ReadyElapsedMilliseconds: readyElapsedMilliseconds, ReadyTimedOut: readyTimedOut,
ExpectedTray: tray, HiddenFromTaskbar: !form.Visible && !form.ShowInTaskbar));
} }
catch (Exception error) { completion.SetException(error); } catch (Exception error) { completion.SetException(error); }
finally { Cleanup(); } finally { Cleanup(); }
+10
View File
@@ -0,0 +1,10 @@
# 纵横家 Windows 0.2.22
本次为界面维护更新,保留现有 VPN、账号、代理、流量统计和 Tailscale 优先连接逻辑。
- 修复嵌套卡片、图表和关闭状态下拉框区域的上下滚动。
- 登录后最小化收进系统托盘,不保留任务栏窗口;双击托盘恢复,右键菜单断开并退出。登录前右上角 X 仍退出软件。
- 移除全子树合成绘制,修复恢复/缩放时背景漏画及动态数字重影。
- 主界面沿用登录页全景背景;卡片约 50% 白色透明度,文字、按钮和图表仍独立绘制。
只描述本版实际取得的验收证据;旧版网络验收不冒充新版安装验收。其他平台不随本次 Windows 更新宣称正式发布。