Changeset 14 for Common/RecentFiles.cs
- Timestamp:
- Aug 2, 2022, 11:46:25 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/RecentFiles.cs
r13 r14 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Linq;4 using System.Text;5 using System.Threading.Tasks;6 3 using System.Windows.Forms; 7 4 using Microsoft.Win32; … … 42 39 } 43 40 44 public void LoadFromRegistry(string RegSubKey)41 public void LoadFromRegistry(string regSubKey) 45 42 { 46 RegistryKey regKey = Application.UserAppDataRegistry.OpenSubKey( RegSubKey);47 if (regKey == null) regKey = Application.UserAppDataRegistry.CreateSubKey( RegSubKey);43 RegistryKey regKey = Application.UserAppDataRegistry.OpenSubKey(regSubKey); 44 if (regKey == null) regKey = Application.UserAppDataRegistry.CreateSubKey(regSubKey); 48 45 49 46 int count = (int)regKey.GetValue("Count", 0); … … 56 53 } 57 54 58 public void SaveToRegistry(string RegSubKey)55 public void SaveToRegistry(string regSubKey) 59 56 { 60 RegistryKey regKey = Application.UserAppDataRegistry.OpenSubKey( RegSubKey, true);61 if (regKey == null) regKey = Application.UserAppDataRegistry.CreateSubKey( RegSubKey);57 RegistryKey regKey = Application.UserAppDataRegistry.OpenSubKey(regSubKey, true); 58 if (regKey == null) regKey = Application.UserAppDataRegistry.CreateSubKey(regSubKey); 62 59 63 60 regKey.SetValue("Count", Items.Count);
Note:
See TracChangeset
for help on using the changeset viewer.