Example #1
0
        public LoopPlayer(DirectoryInfo aDirectoryInfo)
        {
            viewLoopPlayer   = new ViewLoopPlayer(null, ChangeMusicPrevious, ChangeMusicNext);
            viewLoopDisplay  = new ViewLoopDisplay(viewLoopPlayer.GetLoopPoint());
            viewLoopPlaylist = new ViewLoopPlaylist(aDirectoryInfo, SetFileInfoPlaying, GetFileInfoPlaying);

            DirectoryInfo lDirectoryInfoRoot = new DirectoryInfo(Application.streamingAssetsPath);

            viewChangeDirectory = new ViewChangeDirectory(lDirectoryInfoRoot, aDirectoryInfo, SetDirectoryInfo);

            Rect = new Rect(0.0f, 0.0f, 0.0f, 0.0f);
        }
Example #2
0
        public LoopTool(DirectoryInfo aDirectoryInfoInput, DirectoryInfo aDirectoryInfoOutput)
        {
            Debug.LogWarning("dataPath:" + Application.dataPath);
            Debug.LogWarning("persistentDataPath:" + Application.persistentDataPath);
            Debug.LogWarning("streamingAssetsPath:" + Application.streamingAssetsPath);
            Debug.LogWarning("temporaryCachePath:" + Application.temporaryCachePath);

            DirectoryInfo lDirectoryInfoInput  = aDirectoryInfoInput;
            DirectoryInfo lDirectoryInfoOutput = aDirectoryInfoOutput;

            try
            {
                using (StreamReader u = new StreamReader(Application.streamingAssetsPath + "/Config/" + "LoopTool.ini"))
                {
                    for (string line = u.ReadLine(); line != null; line = u.ReadLine())
                    {
                        if (line.IndexOf("//") != 0 && line.Split('=').Length >= 2)
                        {
                            string opcode = line.Split('=')[0];
                            string value  = line.Split('=')[1];

                            switch (opcode)
                            {
                            case "Input":
                                if (Directory.Exists(value) == true)
                                {
                                    lDirectoryInfoInput = new DirectoryInfo(value);
                                }
                                break;

                            case "Output":
                                if (Directory.Exists(value) == true)
                                {
                                    lDirectoryInfoOutput = new DirectoryInfo(value);
                                }
                                break;

                            default:
                                break;
                            }
                        }
                    }
                }
            }
            catch (Exception aExpection)
            {
                using (StreamWriter u = new StreamWriter(Application.streamingAssetsPath + "/Config/" + "LoopTool.ini"))
                {
                    Debug.LogWarning("Create LoopTool.ini");
                }
            }

            SetInput(lDirectoryInfoInput);
            SetOutput(lDirectoryInfoOutput);

            viewMenu        = new ViewMenu();
            viewLoopPlayer  = new ViewLoopPlayer(null, ChangeMusicPrevious, ChangeMusicNext);
            viewLoopDisplay = new ViewLoopDisplay(viewLoopPlayer.GetLoopPoint());

            DirectoryInfo lDirectoryInfoRoot = new DirectoryInfo(Application.streamingAssetsPath);

            viewChangeDirectoryInput  = new ViewChangeDirectory(lDirectoryInfoRoot.Root, lDirectoryInfoInput, SetInput);
            viewChangeDirectoryOutput = new ViewChangeDirectory(lDirectoryInfoRoot.Root, lDirectoryInfoOutput, SetOutput);
        }