Skip to content

Commit

Permalink
多项改进,发布 V5.0.0 Pre3
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyListen committed Feb 2, 2019
1 parent e83cc43 commit e489eea
Show file tree
Hide file tree
Showing 16 changed files with 548 additions and 19 deletions.
21 changes: 15 additions & 6 deletions FishMusic/FishMusic/FishMusic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\ControlzEx.3.0.2.4\lib\net40\System.Windows.Interactivity.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -101,13 +102,14 @@
<Compile Include="Converter\TrackTimeConverter.cs" />
<Compile Include="Converter\UrlConverter.cs" />
<Compile Include="Download\DownloadInfo.cs" />
<Compile Include="Download\DownloadSettings.cs" />
<Compile Include="Model\Setting\DownloadSettings.cs" />
<Compile Include="Download\XL.cs" />
<Compile Include="Download\XunleiClient.cs" />
<Compile Include="Helper\CommonHelper.cs" />
<Compile Include="Helper\DbHelper.cs" />
<Compile Include="Model\SearchEngine.cs" />
<Compile Include="Model\SoftSetting.cs" />
<Compile Include="Model\Setting\PlaySettings.cs" />
<Compile Include="Model\Setting\SoftSetting.cs" />
<Compile Include="TagLib\Aac\AudioHeader.cs" />
<Compile Include="TagLib\Aac\BitStream.cs" />
<Compile Include="TagLib\Aac\File.cs" />
Expand Down Expand Up @@ -372,7 +374,7 @@
<Compile Include="View\Download\Downloading.xaml.cs">
<DependentUpon>Downloading.xaml</DependentUpon>
</Compile>
<Compile Include="View\Download\DownSetting.xaml.cs">
<Compile Include="View\Setting\DownSetting.xaml.cs">
<DependentUpon>DownSetting.xaml</DependentUpon>
</Compile>
<Compile Include="View\MainControl.xaml.cs">
Expand All @@ -384,6 +386,9 @@
<Compile Include="View\PlayingPage.xaml.cs">
<DependentUpon>PlayingPage.xaml</DependentUpon>
</Compile>
<Compile Include="View\Setting\PlaySetting.xaml.cs">
<DependentUpon>PlaySetting.xaml</DependentUpon>
</Compile>
<Compile Include="View\SubModel\DiscoveryView.xaml.cs">
<DependentUpon>DiscoveryView.xaml</DependentUpon>
</Compile>
Expand All @@ -399,7 +404,7 @@
<Compile Include="View\SubModel\SearchView.xaml.cs">
<DependentUpon>SearchView.xaml</DependentUpon>
</Compile>
<Compile Include="View\SubModel\SettingView.xaml.cs">
<Compile Include="View\Setting\SettingView.xaml.cs">
<DependentUpon>SettingView.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
Expand Down Expand Up @@ -442,7 +447,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Download\DownSetting.xaml">
<Page Include="View\Setting\DownSetting.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
Expand All @@ -458,6 +463,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Setting\PlaySetting.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\SubModel\DiscoveryView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -478,7 +487,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\SubModel\SettingView.xaml">
<Page Include="View\Setting\SettingView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
Expand Down
1 change: 1 addition & 0 deletions FishMusic/FishMusic/Helper/CommonHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text.RegularExpressions;
using AnyListen.Models;
using FishMusic.Download;
using FishMusic.Model.Setting;
using Newtonsoft.Json.Linq;

namespace FishMusic.Helper
Expand Down
134 changes: 134 additions & 0 deletions FishMusic/FishMusic/Model/Setting/DownloadSettings.cs
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 = "";
}
}
}
24 changes: 24 additions & 0 deletions FishMusic/FishMusic/Model/Setting/PlaySettings.cs
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;
}
}
}
43 changes: 43 additions & 0 deletions FishMusic/FishMusic/Model/Setting/SoftSetting.cs
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();
}
}
}
7 changes: 7 additions & 0 deletions FishMusic/FishMusic/View/Download/Downloaded.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
xmlns:local="clr-namespace:FishMusic.View.Download"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:converter="clr-namespace:FishMusic.Converter"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.DataContext>
Expand Down Expand Up @@ -36,7 +37,13 @@
</Grid>

<ListView Grid.Row="1" Margin="0 5" BorderThickness="0"
SelectedItem="{Binding SelectDownloaded}"
ItemsSource="{Binding DownloadedCollection}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding OpenFileCmd}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListView.Style>
<Style>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"></Setter>
Expand Down
Loading

0 comments on commit e489eea

Please sign in to comment.