Example #1
0
        /// <summary>
        /// 变更选择模块判定是否显示设置选项
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ModuleSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            SongsSearchModule m = ((DataGrid)sender).SelectedItem as SongsSearchModule;

            if (m == null)
            {
                Module_Setting.Visibility = Visibility.Collapsed;
            }
            else
            {
                Module_Setting.Visibility = m.NeedSettings ? Visibility.Visible : Visibility.Collapsed;
            }
        }
Example #2
0
        /// <summary>
        /// 新建一个预定义下载地址的歌曲物品
        /// </summary>
        /// <param name="_module">搜索模块</param>
        /// <param name="_Name">歌名</param>
        /// <param name="_ID">歌曲ID</param>
        /// <param name="_WhoWantThis">点歌人</param>
        /// <param name="_Singers">歌手列表</param>
        /// <param name="_DownloadURL">下载地址</param>
        /// <param name="_lyric">文本格式歌词</param>
        /// <param name="_note">歌曲信息备注</param>
        private SongItem(SongsSearchModule _module, string _Name, string _ID, string _WhoWantThis, string[] _Singers, string _DownloadURL, string _lyric = "", string _note = "")
        {
            _Status           = SongStatus.WaitingDownload;
            Module            = _module;
            _SongName         = _Name;
            _SongID           = _ID;
            this._Singers     = _Singers;
            _User             = _WhoWantThis;
            this._DownloadURL = _DownloadURL;
            _Lyric            = _lyric;
            _Note             = _note;

            RaisePropertyChanged("");
        }
Example #3
0
 /// <summary>
 /// 创建一个歌曲信息
 /// </summary>
 /// <param name="module">创建歌曲信息的搜素模块</param>
 /// <param name="Name">歌曲名称</param>
 /// <param name="ID">歌曲ID</param>
 /// <param name="Who">点歌人昵称</param>
 /// <param name="Singers">歌手</param>
 /// <param name="DownloadURL">MP3下载地址</param>
 /// <param name="lyric">歌词文本</param>
 /// <param name="note">备注</param>
 /// <returns></returns>
 public static SongItem init(SongsSearchModule module, string Name, string ID, string Who, string[] Singers, string DownloadURL, string lyric = "", string note = "")
 {
     return(new SongItem(module, Name, ID, Who, Singers, DownloadURL, lyric, note));
 }