File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88using OpenCvSharp ;
99using OpenCvSharp . Extensions ;
1010using System . Diagnostics ;
11+ using System . Runtime . InteropServices ;
1112
1213namespace OpenLuckyRandom
1314{
@@ -38,6 +39,35 @@ public WndMain()
3839 frameThicknessNum . Value = frameThickness ;
3940 cascadesComboBox . SelectedIndex = 0 ;
4041
42+ // 检查当前进程架构
43+ string _architecture ;
44+ switch ( RuntimeInformation . ProcessArchitecture )
45+ {
46+ case Architecture . X86 :
47+ _architecture = "x86" ;
48+ break ;
49+ case Architecture . X64 :
50+ _architecture = "x64" ;
51+ break ;
52+ case Architecture . Arm :
53+ _architecture = "ARM32" ;
54+ break ;
55+ case Architecture . Arm64 :
56+ _architecture = "ARM64" ;
57+ break ;
58+ default :
59+ _architecture = "Unknown" ;
60+ break ;
61+ }
62+
63+ // 检查是否为调试版本
64+ bool _isDebugBuild = typeof ( WndMain ) . Assembly . GetCustomAttributes ( false )
65+ . OfType < DebuggableAttribute > ( )
66+ . Any ( da => da . IsJITTrackingEnabled || da . IsJITOptimizerDisabled ) ;
67+
68+ // 设置窗体标题
69+ this . Text = $ "OpenLuckyRandom ({ _architecture } ) { ( _isDebugBuild ? "[Debug]" : "" ) } ";
70+
4171 // 组件整体刷新
4272 this . Refresh ( ) ;
4373 }
You can’t perform that action at this time.
0 commit comments