-
Notifications
You must be signed in to change notification settings - Fork 274
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
16 changed files
with
548 additions
and
19 deletions.
There are no files selected for viewing
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,134 @@ | ||
using System; | ||
using System.IO; | ||
using GalaSoft.MvvmLight; | ||
|
||
namespace FishMusic.Model.Setting | ||
{ | ||
public class DownloadSettings : ViewModelBase | ||
{ | ||
private int _bitRate; | ||
private int _lossType; | ||
private string _downPath; | ||
private string _userFolder; | ||
private string _userName; | ||
private int _nameSelect; | ||
private int _folderSelect; | ||
private bool _downPic; | ||
private bool _downLrc; | ||
private bool _enableUserSetting; | ||
|
||
public int BitRate | ||
{ | ||
get => _bitRate; | ||
set | ||
{ | ||
_bitRate = value; | ||
RaisePropertyChanged("BitRate"); | ||
} | ||
} | ||
|
||
public int LossType | ||
{ | ||
get => _lossType; | ||
set | ||
{ | ||
_lossType = value; | ||
RaisePropertyChanged("LossType"); | ||
} | ||
} | ||
|
||
public string DownPath | ||
{ | ||
get => _downPath; | ||
set | ||
{ | ||
_downPath = value; | ||
RaisePropertyChanged("DownPath"); | ||
} | ||
} | ||
|
||
public string UserFolder | ||
{ | ||
get => _userFolder; | ||
set | ||
{ | ||
_userFolder = value; | ||
RaisePropertyChanged("UserFolder"); | ||
} | ||
} | ||
|
||
public string UserName | ||
{ | ||
get => _userName; | ||
set | ||
{ | ||
_userName = value; | ||
RaisePropertyChanged("UserName"); | ||
} | ||
} | ||
|
||
public int NameSelect | ||
{ | ||
get => _nameSelect; | ||
set | ||
{ | ||
_nameSelect = value; | ||
RaisePropertyChanged("NameSelect"); | ||
} | ||
} | ||
|
||
public int FolderSelect | ||
{ | ||
get => _folderSelect; | ||
set | ||
{ | ||
_folderSelect = value; | ||
RaisePropertyChanged("FolderSelect"); | ||
} | ||
} | ||
|
||
public bool DownPic | ||
{ | ||
get => _downPic; | ||
set | ||
{ | ||
_downPic = value; | ||
RaisePropertyChanged("DownPic"); | ||
} | ||
} | ||
|
||
public bool DownLrc | ||
{ | ||
get => _downLrc; | ||
set | ||
{ | ||
_downLrc = value; | ||
RaisePropertyChanged("DownLrc"); | ||
} | ||
} | ||
|
||
public bool EnableUserSetting | ||
{ | ||
get => _enableUserSetting; | ||
set | ||
{ | ||
_enableUserSetting = value; | ||
RaisePropertyChanged("EnableUserSetting"); | ||
} | ||
} | ||
|
||
public DownloadSettings() | ||
{ | ||
BitRate = 1; | ||
LossType = 0; | ||
DownPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Music"); | ||
DownLrc = false; | ||
DownPic = false; | ||
EnableUserSetting = false; | ||
NameSelect = 1; | ||
FolderSelect = 0; | ||
UserName = "%ARTIST% - %SONG%"; | ||
UserFolder = ""; | ||
} | ||
} | ||
} |
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,24 @@ | ||
using GalaSoft.MvvmLight; | ||
|
||
namespace FishMusic.Model.Setting | ||
{ | ||
public class PlaySettings : ViewModelBase | ||
{ | ||
private int _playQuality; | ||
|
||
public int PlayQuality | ||
{ | ||
get => _playQuality; | ||
set | ||
{ | ||
_playQuality = value; | ||
RaisePropertyChanged("PlayQuality"); | ||
} | ||
} | ||
|
||
public PlaySettings() | ||
{ | ||
PlayQuality = 1; | ||
} | ||
} | ||
} |
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,43 @@ | ||
using System; | ||
using GalaSoft.MvvmLight; | ||
|
||
namespace FishMusic.Model.Setting | ||
{ | ||
public class SoftSetting : ViewModelBase | ||
{ | ||
private DownloadSettings _downSetting; | ||
|
||
public DownloadSettings DownSetting | ||
{ | ||
get => _downSetting; | ||
set | ||
{ | ||
_downSetting = value; | ||
RaisePropertyChanged("DownSetting"); | ||
} | ||
} | ||
|
||
private PlaySettings _playSetting; | ||
|
||
public PlaySettings PlaySetting | ||
{ | ||
get => _playSetting; | ||
set | ||
{ | ||
_playSetting = value; | ||
RaisePropertyChanged("PlaySetting"); | ||
} | ||
} | ||
|
||
public string Id { get; set; } | ||
public DateTime UpdateTime { get; set; } | ||
|
||
public SoftSetting() | ||
{ | ||
Id = "luooqi"; | ||
UpdateTime = DateTime.Now; | ||
DownSetting = new DownloadSettings(); | ||
PlaySetting = new PlaySettings(); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.