public static void loadTagsFromRegistry() { RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Newrose\Samplify"); if (key != null) { object dirs = NewroseLib.loadObjectFromRegistry(key, "AllTags"); allTags.AddRange(dirs as Tag[]); } }
private void addDirButton_Click(object sender, RoutedEventArgs e) { string dir = NewroseLib.userSelectDirectoryDialog(); Activate(); //brings window to foreground after dialog if (dir != null) { Console.WriteLine("directory added"); directories.Add(dir); } refreshListView(); }
/// <summary> /// Loads in directory information from registry /// </summary> public static void loadDirectoriesFromRegistry() { RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Newrose\Samplify"); if (key != null) { object dirs = NewroseLib.loadObjectFromRegistry(key, "Directories"); directories.AddRange(dirs as string[]); } if (directories.Count == 0) { string dir = NewroseLib.userSelectDirectoryDialog(); if (dir != null) { directories.Add(dir); } } }
public static void saveTagsToRegistry() { RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Newrose\Samplify"); NewroseLib.SaveObjectToRegistry(key, "AllTags", allTags.ToArray()); }
/// <summary> /// Saves the directory array to registry /// </summary> public static void saveDirectoriesToRegistry() { RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Newrose\Samplify"); NewroseLib.SaveObjectToRegistry(key, "Directories", directories.ToArray()); }
public static void deleteSampFilesInDirectories() { NewroseLib.deleteSampFilesInDirectories(directories.ToArray()); }