Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
 public static string[] GetInterfaceScoreNumbers(string[] files)
 {
     string[] positive = { Skinini.GetScorePrefix(files) + "-" };
     return(FileHandler.GetFileSet(files.GetImageFiles(), positive, null));
 }
Ejemplo n.º 4
0
 public static string[] GetGameplayDefaultNumbers(string[] files)
 {
     string[] terms = { Skinini.GetHitCirclePrefix(files) + "-" };
     return(FileHandler.GetFileSet(files.GetImageFiles(), terms, null));
 }