From c8e5b98b475273e76ad5eaaabc007589894d1088 Mon Sep 17 00:00:00 2001 From: hbeham Date: Wed, 20 Nov 2013 09:55:42 +0100 Subject: [PATCH] changes: - fixed setting all Panasonic channel names to System.Byte[] - fixed error during startup when reading MRUs --- ChanSort.Loader.Panasonic/Serializer.cs | 4 +- ChanSort/MainForm.cs | 8 ++-- ChanSort/Properties/Settings.Designer.cs | 60 ++++++++++++++++++++++++ ChanSort/Properties/Settings.settings | 15 ++++++ ChanSort/app.config | 53 +++++++++++++-------- readme.txt | 4 +- 6 files changed, 119 insertions(+), 25 deletions(-) diff --git a/ChanSort.Loader.Panasonic/Serializer.cs b/ChanSort.Loader.Panasonic/Serializer.cs index 9b53a9e..c1552f1 100644 --- a/ChanSort.Loader.Panasonic/Serializer.cs +++ b/ChanSort.Loader.Panasonic/Serializer.cs @@ -11,7 +11,7 @@ namespace ChanSort.Loader.Panasonic { class Serializer : SerializerBase { - private static readonly string ERR_FileFormatOrEncryption = "File uses an unknown format or encryption"; + private const string ERR_FileFormatOrEncryption = "File uses an unknown format or encryption"; private static readonly int[] headerCypherTable; private readonly ChannelList avbtChannels = new ChannelList(SignalSource.AnalogT | SignalSource.Tv | SignalSource.Radio, "Analog Antenna"); private readonly ChannelList avbcChannels = new ChannelList(SignalSource.AnalogC | SignalSource.Tv | SignalSource.Radio, "Analog Cable"); @@ -590,7 +590,7 @@ order by s.ntype,major_channel cmd.Parameters.Add(new SQLiteParameter("@fav2", DbType.Int32)); cmd.Parameters.Add(new SQLiteParameter("@fav3", DbType.Int32)); cmd.Parameters.Add(new SQLiteParameter("@fav4", DbType.Int32)); - cmd.Parameters.Add(new SQLiteParameter("@name", DbType.String)); + cmd.Parameters.Add(new SQLiteParameter("@name", DbType.Binary)); cmd.Parameters.Add(new SQLiteParameter("@lock", DbType.Int32)); cmd.Parameters.Add(new SQLiteParameter("@skip", DbType.Int32)); cmd.Prepare(); diff --git a/ChanSort/MainForm.cs b/ChanSort/MainForm.cs index 1d18fd5..f9b2678 100644 --- a/ChanSort/MainForm.cs +++ b/ChanSort/MainForm.cs @@ -25,9 +25,9 @@ namespace ChanSort.Ui { public partial class MainForm : XtraForm { - public const string AppVersion = "v2013-11-20"; + public const string AppVersion = "v2013-11-20.2"; - private const int MaxMruEntries = 8; + private const int MaxMruEntries = 10; #region enum EditMode private enum EditMode @@ -950,7 +950,9 @@ namespace ChanSort.Ui for (int i = MaxMruEntries-1; i >= 0; i--) { - this.AddFileToMruList((string)Settings.Default.GetType().GetProperty("MruFile" + i).GetValue(Settings.Default, null)); + var prop = Settings.Default.GetType().GetProperty("MruFile" + i); + if (prop != null) + this.AddFileToMruList((string)prop.GetValue(Settings.Default, null)); } this.UpdateMruMenu(); } diff --git a/ChanSort/Properties/Settings.Designer.cs b/ChanSort/Properties/Settings.Designer.cs index ed728d7..52cbea4 100644 --- a/ChanSort/Properties/Settings.Designer.cs +++ b/ChanSort/Properties/Settings.Designer.cs @@ -370,5 +370,65 @@ namespace ChanSort.Ui.Properties { this["MruFile4"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MruFile5 { + get { + return ((string)(this["MruFile5"])); + } + set { + this["MruFile5"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MruFile6 { + get { + return ((string)(this["MruFile6"])); + } + set { + this["MruFile6"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MruFile7 { + get { + return ((string)(this["MruFile7"])); + } + set { + this["MruFile7"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MruFile8 { + get { + return ((string)(this["MruFile8"])); + } + set { + this["MruFile8"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MruFile9 { + get { + return ((string)(this["MruFile9"])); + } + set { + this["MruFile9"] = value; + } + } } } diff --git a/ChanSort/Properties/Settings.settings b/ChanSort/Properties/Settings.settings index 3c96b49..4df4df4 100644 --- a/ChanSort/Properties/Settings.settings +++ b/ChanSort/Properties/Settings.settings @@ -89,5 +89,20 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ChanSort/app.config b/ChanSort/app.config index 5f7ac01..110caee 100644 --- a/ChanSort/app.config +++ b/ChanSort/app.config @@ -15,37 +15,37 @@ 0 - + - + - + - + - + - + - + - + - + - + - + False @@ -54,13 +54,13 @@ 0, 0 - + - + - + 0 @@ -81,19 +81,34 @@ True - + - + - + - + - + + + + + + + + + + + + + + + + diff --git a/readme.txt b/readme.txt index baeb155..41d1749 100644 --- a/readme.txt +++ b/readme.txt @@ -1,6 +1,8 @@ -Version v2013-11-20 ======================================================= +Version v2013-11-20.2 ===================================================== Changes: +- Fix for v2013-11-20: Errormessage at program start +- Fix for v2013-11-20: Panasonic channel names were set incorrectly - Panasonic: Handling of special characters in channel names - Toshiba: channels didn't change their order for zapping in .zip/chmgt.db channel lists (thanks to Kurt W. for the hint)