Small refactor to use common powertoys telemetry event source accross modules.

This commit is contained in:
ryanbodrug-microsoft
2020-05-05 09:23:31 -07:00
parent a9cc4dabb7
commit def0d7a519
15 changed files with 55 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
using Microsoft.PowerLauncher.Telemetry;
using Microsoft.PowerToys.Telemetry;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Input;
@@ -26,7 +27,7 @@ namespace Wox.ViewModel
ActionName = Title
};
PowerLauncherTelemetry.Log.WriteEvent(eventData);
PowerToysTelemetry.Log.WriteEvent(eventData);
}
}
}

View File

@@ -19,7 +19,8 @@ using Wox.Infrastructure.UserSettings;
using Wox.Plugin;
using Microsoft.PowerLauncher.Telemetry;
using Wox.Storage;
using Microsoft.PowerToys.Telemetry;
namespace Wox.ViewModel
{
public class MainViewModel : BaseModel, ISavable
@@ -311,11 +312,11 @@ namespace Wox.ViewModel
_visibility = value;
if(value == Visibility.Visible)
{
PowerLauncherTelemetry.Log.WriteEvent(new ShowEvent());
PowerToysTelemetry.Log.WriteEvent(new ShowEvent());
}
else
{
PowerLauncherTelemetry.Log.WriteEvent(new HideEvent());
PowerToysTelemetry.Log.WriteEvent(new HideEvent());
}
}
@@ -461,7 +462,7 @@ namespace Wox.ViewModel
NumResults = Results.Results.Count,
QueryLength = query.RawQuery.Length
};
PowerLauncherTelemetry.Log.WriteEvent(queryEvent);
PowerToysTelemetry.Log.WriteEvent(queryEvent);
}, currentCancellationToken);
}