@@ -70,7 +70,7 @@ private void Form_Load(object sender, EventArgs e) // 主窗口创建前
7070 // 获取主题色并设置图片框背景颜色
7171 SystemColor = "#" + Registry_SystemColor . Get_SystemColor ( ) ;
7272 PictureBox_磁贴图片预览 . BackColor = ColorTranslator . FromHtml ( SystemColor ) ;
73- NewTileState = Registry_Other . Get_NewTileState ( ) ; // 获取是否开启 2004 新版磁贴样式
73+ NewTileState = Registry_Other . Get_NewTileState ( ) ; // 获取是否开启新版磁贴样式,或系统 2004 版本以上
7474 //Debug.Print(NewTileState.ToString());
7575
7676 // 磁贴预览标签背景透明
@@ -205,6 +205,14 @@ private void Read_AppConfig() // 读入程序配置文件
205205 {
206206 Button_自动检查更新 . Text = "自动检查更新 [×]" ;
207207 }
208+ if ( AppConfig . GetValue ( "LegacyTileMode" , "false" , AppConfig_Path ) == "true" )
209+ {
210+ Button_旧版磁贴模式 . Text = "旧版磁贴模式 [√]" ;
211+ }
212+ else
213+ {
214+ Button_旧版磁贴模式 . Text = "旧版磁贴模式 [×]" ;
215+ }
208216 }
209217
210218 private void Write_AppConfig ( ) // 写出程序配置文件
@@ -217,6 +225,14 @@ private void Write_AppConfig() // 写出程序配置文件
217225 {
218226 AppConfig . SetValue ( "AutoCheckUpdate" , "false" , AppConfig_Path ) ;
219227 }
228+ if ( Button_旧版磁贴模式 . Text == "旧版磁贴模式 [√]" )
229+ {
230+ AppConfig . SetValue ( "LegacyTileMode" , "true" , AppConfig_Path ) ;
231+ }
232+ else
233+ {
234+ AppConfig . SetValue ( "LegacyTileMode" , "false" , AppConfig_Path ) ;
235+ }
220236 }
221237
222238 private void Form_DragEnter ( object sender , DragEventArgs e ) // 拖放
@@ -287,13 +303,13 @@ private void Read_Config() // 读入磁贴配置文件
287303 //Debug.Print(XML_VisualElements.ToString());
288304 if ( XML_VisualElements . Attribute ( "BackgroundColor" ) != null ) // 磁贴背景颜色
289305 {
290- if ( NewTileState == true ) // 如果已经开启新版磁贴样式 ,则使用系统主题色
306+ if ( Button_旧版磁贴模式 . Text == "旧版磁贴模式 [√]" || NewTileState == false ) // 如果没有开启新版磁贴样式/开启了旧版磁贴模式 ,则使用系统主题色
291307 {
292- UserColor = SystemColor ;
308+ UserColor = XML_VisualElements . Attribute ( "BackgroundColor" ) . Value . ToString ( ) ;
293309 }
294310 else
295311 {
296- UserColor = XML_VisualElements . Attribute ( "BackgroundColor" ) . Value . ToString ( ) ;
312+ UserColor = SystemColor ;
297313 }
298314 PictureBox_磁贴图片预览 . BackColor = ColorTranslator . FromHtml ( UserColor ) ;
299315 }
@@ -631,7 +647,19 @@ private void Button_查看磁贴目录_Click(object sender, EventArgs e) // 查
631647 {
632648 _ = Process . Start ( System . Environment . GetFolderPath ( System . Environment . SpecialFolder . Programs ) ) ;
633649 }
634-
650+
651+ private void Button_旧版磁贴模式_Click ( object sender , EventArgs e ) // 旧版磁贴模式
652+ {
653+ if ( Button_旧版磁贴模式 . Text == "旧版磁贴模式 [√]" )
654+ {
655+ Button_旧版磁贴模式 . Text = "旧版磁贴模式 [×]" ;
656+ }
657+ else
658+ {
659+ Button_旧版磁贴模式 . Text = "旧版磁贴模式 [√]" ;
660+ }
661+ }
662+
635663 private void Button_自动检查更新_Click ( object sender , EventArgs e ) // 自动检查更新
636664 {
637665 if ( Button_自动检查更新 . Text == "自动检查更新 [√]" )
@@ -983,7 +1011,7 @@ private void PictureBox_磁贴图片预览_MouseDown(object sender, MouseEventAr
9831011 {
9841012 if ( e . Button == MouseButtons . Left )
9851013 {
986- if ( NewTileState == false )
1014+ if ( Button_旧版磁贴模式 . Text == "旧版磁贴模式 [√]" || NewTileState == false ) // 如果没有开启新版磁贴样式/开启了旧版磁贴模式,则允许取色
9871015 {
9881016 PictureBox_磁贴图片预览 . Cursor = Cursors . Cross ;
9891017 ScreenColorFlag = true ;
0 commit comments