public static string[] GetInterfaceComboNumbers(string[] files)
        {
            if (Skinini.GetComboPrefix(files) == Skinini.GetScorePrefix(files))
            {
                return(null);
            }

            string[] positive = { Skinini.GetComboPrefix(files) + "-" };
            return(FileHandler.GetFileSet(files.GetImageFiles(), positive, null));
        }
Beispiel #2
0
        /// <summary> Tries to execute an Import.</summary>
        public void Import()
        {
            string[] importFiles = GetSelectedFiles(Importer.importFiles);
            string[] rootFiles   = GetSelectedFilesInRoot();

            // Create backup by default
            string backupFolder = FileHandler.CreateBackupFolder(FileHandler.CurrentSkinFolder);

            // Move files that will be replaced in the root folder to the backup folder
            foreach (string file in rootFiles)
            {
                string dest = backupFolder + "\\" + Path.GetFileName(file);
                File.Move(file, dest);

                if (GetSelectedIniTypes().Length > 0)
                {
                    string iniPath        = Skinini.GetIniPath(FileHandler.CurrentSkinFolder);
                    string iniFileName    = Path.GetFileName(iniPath);
                    string iniDestination = backupFolder + "\\" + iniFileName;
                    File.Copy(iniPath, iniDestination);
                }
            }

            // Copy each file to the root folder
            foreach (string file in importFiles)
            {
                string fileName = Path.GetFileName(file);
                string dest     = FileHandler.CurrentSkinFolder + "\\" + fileName;
                File.Copy(file, dest);
            }

            // Replace lines in skin.ini
            Skinini.Option[] selectedTypes = GetSelectedIniTypes();
            foreach (Skinini.Option type in selectedTypes)
            {
                Skinini.Replace(type, importFolder, FileHandler.CurrentSkinFolder);
            }
        }
 public static string[] GetInterfaceScoreNumbers(string[] files)
 {
     string[] positive = { Skinini.GetScorePrefix(files) + "-" };
     return(FileHandler.GetFileSet(files.GetImageFiles(), positive, null));
 }
 public static string[] GetGameplayDefaultNumbers(string[] files)
 {
     string[] terms = { Skinini.GetHitCirclePrefix(files) + "-" };
     return(FileHandler.GetFileSet(files.GetImageFiles(), terms, null));
 }