Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
209 additions
and
18 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Weavers> | ||
<PropertyChanged /> | ||
</Weavers> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace MPDN_RemoteControl.Objects | ||
{ | ||
public class PlaylistData | ||
{ | ||
public string PlaylistName { get; set; } | ||
public List<PlaylistItem> Playlist { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
|
||
namespace MPDN_RemoteControl.Objects | ||
{ | ||
public class PlaylistItem | ||
{ | ||
public string FilePath { get; set; } | ||
public bool Active { get; set; } | ||
public bool HasChapter { get; set; } | ||
public List<int> SkipChapters { get; set; } | ||
public int EndChapter { get; set; } | ||
public string Duration { get; set; } | ||
public int PlayCount { get; set; } | ||
public Guid Guid { get; set; } | ||
|
||
public PlaylistItem() | ||
{ | ||
} | ||
|
||
public PlaylistItem(string filePath, bool isActive) | ||
{ | ||
if (string.IsNullOrWhiteSpace(filePath)) throw new ArgumentNullException("filePath"); | ||
|
||
FilePath = filePath; | ||
Active = isActive; | ||
PlayCount = 0; | ||
Guid = Guid.NewGuid(); | ||
} | ||
|
||
public PlaylistItem(string filePath, List<int> skipChapter, int endChapter, bool isActive) | ||
{ | ||
if (string.IsNullOrWhiteSpace(filePath)) throw new ArgumentNullException("filePath"); | ||
|
||
FilePath = filePath; | ||
Active = isActive; | ||
SkipChapters = skipChapter; | ||
EndChapter = endChapter; | ||
HasChapter = true; | ||
PlayCount = 0; | ||
Guid = Guid.NewGuid(); | ||
} | ||
|
||
public PlaylistItem(string filePath, List<int> skipChapter, int endChapter, bool isActive, string duration) | ||
{ | ||
if (string.IsNullOrWhiteSpace(filePath)) throw new ArgumentNullException("filePath"); | ||
|
||
FilePath = filePath; | ||
Active = isActive; | ||
SkipChapters = skipChapter; | ||
EndChapter = endChapter; | ||
HasChapter = true; | ||
Duration = duration; | ||
PlayCount = 0; | ||
Guid = Guid.NewGuid(); | ||
} | ||
|
||
public PlaylistItem(string filePath, List<int> skipChapter, int endChapter, bool isActive, string duration, | ||
int playCount) | ||
{ | ||
if (string.IsNullOrWhiteSpace(filePath)) throw new ArgumentNullException("filePath"); | ||
|
||
FilePath = filePath; | ||
Active = isActive; | ||
SkipChapters = skipChapter; | ||
EndChapter = endChapter; | ||
HasChapter = true; | ||
Duration = duration; | ||
PlayCount = playCount; | ||
Guid = Guid.NewGuid(); | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
if (HasChapter) | ||
{ | ||
return Path.GetFileName(FilePath) + " | SkipChapter: " + string.Join(",", SkipChapters) + | ||
" | EndChapter: " + EndChapter; | ||
} | ||
|
||
return Path.GetFileName(FilePath) ?? "???"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Fody" version="1.29.3" targetFramework="net45" developmentDependency="true" /> | ||
<package id="Fody" version="1.29.4" targetFramework="net45" developmentDependency="true" /> | ||
<package id="gong-wpf-dragdrop" version="0.1.4.3" targetFramework="net45" /> | ||
<package id="PropertyChanged.Fody" version="1.50.3" targetFramework="net45" developmentDependency="true" /> | ||
<package id="PropertyChanged.Fody" version="1.51.0" targetFramework="net45" developmentDependency="true" /> | ||
<package id="YAXLib" version="2.14" targetFramework="net45" /> | ||
</packages> |