示例#1
0
 //Start Play Sound
 private void MAdapterOnItemClick(object sender, HSoundAdapterClickEventArgs e)
 {
     try
     {
         var item = MAdapter.GetItem(e.Position);
         if (item != null)
         {
             Constant.PlayPos = e.Position;
             GlobalContext?.SoundController?.StartPlaySound(item, MAdapter.SoundsList);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
     }
 }
示例#2
0
 //open sound from NewRelease
 private void NewReleasesSoundAdapterOnOnItemClick(object sender, HSoundAdapterClickEventArgs e)
 {
     try
     {
         if (e.Position > -1)
         {
             var item = NewReleasesSoundAdapter.GetItem(e.Position);
             if (item == null)
             {
                 return;
             }
             Constant.PlayPos = e.Position;
             GlobalContext?.SoundController?.StartPlaySound(item, NewReleasesSoundAdapter.SoundsList);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception);
     }
 }