Skip to content

Commit

Permalink
Improving debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Aug 25, 2018
1 parent 0a1d9c4 commit c5f8820
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Fluent.Ribbon/Services/PopupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace Fluent
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Threading;
using Fluent.Extensions;
using Fluent.Internal;

Expand Down Expand Up @@ -87,7 +86,7 @@ public static void RaiseDismissPopupEventAsync(object sender, DismissPopupMode m
return;
}

Debug.WriteLine($"Dismissing Popup ({mode}, async)");
Debug.WriteLine($"Dismissing Popup async (Mode = {mode}, Sender = {sender})");

element.RunInDispatcherAsync(() => RaiseDismissPopupEvent(sender, mode));
}
Expand All @@ -104,7 +103,7 @@ public static void RaiseDismissPopupEvent(object sender, DismissPopupMode mode)
return;
}

Debug.WriteLine($"Dismissing Popup ({mode})");
Debug.WriteLine($"Dismissing Popup (Mode = {mode}, Sender = {sender})");

element.RaiseEvent(new DismissPopupEventArgs(mode));
}
Expand All @@ -129,7 +128,10 @@ public static void Attach(Type classType)
/// </summary>
public static void OnClickThroughThunk(object sender, MouseButtonEventArgs e)
{
////Debug.WriteLine(string.Format("OnClickThroughThunk: sender = {0}; originalSource = {1}; mouse capture = {2}", sender, e.OriginalSource, Mouse.Captured));
Debug.WriteLine(nameof(OnClickThroughThunk));
Debug.WriteLine($"Sender - {sender}");
Debug.WriteLine($"OriginalSource - {e.OriginalSource}");
Debug.WriteLine($"Mouse.Captured - {Mouse.Captured}");

if (e.ChangedButton == MouseButton.Left
|| e.ChangedButton == MouseButton.Right)
Expand Down Expand Up @@ -165,7 +167,7 @@ public static void OnClickThroughThunk(object sender, MouseButtonEventArgs e)
/// </summary>
public static void OnLostMouseCapture(object sender, MouseEventArgs e)
{
Debug.WriteLine($"OnLostMouseCapture");
Debug.WriteLine(nameof(OnLostMouseCapture));
Debug.WriteLine($"Sender - {sender}");
Debug.WriteLine($"OriginalSource - {e.OriginalSource}");
Debug.WriteLine($"Mouse.Captured - {Mouse.Captured}");
Expand Down

0 comments on commit c5f8820

Please sign in to comment.