예제 #1
0
 private void ChannelSettingsLineupSelectionCombo_SelectedValueChanged(object sender, EventArgs e)
 {
     ResetConfigWMILineupCache();
     stationIDs_ = channelSettingsLineup?.stationIDs.ToList();
     SortChannelIDs();
     ChannelSettingsDataGridView.RowCount = stationIDs_.Count;
     ChannelSettingsDataGridView.Invalidate();
 }
예제 #2
0
        private void ChannelSettingsDataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            ChannelSettingsColumn column = GetColumnByIndex(e.ColumnIndex);

            channelSettingsSortReversed = !channelSettingsSortReversed && (column == channelSettingsSortColumn);
            channelSettingsSortColumn   = column;
            SortChannelIDs();
            ChannelSettingsDataGridView.Invalidate();
        }
예제 #3
0
 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();
 }
예제 #4
0
        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;
            }
        }