private void removeStation(RadioStation RS) { if (RS != null) { lock (@lock) { stations.Remove(RS); filteredStations.Remove(RS); } if (RS.Equals(SelectedStation)) { SelectedStation = null; } populateStations(); populateGenres(); } }
private void renderStation(Graphics g, Cell Cell, RadioStation Station) { if (Station != null) { string name = Station.Name; if (name.Length == 0) { name = Localization.Get(UI_Key.Radio_Blank_Name); } Color c = (Station.Equals(playingStation)) ? Styles.Playing : Styles.LightText; if (htpcMode == HTPCMode.HTPC) { TextRenderer.DrawText(g, name, Styles.FontHTPC, Cell.MainRectangle, c, tff); } else { TextRenderer.DrawText(g, name, Styles.FontBold, Cell.FirstRow, c, tff); } if (this.HTPCMode == HTPCMode.Normal) { TextRenderer.DrawText(g, Station.Genre, Styles.Font, Cell.FirstRow, Styles.LightText, tffr); if (Cell.Equals(hoverCell)) { TextRenderer.DrawText(g, Station.URL, Styles.FontItalic, Cell.SecondRow, Styles.LightText, tff); if (object.Equals(Cell.Station, SelectedStation)) { if (removeHover) { TextRenderer.DrawText(g, "Remove", Styles.FontUnderline, Cell.SecondRow, Styles.LightText, tffr); } else { TextRenderer.DrawText(g, "Remove", Styles.Font, Cell.SecondRow, Styles.LightText, tffr); } } else if (removeHover) { TextRenderer.DrawText(g, "Remove", Styles.FontUnderline, Cell.SecondRow, Styles.VeryLight, tffr); } else { TextRenderer.DrawText(g, "Remove", Styles.Font, Cell.SecondRow, Styles.Light, tffr); } } else { TextRenderer.DrawText(g, Station.URL, Styles.FontItalic, Cell.SecondRow, Styles.Light, tff); if (Station.BitRate > 0) { if (Cell.Equals(hoverCell)) { TextRenderer.DrawText(g, Station.BitRateString, Styles.Font, Cell.SecondRow, Styles.Medium, tffr); } else { TextRenderer.DrawText(g, Station.BitRateString, Styles.Font, Cell.SecondRow, Styles.LightText, tffr); } } } } } }