mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
Adding launcher telemetry for context buttons clicked.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Drawing;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Input;
|
||||
using Wox.Plugin;
|
||||
|
||||
@@ -6,6 +8,7 @@ namespace Wox.ViewModel
|
||||
{
|
||||
public class ContextMenuItemViewModel : BaseModel
|
||||
{
|
||||
public string PluginName { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Glyph { get; set; }
|
||||
public string FontFamily { get; set; }
|
||||
@@ -13,5 +16,17 @@ namespace Wox.ViewModel
|
||||
public string AcceleratorKey { get; set; }
|
||||
public string AcceleratorModifiers { get; set; }
|
||||
public bool IsAcceleratorKeyEnabled { get; set; }
|
||||
|
||||
public void SendTelemetryEvent(ResultActionEvent.TriggerType triggerType)
|
||||
{
|
||||
var eventData = new ResultActionEvent()
|
||||
{
|
||||
PluginName = PluginName,
|
||||
Trigger = triggerType,
|
||||
ActionName = Title
|
||||
|
||||
};
|
||||
PowerLauncherTelemetry.Log.WriteEvent(eventData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user