Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'remotes/origin/BUG-4317-Values_are_not_…

…Shown_Correctly_after_Channel_Edit'
  • Loading branch information...
commit 50291571f0f0553b2f13765882e27e5abad99579 2 parents df57941 + ca23c18
@Sebastiii Sebastiii authored
View
2  TvEngine3/TVLibrary/SetupTv/Sections/ChannelsInGroupControl.cs
@@ -320,6 +320,8 @@ private void editChannelToolStripMenuItem_Click(object sender, EventArgs e)
FormEditChannel dlg = new FormEditChannel();
dlg.Channel = channel;
dlg.ShowDialog();
+ listView1.Items[indexes[0]].Text = channel.DisplayName;
+ listView1.Items[indexes[0]].SubItems[1].Text = channel.ChannelNumber.ToString();
return;
}
}
View
2  TvEngine3/TVLibrary/SetupTv/Sections/ChannelsInRadioGroupControl.cs
@@ -328,6 +328,8 @@ private void editChannelToolStripMenuItem_Click(object sender, EventArgs e)
dlg.Channel = channel;
dlg.IsTv = false;
dlg.ShowDialog();
+ listView1.Items[indexes[0]].Text = channel.DisplayName;
+ listView1.Items[indexes[0]].SubItems[1].Text = channel.ChannelNumber.ToString();
return;
}
}
View
30 TvEngine3/TVLibrary/SetupTv/Sections/RadioChannels.cs
@@ -229,17 +229,18 @@ private void OnAddToFavoritesMenuItem_Click(object sender, EventArgs e)
Channel channel = (Channel)item.Tag;
layer.AddChannelToRadioGroup(channel, group);
- string groupString = item.SubItems[1].Text;
- if (groupString == string.Empty)
+ IList<string> groups = channel.GroupNames;
+ List<string> groupNames = new List<string>();
+ foreach (string groupName in groups)
{
- groupString = group.GroupName;
- }
- else
- {
- groupString += ", " + group.GroupName;
+ if (groupName != TvConstants.TvGroupNames.AllChannels &&
+ groupName != TvConstants.RadioGroupNames.AllChannels)
+ {
+ //Don't add "All Channels"
+ groupNames.Add(groupName);
+ }
}
-
- item.SubItems[1].Text = groupString;
+ item.SubItems[2].Text = String.Join(", ", groupNames.ToArray());
}
mpListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
@@ -413,18 +414,15 @@ private void mpButtonEdit_Click(object sender, EventArgs e)
dlg.IsTv = false;
if (dlg.ShowDialog(this) == DialogResult.OK)
{
- IList<Card> dbsCards = Card.ListAll();
- Dictionary<int, CardType> cards = new Dictionary<int, CardType>();
- foreach (Card card in dbsCards)
- {
- cards[card.IdCard] = RemoteControl.Instance.Type(card.IdCard);
- }
mpListView1.BeginUpdate();
try
{
- mpListView1.Items[indexes[0]] = _lvChannelHandler.CreateListViewItemForChannel(channel, cards);
+ mpListView1.Items[indexes[0]].Text = channel.DisplayName;
+ mpListView1.Items[indexes[0]].SubItems[1].Text = channel.ChannelNumber.ToString();
+ mpListView1.Items[indexes[0]].SubItems[5].Text = channel.ReferringTuningDetail().Count.ToString();
mpListView1.Sort();
ReOrder();
+ txtFilterString_TextChanged(null, null);
}
finally
{
View
30 TvEngine3/TVLibrary/SetupTv/Sections/TVChannels.cs
@@ -232,17 +232,18 @@ private void OnAddToFavoritesMenuItem_Click(object sender, EventArgs e)
Channel channel = (Channel)item.Tag;
layer.AddChannelToGroup(channel, group.GroupName);
- string groupString = item.SubItems[1].Text;
- if (groupString == string.Empty)
+ IList<string> groups = channel.GroupNames;
+ List<string> groupNames = new List<string>();
+ foreach (string groupName in groups)
{
- groupString = group.GroupName;
- }
- else
- {
- groupString += ", " + group.GroupName;
+ if (groupName != TvConstants.TvGroupNames.AllChannels &&
+ groupName != TvConstants.RadioGroupNames.AllChannels)
+ {
+ //Don't add "All Channels"
+ groupNames.Add(groupName);
+ }
}
-
- item.SubItems[1].Text = groupString;
+ item.SubItems[2].Text = String.Join(", ", groupNames.ToArray());
}
mpListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
@@ -425,18 +426,15 @@ private void mpButtonEdit_Click(object sender, EventArgs e)
dlg.Channel = channel;
if (dlg.ShowDialog(this) == DialogResult.OK)
{
- IList<Card> dbsCards = Card.ListAll();
- Dictionary<int, CardType> cards = new Dictionary<int, CardType>();
- foreach (Card card in dbsCards)
- {
- cards[card.IdCard] = RemoteControl.Instance.Type(card.IdCard);
- }
mpListView1.BeginUpdate();
try
{
- mpListView1.Items[indexes[0]] = _lvChannelHandler.CreateListViewItemForChannel(channel, cards);
+ mpListView1.Items[indexes[0]].Text = channel.DisplayName;
+ mpListView1.Items[indexes[0]].SubItems[1].Text = channel.ChannelNumber.ToString();
+ mpListView1.Items[indexes[0]].SubItems[5].Text = channel.ReferringTuningDetail().Count.ToString();
mpListView1.Sort();
ReOrder();
+ txtFilterString_TextChanged(null, null);
}
finally
{
Please sign in to comment.
Something went wrong with that request. Please try again.