今天我创建了一个应用程序,用户可以在其中创建具有他/她选择的背景颜色和名称的图像。但现在我面临这个问题:当我尝试保存设置时(My.settings.bgcolor.save())它保存了颜色,但我无法在 WPF 项目>>设置中看到它(它没有出现在那里,它没有出现在settings.setting中,但应用程序加载了新内容)。有什么想法吗?
要求的代码:
If (site.Text <> Nothing And num_tile.Text <> Nothing And cul <> Nothing) Then
My.Settings.shortcuts_bgcolor.Add(cul)
My.Settings.shortcuts_name.Add(num_tile.Text)
My.Settings.shortcuts_website.Add(site.Text)
Dim i As Integer = 0
For Each shc As String In My.Settings.shortcuts_name
MsgBox(My.Settings.shortcuts_name(i), MsgBoxStyle.Information)
i += 1
Next
Dim window As MainWindow = New MainWindow
window.IncarcaButoane()
Me.Close()
End If
End Sub
Private Sub Window_Closing(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
My.Settings.Save()
End Sub
Private Sub Window_Closed(sender As System.Object, e As System.EventArgs) Handles MyBase.Closed
My.Settings.Save()
End Sub