Пример #1
0
 public void LyricsOutput()                                  // GenericPlayerHomework
 {
     foreach (Song item in Items)                            // GenericPlayerHomework
     {
         SkinForm.Render($"{item.Title} --- {item.Lyrics}"); // GenericPlayerHomework
     }
 }
Пример #2
0
 public void LyricsOutput()
 {
     foreach (Song item in songs)
     {
         SkinForm.Render($"{item.title} --- {item.lyrics}");
     }
 }
Пример #3
0
 public void ParametrSong(params Song[] SongList)
 {
     foreach (Song item in SongList)
     {
         SkinForm.Render(item.title);
     }
 }
Пример #4
0
 public void ParametrSong(params T[] itemList) // GenericPlayerHomework
 {
     foreach (T item in itemList)
     {
         SkinForm.Render(item.Title);
     }
 }
Пример #5
0
 public bool Start()
 {
     if (isLock == false)
     {
         SkinForm.Render("Start");
         playing = true;
     }
     return(playing);
 }
Пример #6
0
 public bool Stop()
 {
     if (isLock == false)
     {
         SkinForm.Render("Stop");
         playing = false;
     }
     return(playing);
 }
Пример #7
0
 public void VolumeChange(int Step, string op)
 {
     if (op == "+")
     {
         SkinForm.Render($"up volume {Step}");
         Volume = Volume + Step;
     }
     else if (op == "-")
     {
         SkinForm.Render($"down volume {Step}");
         Volume = Volume - Step;
     }
 }
Пример #8
0
 public void ListSong(List <Song> list)
 {
     foreach (Song item in list)
     {
         var tuple = GetSongData(item);
         if (item.Like == true)
         {
             Console.ForegroundColor = ConsoleColor.Green;
         }
         else if (item.Like == false)
         {
             Console.ForegroundColor = ConsoleColor.Red;
         }
         else if (item.Like == null)
         {
             Console.ResetColor();
         }
         string paramertString = $"{tuple.Title}, {item.songGenre} - {tuple.Item3.Hour}:{tuple.Item3.Min}:{tuple.Item3.Sec}";
         string outputString   = paramertString.StringSeparator();
         SkinForm.Render(outputString);
     }
 }
Пример #9
0
 public void ListItem(List <T> list) // GenericPlayerHomework
 {
     foreach (T item in list)
     {
         var tuple = GetItemData(item);
         if (item.Like == true)
         {
             Console.ForegroundColor = ConsoleColor.Green;
         }
         else if (item.Like == false)
         {
             Console.ForegroundColor = ConsoleColor.Red;
         }
         else if (item.Like == null)
         {
             Console.ResetColor();
         }
         string paramertString = $"{tuple.Title}, {item.Genre} - {tuple.Item3.Hour}:{tuple.Item3.Min}:{tuple.Item3.Sec}";
         string outputString   = paramertString.StringSeparator();
         SkinForm.Render(outputString);
     }
 }
Пример #10
0
 public void Play(bool Loop = false)
 {
     if (Loop == false)
     {
         ShufleExtension.ExtenShufle(this, songs);
     }
     else
     {
         for (int i = 0; i < 5; i++)
         {
             ShufleExtension.ExtenShufle(this, songs);
         }
     }
     if (playing == true)
     {
         SkinForm.Render("to Play has started");
         for (int i = 0; i < songs.Count; i++)
         {
             SkinForm.Render(songs[i].title);
             System.Threading.Thread.Sleep(2000);
         }
     }
 }
Пример #11
0
 public void UnLock()
 {
     SkinForm.Render("Player is unlocked");
     isLock = false;
 }
Пример #12
0
 public void Lock()
 {
     SkinForm.Render("Player is locked");
     isLock = true;
 }
Пример #13
0
 public void VolumeDown()
 {
     Volume = Volume - 1;
     SkinForm.Render("Volume " + Volume);
 }
Пример #14
0
 public void VolumeUp()
 {
     Volume = Volume + 1;
     SkinForm.Render($"Volume up {Volume}");
 }