From 70b8833e4776b9c8ce81b1adddc1ef7259c8cb48 Mon Sep 17 00:00:00 2001 From: Bastian Schmidt Date: Mon, 25 Apr 2016 17:20:21 +0200 Subject: [PATCH] Fixes #311 by converting state loading trace to debug statements --- Fluent.Ribbon/Controls/Ribbon.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Fluent.Ribbon/Controls/Ribbon.cs b/Fluent.Ribbon/Controls/Ribbon.cs index 2d2fecafa..0ea5718de 100644 --- a/Fluent.Ribbon/Controls/Ribbon.cs +++ b/Fluent.Ribbon/Controls/Ribbon.cs @@ -2023,13 +2023,13 @@ public void SaveStateToIsolatedStorage() // Check whether automatic save is valid now if (this.ribbon.AutomaticStateManagement == false) { - Trace.WriteLine(string.Format("State not saved to isolated storage. Because automatic state management is disabled.")); + Debug.WriteLine("State not saved to isolated storage. Because automatic state management is disabled."); return; } if (this.IsStateLoaded == false) { - Trace.WriteLine(string.Format("State not saved to isolated storage. Because state was not loaded before.")); + Debug.WriteLine("State not saved to isolated storage. Because state was not loaded before."); return; } @@ -2044,7 +2044,7 @@ public void SaveStateToIsolatedStorage() } catch (Exception ex) { - Trace.WriteLine(string.Format("Error while trying to save Ribbon state. Error: {0}", ex)); + Trace.WriteLine($"Error while trying to save Ribbon state. Error: {ex}"); } } @@ -2120,7 +2120,7 @@ public void LoadStateFromIsolatedStorage() // Don't save or load state in design mode if (DesignerProperties.GetIsInDesignMode(this.ribbon)) { - Trace.WriteLine(string.Format("State not loaded from isolated storage. Because we are in design mode.")); + Debug.WriteLine("State not loaded from isolated storage. Because we are in design mode."); this.IsStateLoaded = true; return; } @@ -2128,7 +2128,7 @@ public void LoadStateFromIsolatedStorage() if (this.ribbon.AutomaticStateManagement == false) { this.IsStateLoaded = true; - Trace.WriteLine(string.Format("State not loaded from isolated storage. Because automatic state management is disabled.")); + Debug.WriteLine("State not loaded from isolated storage. Because automatic state management is disabled."); return; } @@ -2151,7 +2151,7 @@ public void LoadStateFromIsolatedStorage() } catch (Exception ex) { - Trace.WriteLine(string.Format("Error while trying to load Ribbon state. Error: {0}", ex)); + Trace.WriteLine($"Error while trying to load Ribbon state. Error: {ex}"); } this.IsStateLoaded = true;