Merge pull request #6980 from Light-Beacon/main

主页按钮加入非加密设置的写入功能
This commit is contained in:
龙腾猫跃
2025-08-12 04:11:13 +08:00
committed by GitHub
2 changed files with 14 additions and 0 deletions
@@ -115,6 +115,13 @@
PageOtherTest.StartCustomDownload(Data(0), "未知")
End Try
Case "修改设置"
If Setup.IsEncoded(Data(0)) Then
Throw New Exception($"无法修改受加密保护的设置:{Data(0)}")
End If
Setup.Set(Data(0), Data(1))
Hint("已修改设置!", HintType.Finish)
Case Else
MyMsgBox("未知的事件类型:" & Type & vbCrLf & "请检查事件类型填写是否正确,或者 PCL 是否为最新版本。", "事件执行失败")
End Select
@@ -357,6 +357,13 @@
Return Not HasIniKey(Version.Path & "PCL\Setup.ini", Key)
End Select
End Function
''' <summary>
''' 某个设置项是否加密。
''' </summary>
Public Function IsEncoded(Key As String) As Boolean
If Not SetupDict.ContainsKey(Key) Then Throw New KeyNotFoundException("未找到设置项:" & Key) With {.Source = Key}
Return SetupDict(Key).Encoded
End Function
''' <summary>
''' 读取设置。