public static AnimationImporter ImporterFactory(ImporterType importerType)
        {
            switch (importerType)
            {
            case ImporterType.Aseprite:
                return(new AsepriteImporter());

            default:
                break;
            }
            throw new System.NotSupportedException("Importer " + importerType.ToString() + " is not recognized");
        }
Exemplo n.º 2
0
        public ManualImportViewModel PreSelect(int accountId, ImporterType importer)
        {
            var selectedAccount = AvailableAccounts.FirstOrDefault(x => x.Value == accountId.ToString(CultureInfo.InvariantCulture));

            if (selectedAccount != null)
            {
                selectedAccount.Selected = true;
            }

            var selectedImporter = AvailableImporters.FirstOrDefault(x => x.Value == importer.ToString());

            if (selectedImporter != null)
            {
                selectedImporter.Selected = true;
            }

            return(this);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Add a new Importer
        /// </summary>
        private static void AddImporter(ImporterType key, IMeshImporter importer)
        {
            AvailableImporters.Add(key, importer);

            ImporterTypes.Add(key.ToString(), key);
        }