Skip to content

Commit

Permalink
Fixes #311 by converting state loading trace to debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Apr 25, 2016
1 parent f151860 commit 70b8833
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Fluent.Ribbon/Controls/Ribbon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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}");
}
}

Expand Down Expand Up @@ -2120,15 +2120,15 @@ 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;
}

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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 70b8833

Please sign in to comment.