- Philips: show and edit customized titles of favorite lists

- fixed non-unique numbers in mixed-source favorite lists when using "Add to Fav A" (Panasonic, Hisense, Sony, Philips)
- function to reorder channels from 1-x is now reordering all channels when only a single one was selected
- function to sort channels by name is now reordering all channels when only a single one was selected
This commit is contained in:
Horst Beham
2020-02-11 21:06:37 +01:00
parent a901a7fa65
commit bd19d94686
13 changed files with 348 additions and 39 deletions

View File

@@ -349,22 +349,18 @@ namespace ChanSort.Api
#region SetFavorites()
public void SetFavorites(List<ChannelInfo> list, Favorites favorites, bool set)
public void SetFavorites(List<ChannelInfo> list, int favIndex, bool set)
{
bool sortedFav = this.DataRoot.SortedFavorites;
int favIndex = 0;
if (sortedFav)
{
for (int mask = (int) favorites; (mask & 1) == 0; mask >>= 1)
++favIndex;
}
var favMask = (Favorites)(1 << favIndex);
var favList = this.DataRoot.ChannelLists.FirstOrDefault(l => l.IsMixedSourceFavoritesList) ?? this.ChannelList;
if (set)
{
int maxPosition = 0;
if (sortedFav)
{
foreach (var channel in this.ChannelList.Channels)
foreach (var channel in favList.Channels)
maxPosition = Math.Max(maxPosition, channel.FavIndex[favIndex]);
}
@@ -372,7 +368,7 @@ namespace ChanSort.Api
{
if (sortedFav && channel.FavIndex[favIndex] == -1)
channel.FavIndex[favIndex] = ++maxPosition;
channel.Favorites |= favorites;
channel.Favorites |= favMask;
}
}
else
@@ -380,11 +376,19 @@ namespace ChanSort.Api
foreach (var channel in list)
{
if (sortedFav && channel.FavIndex[favIndex] != -1)
{
channel.FavIndex[favIndex] = -1;
// TODO close gap by pulling down higher numbers
channel.Favorites &= ~favMask;
}
// close gaps when needed
if (sortedFav && !this.DataRoot.AllowGapsInFavNumbers)
{
int i = 0;
foreach (var channel in favList.Channels)
{
if (channel.FavIndex[i] != -1)
channel.FavIndex[i] = ++i;
}
channel.Favorites &= ~favorites;
}
}
}

View File

@@ -37,7 +37,7 @@ namespace ChanSort.Api
public bool SortedFavorites { get; set; }
public bool MixedSourceFavorites { get; set; }
public bool AllowGapsInFavNumbers { get; set; }
public bool CanEditFavListNames { get; set; }
}
#endregion

View File

@@ -26,6 +26,7 @@ namespace ChanSort.Api
public bool CanSkip => this.loader.Features.CanSkipChannels;
public bool CanLock => this.loader.Features.CanLockChannels;
public bool CanHide => this.loader.Features.CanHideChannels;
public bool CanEditFavListName => this.loader.Features.CanEditFavListNames;
public DataRoot(SerializerBase loader)
{
@@ -246,5 +247,24 @@ namespace ChanSort.Api
}
#endregion
#region Get/SetFavListCaption()
private readonly Dictionary<int,string> favListCaptions = new Dictionary<int, string>();
public void SetFavListCaption(int favIndex, string caption)
{
favListCaptions[favIndex] = caption;
}
public string GetFavListCaption(int favIndex, bool asTabCaption = false)
{
var hasCaption = favListCaptions.TryGetValue(favIndex, out var caption);
if (!asTabCaption)
return caption;
var letter = (char)('A' + favIndex);
return hasCaption && !string.IsNullOrEmpty(caption) ? letter + ": " + caption : "Fav " + letter;
}
#endregion
}
}

View File

@@ -69,6 +69,7 @@ namespace ChanSort.Loader.PhilipsXml
this.Features.DeleteMode = DeleteMode.Physically;
this.Features.CanSaveAs = false;
this.Features.AllowGapsInFavNumbers = false;
this.Features.CanEditFavListNames = true;
this.DataRoot.AddChannelList(this.terrChannels);
this.DataRoot.AddChannelList(this.cableChannels);
@@ -357,10 +358,13 @@ namespace ChanSort.Loader.PhilipsXml
private void ReadFavList(XmlNode node)
{
int index = ParseInt(node.Attributes["Index"].InnerText);
string name = DecodeName(node.Attributes["Name"].InnerText);
this.Features.SupportedFavorites |= (Favorites) (1 << (index - 1));
this.Features.SortedFavorites = true;
this.Features.MixedSourceFavorites = true;
this.DataRoot.SetFavListCaption(index - 1, name);
if (this.favChannels.Count == 0)
{
foreach (var rootList in this.DataRoot.ChannelLists)
@@ -547,6 +551,9 @@ namespace ChanSort.Loader.PhilipsXml
{
++index;
favListNode.InnerXml = ""; // clear all <FavoriteChannel> child elements but keep the attributes of the current node
var attr = favListNode.Attributes?["Name"];
if (attr != null)
attr.InnerText = EncodeName(this.DataRoot.GetFavListCaption(index - 1));
foreach (var ch in favChannels.Channels.OrderBy(ch => ch.GetPosition(index)))
{
var nr = ch.GetPosition(index);
@@ -572,6 +579,7 @@ namespace ChanSort.Loader.PhilipsXml
var sb = new StringBuilder();
foreach (var b in bytes)
sb.Append($"0x{b:X2} 0x00 ");
sb.Remove(sb.Length - 1, 1);
return sb.ToString();
}
#endregion

View File

@@ -25,6 +25,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -35,6 +36,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -46,6 +48,7 @@
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
@@ -57,6 +60,7 @@
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>app.ico</ApplicationIcon>
@@ -166,6 +170,12 @@
<DependentUpon>ReferenceListForm.cs</DependentUpon>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="TextInputForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TextInputForm.Designer.cs">
<DependentUpon>TextInputForm.cs</DependentUpon>
</Compile>
<Compile Include="UpdateCheck.cs" />
<Compile Include="WaitForm1.cs">
<SubType>Form</SubType>
@@ -347,6 +357,9 @@
<EmbeddedResource Include="ReferenceListForm.ro.resx">
<DependentUpon>ReferenceListForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="TextInputForm.resx">
<DependentUpon>TextInputForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WaitForm1.cs.resx">
<DependentUpon>WaitForm1.cs</DependentUpon>
</EmbeddedResource>

View File

@@ -85,6 +85,7 @@
this.colServiceType = new DevExpress.XtraGrid.Columns.GridColumn();
this.colServiceTypeName = new DevExpress.XtraGrid.Columns.GridColumn();
this.colFreqInMhz = new DevExpress.XtraGrid.Columns.GridColumn();
this.colPolarity = new DevExpress.XtraGrid.Columns.GridColumn();
this.colChannelOrTransponder = new DevExpress.XtraGrid.Columns.GridColumn();
this.colSatellite = new DevExpress.XtraGrid.Columns.GridColumn();
this.colNetworkId = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -94,7 +95,6 @@
this.colVideoPid = new DevExpress.XtraGrid.Columns.GridColumn();
this.colAudioPid = new DevExpress.XtraGrid.Columns.GridColumn();
this.colSymbolRate = new DevExpress.XtraGrid.Columns.GridColumn();
this.colPolarity = new DevExpress.XtraGrid.Columns.GridColumn();
this.colNetworkName = new DevExpress.XtraGrid.Columns.GridColumn();
this.colNetworkOperator = new DevExpress.XtraGrid.Columns.GridColumn();
this.colProvider = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -342,6 +342,7 @@
resources.ApplyResources(this.colIndex1, "colIndex1");
this.colIndex1.FieldName = "RecordIndex";
this.colIndex1.Name = "colIndex1";
this.colIndex1.OptionsColumn.AllowEdit = false;
//
// colOutSlot
//
@@ -421,6 +422,7 @@
resources.ApplyResources(this.colOutSource, "colOutSource");
this.colOutSource.FieldName = "Source";
this.colOutSource.Name = "colOutSource";
this.colOutSource.OptionsColumn.AllowEdit = false;
//
// colUid1
//
@@ -803,6 +805,13 @@
this.colFreqInMhz.Name = "colFreqInMhz";
this.colFreqInMhz.OptionsColumn.AllowEdit = false;
//
// colPolarity
//
resources.ApplyResources(this.colPolarity, "colPolarity");
this.colPolarity.FieldName = "Polarity";
this.colPolarity.Name = "colPolarity";
this.colPolarity.OptionsColumn.AllowEdit = false;
//
// colChannelOrTransponder
//
resources.ApplyResources(this.colChannelOrTransponder, "colChannelOrTransponder");
@@ -865,13 +874,6 @@
this.colSymbolRate.Name = "colSymbolRate";
this.colSymbolRate.OptionsColumn.AllowEdit = false;
//
// colPolarity
//
resources.ApplyResources(this.colPolarity, "colPolarity");
this.colPolarity.FieldName = "Polarity";
this.colPolarity.Name = "colPolarity";
this.colPolarity.OptionsColumn.AllowEdit = false;
//
// colNetworkName
//
resources.ApplyResources(this.colNetworkName, "colNetworkName");
@@ -1991,6 +1993,7 @@
this.tabSubList.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.pageProgNr});
this.tabSubList.SelectedPageChanged += new DevExpress.XtraTab.TabPageChangedEventHandler(this.tabSubList_SelectedPageChanged);
this.tabSubList.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tabSubList_MouseUp);
//
// pageProgNr
//

View File

@@ -457,10 +457,10 @@ namespace ChanSort.Ui
while (this.tabSubList.TabPages.Count > favCount + 1)
this.tabSubList.TabPages.RemoveAt(this.tabSubList.TabPages.Count - 1);
while (this.tabSubList.TabPages.Count < favCount + 1)
{
var page = this.tabSubList.TabPages.Add();
page.Text = "Fav " + (char) ('A' + this.tabSubList.TabPages.Count - 2);
}
this.tabSubList.TabPages.Add();
for (int i = 1; i < this.tabSubList.TabPages.Count; i++)
this.tabSubList.TabPages[i].Text = this.DataRoot.GetFavListCaption(i - 1, true);
if (!this.DataRoot.SortedFavorites || this.subListIndex >= favCount)
{
this.tabSubList.SelectedTabPageIndex = 0;
@@ -1158,7 +1158,7 @@ namespace ChanSort.Ui
private void SortSelectedChannels()
{
var selectedChannels = this.GetSelectedChannels(this.gviewLeft);
var selectedChannels = this.GetSelectedChannels(this.gviewLeft, true);
if (selectedChannels.Count == 0) return;
this.gviewLeft.BeginDataUpdate();
this.gviewRight.BeginDataUpdate();
@@ -1204,7 +1204,7 @@ namespace ChanSort.Ui
private void RenumberSelectedChannels()
{
var list = this.GetSelectedChannels(this.gviewLeft);
var list = this.GetSelectedChannels(this.gviewLeft, true);
if (list.Count == 0) return;
this.gviewRight.BeginDataUpdate();
this.gviewLeft.BeginDataUpdate();
@@ -1217,14 +1217,23 @@ namespace ChanSort.Ui
#region GetSelectedChannels()
private List<ChannelInfo> GetSelectedChannels(GridView gview)
private List<ChannelInfo> GetSelectedChannels(GridView gview, bool selectAllIfOnlyOneIsSelected = false)
{
var channels = new List<ChannelInfo>();
foreach (var rowHandle in gview.GetSelectedRows())
if (gview.SelectedRowsCount <= 1 && selectAllIfOnlyOneIsSelected)
{
if (gview.IsDataRow(rowHandle))
channels.Add((ChannelInfo) gview.GetRow(rowHandle));
for (int rowHandle=0; rowHandle<gview.RowCount; rowHandle++)
channels.Add((ChannelInfo)gview.GetRow(rowHandle));
}
else
{
foreach (var rowHandle in gview.GetSelectedRows())
{
if (gview.IsDataRow(rowHandle))
channels.Add((ChannelInfo) gview.GetRow(rowHandle));
}
}
return channels;
}
@@ -1532,7 +1541,7 @@ namespace ChanSort.Ui
this.gviewRight.BeginDataUpdate();
this.gviewLeft.BeginDataUpdate();
this.Editor.SetFavorites(list, (Favorites) (1 << idx), set);
this.Editor.SetFavorites(list, idx, set);
this.gviewRight.EndDataUpdate();
this.gviewLeft.EndDataUpdate();
}
@@ -3311,5 +3320,27 @@ namespace ChanSort.Ui
#endregion
#region tabSubList_MouseUp
private void tabSubList_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
var hit = this.tabSubList.CalcHitInfo(e.Location);
if (hit.IsValid && hit.Page != null)
{
using var dlg = new TextInputForm();
dlg.StartPosition = FormStartPosition.Manual;
dlg.Location = this.tabSubList.PointToScreen(e.Location);
var favIndex = this.tabSubList.TabPages.IndexOf(hit.Page) - 1;
dlg.Text = this.DataRoot.GetFavListCaption(favIndex);
if (dlg.ShowDialog(this) == DialogResult.OK)
{
this.DataRoot.SetFavListCaption(favIndex, dlg.Text);
hit.Page.Text = this.DataRoot.GetFavListCaption(favIndex, true);
}
}
}
}
#endregion
}
}

View File

@@ -741,7 +741,7 @@
<data name="barManager1.Categories" type="DevExpress.XtraBars.BarManagerCategory, DevExpress.XtraBars.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFCYXJzLnYxOS4yLCBWZXJzaW9uPTE5
LjIuNS4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
LjIuNi4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
ACZEZXZFeHByZXNzLlh0cmFCYXJzLkJhck1hbmFnZXJDYXRlZ29yeQMAAAAETmFtZQRHdWlkB1Zpc2li
bGUBAwALU3lzdGVtLkd1aWQBAgAAAAYDAAAABEZpbGUE/P///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2IC
X2MCX2QCX2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICKaPJ5gsBeU2NTSFe
@@ -751,7 +751,7 @@
<data name="barManager1.Categories1" type="DevExpress.XtraBars.BarManagerCategory, DevExpress.XtraBars.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFCYXJzLnYxOS4yLCBWZXJzaW9uPTE5
LjIuNS4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
LjIuNi4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
ACZEZXZFeHByZXNzLlh0cmFCYXJzLkJhck1hbmFnZXJDYXRlZ29yeQMAAAAETmFtZQRHdWlkB1Zpc2li
bGUBAwALU3lzdGVtLkd1aWQBAgAAAAYDAAAABEhlbHAE/P///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2IC
X2MCX2QCX2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICdEVVDegwMU2acNpw
@@ -761,7 +761,7 @@
<data name="barManager1.Categories2" type="DevExpress.XtraBars.BarManagerCategory, DevExpress.XtraBars.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFCYXJzLnYxOS4yLCBWZXJzaW9uPTE5
LjIuNS4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
LjIuNi4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
ACZEZXZFeHByZXNzLlh0cmFCYXJzLkJhck1hbmFnZXJDYXRlZ29yeQMAAAAETmFtZQRHdWlkB1Zpc2li
bGUBAwALU3lzdGVtLkd1aWQBAgAAAAYDAAAABEVkaXQE/P///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2IC
X2MCX2QCX2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICZMTu18lZRU+IqmAu
@@ -771,7 +771,7 @@
<data name="barManager1.Categories3" type="DevExpress.XtraBars.BarManagerCategory, DevExpress.XtraBars.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFCYXJzLnYxOS4yLCBWZXJzaW9uPTE5
LjIuNS4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
LjIuNi4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
ACZEZXZFeHByZXNzLlh0cmFCYXJzLkJhck1hbmFnZXJDYXRlZ29yeQMAAAAETmFtZQRHdWlkB1Zpc2li
bGUBAwALU3lzdGVtLkd1aWQBAgAAAAYDAAAAB09wdGlvbnME/P///wtTeXN0ZW0uR3VpZAsAAAACX2EC
X2ICX2MCX2QCX2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICXJMOh9nzAkKc
@@ -781,7 +781,7 @@
<data name="barManager1.Categories4" type="DevExpress.XtraBars.BarManagerCategory, DevExpress.XtraBars.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFCYXJzLnYxOS4yLCBWZXJzaW9uPTE5
LjIuNS4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
LjIuNi4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAA
ACZEZXZFeHByZXNzLlh0cmFCYXJzLkJhck1hbmFnZXJDYXRlZ29yeQMAAAAETmFtZQRHdWlkB1Zpc2li
bGUBAwALU3lzdGVtLkd1aWQBAgAAAAYDAAAADUFjY2Vzc2liaWxpdHkE/P///wtTeXN0ZW0uR3VpZAsA
AAACX2ECX2ICX2MCX2QCX2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICeIvz
@@ -1264,7 +1264,7 @@
<value>globalImageCollection1</value>
</data>
<data name="&gt;&gt;globalImageCollection1.Type" xml:space="preserve">
<value>ChanSort.Ui.GlobalImageCollection, ChanSort, Version=1.0.7305.33710, Culture=neutral, PublicKeyToken=null</value>
<value>ChanSort.Ui.GlobalImageCollection, ChanSort, Version=1.0.7346.35990, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;gviewRight.Name" xml:space="preserve">
<value>gviewRight</value>
@@ -1957,7 +1957,7 @@
<value>DevExpress.XtraEditors.XtraForm, DevExpress.Utils.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="SharedImageCollection.Timestamp" type="System.DateTime, mscorlib">
<value>01/01/2020 18:44:40</value>
<value>02/11/2020 20:40:05</value>
</data>
<data name="SharedImageCollection.ImageSize" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>

View File

@@ -0,0 +1,7 @@
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

View File

@@ -0,0 +1,66 @@
namespace ChanSort.Ui
{
partial class TextInputForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textEdit = new DevExpress.XtraEditors.TextEdit();
((System.ComponentModel.ISupportInitialize)(this.textEdit.Properties)).BeginInit();
this.SuspendLayout();
//
// textEdit
//
this.textEdit.Location = new System.Drawing.Point(0, 0);
this.textEdit.Name = "textEdit";
this.textEdit.Size = new System.Drawing.Size(240, 20);
this.textEdit.TabIndex = 0;
this.textEdit.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textEdit_KeyDown);
//
// TextInputForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(240, 20);
this.ControlBox = false;
this.Controls.Add(this.textEdit);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "TextInputForm";
this.Text = "TextInputForm";
((System.ComponentModel.ISupportInitialize)(this.textEdit.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraEditors.TextEdit textEdit;
}
}

View File

@@ -0,0 +1,31 @@
using System.Windows.Forms;
using DevExpress.XtraEditors;
namespace ChanSort.Ui
{
public partial class TextInputForm : XtraForm
{
public TextInputForm()
{
InitializeComponent();
}
private void textEdit_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
this.DialogResult = DialogResult.Cancel;
else if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return)
this.DialogResult = DialogResult.OK;
}
public override string Text
{
get => this.textEdit?.Text ?? "";
set
{
if (this.textEdit != null)
this.textEdit.Text = value;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,6 +1,12 @@
ChanSort Change Log
===================
2020-02-11
- Philips: show and edit customized titles of favorite lists
- fixed non-unique numbers in mixed-source favorite lists when using "Add to Fav A" (Panasonic, Hisense, Sony, Philips)
- function to reorder channels from 1-x is now reordering all channels when only a single one was selected
- function to sort channels by name is now reordering all channels when only a single one was selected
2020-02-02
- fixed (hopefully): When channels were deleted from Sony lists, the TV reordered the list randomly after a reboot