예제 #1
0
        private void SetOutput(DirectoryInfo aDirectoryInfo)
        {
            using (MemoryStream uMemoryStream = new MemoryStream())
            {
                using (StreamWriter uStreamWriterMemory = new StreamWriter(uMemoryStream))
                {
                    using (StreamReader uStreamReader = new StreamReader(Application.streamingAssetsPath + "/Config/" + "LoopTool.ini"))
                    {
                        bool lIsWrote = false;

                        for (string line = uStreamReader.ReadLine(); line != null; line = uStreamReader.ReadLine())
                        {
                            if (line.Split('=').Length >= 1 && line.Split('=')[0] == "Output")
                            {
                                uStreamWriterMemory.WriteLine("Output=" + aDirectoryInfo.FullName);
                                lIsWrote = true;
                            }
                            else
                            {
                                Debug.LogWarning(line);
                                uStreamWriterMemory.WriteLine(line);
                            }
                        }

                        if (lIsWrote == false)
                        {
                            Debug.LogWarning("Output Write");
                            uStreamWriterMemory.WriteLine("Output=" + aDirectoryInfo.FullName);
                        }
                    }

                    uStreamWriterMemory.Flush();

                    using (FileStream uFileStream = new FileStream(Application.streamingAssetsPath + "/Config/" + "LoopTool.ini", FileMode.Open, FileAccess.Write))
                    {
                        Debug.LogWarning("Write");
                        byte[] buffer = new byte[512];
                        int    numBytes;

                        uMemoryStream.Position = 0;
                        Debug.LogWarning(uMemoryStream.Position.ToString() + "/" + uMemoryStream.Length.ToString());

                        while ((numBytes = uMemoryStream.Read(buffer, 0, 512)) > 0)
                        {
                            Debug.LogWarning("Output:" + numBytes);
                            uFileStream.Write(buffer, 0, numBytes);
                        }
                    }
                }
            }

            viewLoopPlaylist = new ViewLoopPlaylist(aDirectoryInfo, PlayMusic, GetPlayingMusic);
            viewLoopSearch   = new ViewLoopSearch(viewLoopPlaylist.data, viewLoopInputlist.data);
        }
예제 #2
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);
        }
예제 #3
0
 private void SetDirectoryInfo(DirectoryInfo aDirectoryInfo)
 {
     viewLoopPlaylist = new ViewLoopPlaylist(aDirectoryInfo, SetFileInfoPlaying, GetFileInfoPlaying);
 }