improved usability

This commit is contained in:
hbeham
2016-04-27 19:03:50 +02:00
parent a879a4c1fe
commit aaba300f2d
16 changed files with 1556 additions and 1461 deletions

View File

@@ -17,6 +17,7 @@ namespace ChanSort.Api
public virtual bool IsDeleted { get; set; }
public SignalSource SignalSource { get; set; }
public string Source { get; set; }
public long RecordIndex { get; set; }
public int RecordOrder { get; set; }
public int OldProgramNr { get; set; }
@@ -44,7 +45,8 @@ namespace ChanSort.Api
public string Debug { get; private set; }
public string SatPosition { get; set; }
public Transponder Transponder { get; set; }
public IList<int> FavIndex { get; private set; }
public List<int> FavIndex { get; }
public List<int> OldFavIndex { get; }
public int ProgramNrPreset { get; set; }
public bool IsNameModified { get; set; }
@@ -54,8 +56,12 @@ namespace ChanSort.Api
{
this.NewProgramNr = -1;
this.FavIndex = new List<int>(MAX_FAV_LISTS);
this.OldFavIndex = new List<int>(MAX_FAV_LISTS);
for (int i = 0; i < MAX_FAV_LISTS; i++)
{
this.FavIndex.Add(-1);
this.OldFavIndex.Add(-1);
}
this.Name = "";
this.ShortName = "";
}
@@ -248,6 +254,11 @@ namespace ChanSort.Api
return subListIndex == 0 ? this.NewProgramNr : this.FavIndex[subListIndex - 1];
}
public int GetOldPosition(int subListIndex)
{
return subListIndex == 0 ? this.OldProgramNr : this.OldFavIndex[subListIndex - 1];
}
public void SetPosition(int subListIndex, int newPos)
{
if (subListIndex == 0)

View File

@@ -30,7 +30,7 @@ namespace ChanSort.Api
public int MaxChannelNameLength { get; set; }
public int PresetProgramNrCount { get; private set; }
public IList<string> VisibleColumnFieldNames;
public bool IsMixedSouceFavoritesList { get; set; }
public bool IsMixedSourceFavoritesList { get; set; }
#region Caption
public string Caption
@@ -82,6 +82,9 @@ namespace ChanSort.Api
}
}
for (int i = 0; i < ci.FavIndex.Count; i++)
ci.OldFavIndex[i] = ci.FavIndex[i];
if (!isDupeProgNr)
this.channelByProgNr[ci.OldProgramNr] = ci;

View File

@@ -61,7 +61,7 @@ namespace ChanSort.Api
public virtual void AddChannelList(ChannelList list)
{
this.channelLists.Add(list);
this.MixedSourceFavorites |= list.IsMixedSouceFavoritesList;
this.MixedSourceFavorites |= list.IsMixedSourceFavoritesList;
}
#endregion