private void Play_Tap(object sender, System.Windows.Input.GestureEventArgs e) { if (_dataSource != null) { int id = _dataSource.Id; int index = 0; if (ChannelUtils.JudgeSingle(_dataSource)) { index = -1; } StartToPlay(id, index); } }
private void playButton_Click(object sender, RoutedEventArgs e) { if (_dataSource != null) { PlayInfoHelp obj; if (ChannelUtils.JudgeSingle(_dataSource)) { obj = new PlayInfoHelp(_dataSource, -1); } else { obj = new PlayInfoHelp(_dataSource, 0); } StartToPlay(obj); } }
private void channelList_SelectionChanged(object sender, SelectionChangedEventArgs e) { var value = channelList.SelectedItem as ProgramInfo; if (value != null) { int id = value.ChannelId; int index = -1; if (!ChannelUtils.JudgeSingle(_dataSource)) { index = ChannelUtils.CreateProgramIndex(value.Index, _dataSource); } StartToPlay(id, index); } channelList.SelectedItem = null; }
private void listView_ItemClick(object sender, ItemClickEventArgs e) { var value = e.ClickedItem as ProgramInfo; if (value != null) { PlayInfoHelp obj; if (ChannelUtils.JudgeSingle(_dataSource)) { obj = new PlayInfoHelp(_dataSource, -1); } else { var index = ChannelUtils.CreateProgramIndex(value.Index, _dataSource); obj = new PlayInfoHelp(_dataSource, index); } StartToPlay(obj); } }