Beispiel #1
0
        public void Show(string path, EfkPkg efkpkg)
        {
            title          = MultiLanguageTextProvider.GetText("ImportEfkPkgTitle");
            EfkPkg         = efkpkg;
            sourceFilePath = Utils.Misc.BackSlashToSlash(path);

            // FileViewer Path or Current Effect Path or Current Directory
            var fileViewer = (Dock.FileViewer)Manager.GetWindow(typeof(Dock.FileViewer));

            if (fileViewer != null && !string.IsNullOrEmpty(fileViewer.CurrentPath))
            {
                targetDirPath = fileViewer.CurrentPath;
            }
            else if (!string.IsNullOrEmpty(Core.Root.GetFullPath()))
            {
                targetDirPath = Path.GetDirectoryName(Core.Root.GetFullPath());
            }
            else
            {
                targetDirPath = Directory.GetCurrentDirectory();
            }
            targetDirPath      = Utils.Misc.BackSlashToSlash(targetDirPath);
            targetDirPathValid = Directory.Exists(targetDirPath);

            foreach (var file in efkpkg.AllFiles)
            {
                var import = new ImportFile();
                import.DestinationName = file.RelativePath;
                import.DoesImport      = true;
                import.ValidationPath(targetDirPath);
                importFiles.Add(file, import);
            }

            Manager.AddControl(this);
        }
Beispiel #2
0
        public void Show(string path, EfkPkg efkpkg)
        {
            if (Core.Language == Language.Japanese)
            {
                this.title = "Effekseerパッケージのインポート";
            }
            else
            {
                this.title = "Importing the Effekseer package";
            }

            EfkPkg         = efkpkg;
            sourceFilePath = Utils.Misc.BackSlashToSlash(path);

            // FileViewer Path or Current Effect Path or Current Directory
            var fileViewer = (Dock.FileViewer)Manager.GetWindow(typeof(Dock.FileViewer));

            if (fileViewer != null && !string.IsNullOrEmpty(fileViewer.CurrentPath))
            {
                targetDirPath = fileViewer.CurrentPath;
            }
            else if (!string.IsNullOrEmpty(Core.Root.GetFullPath()))
            {
                targetDirPath = Path.GetDirectoryName(Core.Root.GetFullPath());
            }
            else
            {
                targetDirPath = Directory.GetCurrentDirectory();
            }
            targetDirPath      = Utils.Misc.BackSlashToSlash(targetDirPath);
            targetDirPathValid = Directory.Exists(targetDirPath);

            foreach (var file in efkpkg.AllFiles)
            {
                var import = new ImportFile();
                import.DestinationName = file.Name;
                import.DoesImport      = true;
                import.ValidationPath(targetDirPath);
                importFiles.Add(file, import);
            }

            Manager.AddControl(this);
        }