Esempio n. 1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="SongItem" /> class.
 /// </summary>
 /// <param name="item">The item.</param>
 public SongItem(UserItem item)
 {
     ItemId    = item.Id;
     SongId    = SoundMachineSongManager.GetSongId(item.SongCode);
     BaseItem  = item.BaseItem;
     ExtraData = item.ExtraData;
     SongCode  = item.SongCode;
 }
Esempio n. 2
0
        /// <summary>
        ///     Retrieves the song identifier.
        /// </summary>
        internal void RetrieveSongId()
        {
            string text = Request.GetString();

            uint songId = SoundMachineSongManager.GetSongId(text);

            if (songId != 0u)
            {
                ServerMessage serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("RetrieveSongIDMessageComposer"));
                serverMessage.AppendString(text);
                serverMessage.AppendInteger(songId);
                Session.SendMessage(serverMessage);
            }
        }