示例#1
0
        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[]);
            }
        }
示例#2
0
        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();
        }
示例#3
0
        /// <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);
                }
            }
        }
示例#4
0
        public static void saveTagsToRegistry()
        {
            RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Newrose\Samplify");

            NewroseLib.SaveObjectToRegistry(key, "AllTags", allTags.ToArray());
        }
示例#5
0
        /// <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());
        }
示例#6
0
 public static void deleteSampFilesInDirectories()
 {
     NewroseLib.deleteSampFilesInDirectories(directories.ToArray());
 }