diff --git a/Log/ClientInfo.cs b/Log/ClientInfo.cs index 34bb646d..8cdc3047 100644 --- a/Log/ClientInfo.cs +++ b/Log/ClientInfo.cs @@ -322,8 +322,15 @@ public void UpdateStatusMarkerFile() /// private void updateStatusFile() { - File.WriteAllText(Path.Combine(ApplicationSettings.Default.LibraryPath, "status.json"), - "{\"lastActivity\":\"" + DateTime.Now.ToString() + "\",\"state\":\"" + Thread.State.ToString() + "\",\"xmdsLastActivity\":\"" + ApplicationSettings.Default.XmdsLastConnection.ToString() + "\",\"xmdsCollectInterval\":\"" + ApplicationSettings.Default.CollectInterval.ToString() + "\"}"); + try + { + File.WriteAllText(Path.Combine(ApplicationSettings.Default.LibraryPath, "status.json"), + "{\"lastActivity\":\"" + DateTime.Now.ToString() + "\",\"state\":\"" + Thread.State.ToString() + "\",\"xmdsLastActivity\":\"" + ApplicationSettings.Default.XmdsLastConnection.ToString() + "\",\"xmdsCollectInterval\":\"" + ApplicationSettings.Default.CollectInterval.ToString() + "\"}"); + } + catch (Exception e) + { + Trace.WriteLine(new LogMessage("ClientInfo - updateStatusFile", "Failed to update status file. e = " + e.Message), LogType.Error.ToString()); + } } } } \ No newline at end of file diff --git a/Logic/ApplicationSettings.cs b/Logic/ApplicationSettings.cs index ebbcac9a..729e083d 100644 --- a/Logic/ApplicationSettings.cs +++ b/Logic/ApplicationSettings.cs @@ -39,9 +39,9 @@ public class ApplicationSettings private static string _default = "default"; // Application Specific Settings we want to protect - private string _clientVersion = "1.8.0-rc1"; + private string _clientVersion = "1.8.0-rc2"; private string _version = "5"; - private int _clientCodeVersion = 124; + private int _clientCodeVersion = 125; public string ClientVersion { get { return _clientVersion; } } public string Version { get { return _version; } } diff --git a/MainForm.cs b/MainForm.cs index 86fbfbfa..5b466003 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -508,7 +508,7 @@ private void ChangeToNextLayout(string layoutPath) Controls.Remove(control); } - Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Destroy Layout Failed. Exception raised was: " + e.Message), LogType.Error.ToString()); + Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Destroy Layout Failed. Exception raised was: " + e.Message), LogType.Info.ToString()); throw e; } @@ -527,7 +527,7 @@ private void ChangeToNextLayout(string layoutPath) catch (Exception e) { DestroyLayout(); - Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Prepare Layout Failed. Exception raised was: " + e.Message), LogType.Error.ToString()); + Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Prepare Layout Failed. Exception raised was: " + e.Message), LogType.Info.ToString()); throw; } @@ -547,7 +547,7 @@ private void ChangeToNextLayout(string layoutPath) } catch (Exception e) { - Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Notify Status Failed. Exception raised was: " + e.Message), LogType.Error.ToString()); + Trace.WriteLine(new LogMessage("MainForm - ChangeToNextLayout", "Notify Status Failed. Exception raised was: " + e.Message), LogType.Info.ToString()); throw; } } diff --git a/Program.cs b/Program.cs index 35804fe4..9e92694a 100644 --- a/Program.cs +++ b/Program.cs @@ -124,7 +124,7 @@ static int Main(string[] args) Trace.Flush(); return 0; - } + } private static void RunClient() { @@ -201,8 +201,8 @@ static void HandleUnhandledException(Object o) Trace.WriteLine(new LogMessage("Main", "Unable to write to event log " + ex.Message), LogType.Error.ToString()); } - // Try to restart - Application.Restart(); + // Exit the application and allow it to be restarted by the Watchdog. + Application.Exit(); } [DllImport("User32.dll")] diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index bc48410b..4e2b8665 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ // Build Number // Revision // -[assembly: AssemblyVersion("10.8.0.1")] -[assembly: AssemblyFileVersion("10.8.0.1")] +[assembly: AssemblyVersion("10.8.0.3")] +[assembly: AssemblyFileVersion("10.8.0.3")] [assembly: NeutralResourcesLanguageAttribute("en-GB")] diff --git a/bin/x86/Release/Xibo.scr b/bin/x86/Release/Xibo.scr index b684ed6a..8c9cd3ad 100644 Binary files a/bin/x86/Release/Xibo.scr and b/bin/x86/Release/Xibo.scr differ