This repository has been archived on 2020-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
aurora-sharp-desktop/Aurora/Backend/Models/LocalSong.cs

39 lines
838 B
C#
Raw Normal View History

2019-05-20 00:21:54 +00:00
using System;
using System.IO;
namespace Aurora.Backend.Models
{
public class LocalSong : BaseSong
{
public LocalSong(FileInfo fileInfo)
{
File = fileInfo;
}
#region Properties
public FileInfo File { get; private set; }
#endregion Properties
public override void Load()
2019-05-20 00:21:54 +00:00
{
if (this.DataStream != null)
{
DataStream.Close();
DataStream = null;
}
this.DataStream = System.IO.File.OpenRead(File.FullName);
base.Load();
2019-05-20 00:21:54 +00:00
}
public override void Unload()
{
if (this.DataStream != null)
{
DataStream.Close();
DataStream = null;
}
base.Unload();
}
2019-05-20 00:21:54 +00:00
}
}