public AudioViewModel(Audio audio, IAudioAdapter adapter, Lyrics lyrics=null) { _audio = audio; _lyrics = lyrics; _adapter = adapter; _mediaElement = new MediaElement(); PlayOrPauseImage = new DoubleImageViewModel(Resources.PlayImape, Resources.PauseImage); OpenOrCloseTextImage = new DoubleImageViewModel(Resources.OpenTextImage, Resources.CloseTextImage); }
/// <summary> /// Добавление аудиозаписи пользователю /// </summary> /// <param name="audio"> /// Аудиозапись /// </param> /// <returns> /// Идентификатор аудиозаписи /// </returns> public int Add(Audio audio) { var query = new NameValueCollection { { "api_id", _connection.ApplicationId.ToString()}, { "sig", _connection.AccessToken}, { "aid", audio.Id.ToString()}, { "oid", audio.OwnerId.ToString()} }; var document = ExecuteRequest("audio.add", query); var audioId = -1; if (document.DocumentElement != null) { int.TryParse(document.DocumentElement.Value, out audioId); } return audioId; }
public int Add(Audio audio) { throw new NotImplementedException(); }