private void ChannelSettingsLineupSelectionCombo_SelectedValueChanged(object sender, EventArgs e) { ResetConfigWMILineupCache(); stationIDs_ = channelSettingsLineup?.stationIDs.ToList(); SortChannelIDs(); ChannelSettingsDataGridView.RowCount = stationIDs_.Count; ChannelSettingsDataGridView.Invalidate(); }
private void ChannelSettingsDataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { ChannelSettingsColumn column = GetColumnByIndex(e.ColumnIndex); channelSettingsSortReversed = !channelSettingsSortReversed && (column == channelSettingsSortColumn); channelSettingsSortColumn = column; SortChannelIDs(); ChannelSettingsDataGridView.Invalidate(); }
private void ExcludeAllChannelsButton_Click(object sender, EventArgs e) { if (channelSettingsLineup == null) { return; } foreach (var stationId in channelSettingsLineup.stationIDs) { channelSettingsLineup.GetStationOverrides(stationId).excludeFromDownload = true; } ChannelSettingsDataGridView.Invalidate(); }
private void ChannelSettingsDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0 || e.RowIndex >= stationIDs_.Count()) { return; } ChannelSettingsColumn column = GetColumnByIndex(e.ColumnIndex); string stationID = stationIDs_[e.RowIndex]; SDStation station = channelSettingsLineup.GetStationByID(stationID); switch (column) { case ChannelSettingsColumn.Download: channelSettingsLineup.SetExcludedFromDownload(stationID, !channelSettingsLineup.ExcludedFromDownload(stationID)); ChannelSettingsDataGridView.InvalidateRow(e.RowIndex); break; case ChannelSettingsColumn.IncludeInGuide: channelSettingsLineup.SetExcludedFromGuide(stationID, !channelSettingsLineup.ExcludedFromGuide(stationID)); ChannelSettingsDataGridView.InvalidateRow(e.RowIndex); break; } }