Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="nsPath"></param>
        /// <returns></returns>
        public static Track ReadTrack(string nsPath)
        {
            try
            {
                Track t = new Track();
                using (BinaryReader reader = new BinaryReader(File.OpenRead(nsPath)))
                {
                    // TRACK INFO
                    t.TrackInfo.Name        = reader.ReadString();
                    t.TrackInfo.Author      = reader.ReadString();
                    t.TrackInfo.ImageLen    = reader.ReadInt32();
                    t.TrackInfo.Image       = reader.ReadBytes(t.TrackInfo.ImageLen);
                    t.TrackInfo.SliderValue = reader.ReadDouble();
                    t.TrackInfo.Encrypted   = reader.ReadBoolean();

                    string password = null;
                    if (t.TrackInfo.Encrypted)
                    {
                        var dialog = InfoDialog.ShowValueDialog("Enter the password:"******"Fail with interpreting the track.");
            }
        }