/// <summary> /// チェックした番組をダウンロードし、RSSを作成する /// </summary> private void ClipPodcast() { // 選択された番組のリスト ArrayList alSelectedGlobalChannels = new ArrayList(); // 選択された番組で未クリップの番組のリストを作る foreach (IChannel channel in StationList.GetUnclipedChannelsOfCurrentStation()) { if (channel.Check == true) { alSelectedGlobalChannels.Add(channel); } } // 選択された未クリップの番組がある場合のみ if (alSelectedGlobalChannels.Count != 0) { ClippingForm clippingForm = new ClippingForm(); clippingForm.ShowDialog(); clippingForm.Dispose(); } // 選択された未クリップの番組が無い場合は警告を出す else { MessageBox.Show("未クリップの番組が選択されていません", "情報"); } }
/// <summary> /// 番組リストの更新処理 /// </summary> private void UpdateChannelList() { #region UI前処理 // フォームををいったん選択不可にする this.Enabled = false; #endregion #region フィルタリング処理 // 放送局切り替えボックス Allが選択されている場合 if (stationFilterComboBox.SelectedIndex == 0) { // 全放送局を対象とする StationList.ChangeCurrentStationAt(-1); } else { /* * 放送局切り替えボックスに対して、StationList配列の並びは-1となるため、-1を指定 * stationListComboBox => ALL, Station1, Station2 ... * StationList => Station1, Station2 ... */ StationList.ChangeCurrentStationAt(stationFilterComboBox.SelectedIndex - 1); } // クリップ ALLが選択されている場合 if (allClipRadioButton.Checked == true) { currentChannels = StationList.GetChannelsOfCurrentStationFromAllHeadline(); } // クリップ Clipedが選択されている場合 else if (clipedRadioButton.Checked == true) { currentChannels = StationList.GetChannelsOfCurrentStationFromLocalHeadline(); } // クリップ Unclipedが選択されている場合 else if (unclipedRadioButton.Checked == true) { currentChannels = StationList.GetUnclipedChannelsOfCurrentStation(); } else { // ここに到達することはあり得ない Trace.Assert(false, "想定外の動作のため、終了します"); } switch (UserSetting.ChannelSort) { case UserSetting.ChannelSorts.DateOlder: Array.Sort(currentChannels, 0, currentChannels.Length, new DateOlderComparer()); break; case UserSetting.ChannelSorts.DateNewer: Array.Sort(currentChannels, 0, currentChannels.Length, new DateNewerComparer()); break; default: break; } DrawChannelList(currentChannels); mainStatusBar.Text = "Last " + DateTime.Now.ToString() + " - A:" + StationList.GetChannelsOfCurrentStationFromAllHeadline().Length + " C:" + StationList.GetChannelsOfCurrentStationFromLocalHeadline().Length + " U:" + StationList.GetUnclipedChannelsOfCurrentStation().Length; #endregion #region UI後処理 AutoResizeColumnListView(channelListView); // フォームを選択可能に回復する this.Enabled = true; #endregion }