private void MusicListBox_SelectedIndexChanged(object sender, EventArgs e) { try { SongName = MusicName[MusicListBox.SelectedIndex].Name; axMusic.URL = $"{MusicName[MusicListBox.SelectedIndex].Song_path}\\{MusicName[MusicListBox.SelectedIndex].Name}.mp3"; answer = StoredProcedureEXEC.ExecuteProcedureWithoutput("CheckStatusSong", login, MusicName[MusicListBox.SelectedIndex].Name); } catch (ArgumentOutOfRangeException) { return; } if (answer == "Err") { I_LikeIconPlayer.Visible = false; I_NoLikeIconPlayer.Visible = false; return; } else if (answer == "Like") { I_LikeIconPlayer.Visible = true; I_NoLikeIconPlayer.Visible = false; } else if (answer == "Not Like") { I_LikeIconPlayer.Visible = false; I_NoLikeIconPlayer.Visible = true; } }
private void I_NoLikeIconPlayer_Click(object sender, EventArgs e) { answer = StoredProcedureEXEC.ExecuteProcedureWithoutput("MusicChooseLike", login, SongName); if (answer == "Err" || answer == "NO") { MessageBox.Show("Произошла ошибка", "Ошибка!"); return; } else if (answer == "YES") { I_LikeIconPlayer.Visible = true; I_NoLikeIconPlayer.Visible = false; } }