コード例 #1
0
ファイル: Audio.cs プロジェクト: null32/VkByNullRemake
 //Event handler for updating user's status
 private void UpdateUserStatus(object sender, AudioItemEventArgs e)
 {
     if (_ToStatus)
     {
         ApiAudio.SetBroadcast(e.Audio.OwnerId.ToString() + "_" + e.Audio.Id.ToString(), new long[] { UserId });
     }
 }
コード例 #2
0
ファイル: Audio.cs プロジェクト: null32/VkByNullRemake
        //Get text by id
        public string GetText(long TextId)
        {
            Log(MessageStatus.Request, string.Format(LogStrings.Info.Audio.LyricsRequest, TextId));
            string text = ApiAudio.GetLyrics(TextId).Text;

            this.Log(MessageStatus.Response, string.Join(Environment.NewLine, text.Split('\r')));
            return(text);
        }
コード例 #3
0
ファイル: Audio.cs プロジェクト: null32/VkByNullRemake
        protected virtual void Dispose(bool disposing)
        {
            if (_ToStatus)
            {
                ApiAudio.SetBroadcast("0", new long[] { UserId });
            }
            SetConfigValue(ConfigDefault.AudioGuiSearchHistory, _SearchHistory.ToArray());

            if (disposing)
            {
                if (_Player != null)
                {
                    _Player.Dispose();
                }
                if (_Downloader != null)
                {
                    _Downloader.Dispose();
                }
                if (_DownloaderBW != null)
                {
                    _DownloaderBW.Dispose();
                }
            }
        }