This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMultidumperJSONInfo.cs
109 lines (81 loc) · 2.55 KB
/
MultidumperJSONInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using MultidumperGUI.Annotations;
using Newtonsoft.Json;
namespace MultidumperGUI
{
public class Containerinfo
{
[JsonProperty("copyright")]
public string Copyright { get; set; }
[JsonProperty("dumper")]
public string Dumper { get; set; }
[JsonProperty("game")]
public string Game { get; set; }
[JsonProperty("system")]
public string System { get; set; }
}
public class Song
{
[JsonProperty("author")]
public string Author { get; set; }
[JsonProperty("comment")]
public string Comment { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
}
public class IndexedSong:Song
{
public IndexedSong(int id, Song baseSong)
{
Id = id;
Author = baseSong.Author;
Comment = baseSong.Comment;
Name = baseSong.Name;
}
[JsonProperty("id")]
public int Id { get; set; }
}
public class IncomingChannelInfo
{
[JsonProperty("channels")]
public IList<string> Channels { get; set; }
}
public class ChannelInfo : INotifyPropertyChanged
{
private string _channelName;
private double _maximumProgress;
private double _currentProgress;
public string ChannelName
{
get { return _channelName; }
set { _channelName = value; }
}
public double MaximumProgress
{
get { return _maximumProgress; }
set { _maximumProgress = value; OnPropertyChanged(nameof(MaximumProgress)); }
}
public double CurrentProgress
{
get { return _currentProgress; }
set { _currentProgress = value; OnPropertyChanged(nameof(CurrentProgress)); }
}
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
public class MDOut
{
[JsonProperty("containerinfo")]
public Containerinfo Containerinfo { get; set; }
[JsonProperty("songs")]
public IList<Song> Songs { get; set; }
[JsonProperty("subsongCount")]
public int SubsongCount { get; set; }
}
}