Migrate files from Wox to PowerLauncher (#5014)

* Moved all files from Wox to Powerlauncher

* Removed Wox project

* Changed namespace for imported files

* Resolved errors for VM

* Added build dependency order

* Fixed errors in helper class

* Remove Wox files

* Fixed errors in SingleInstance class

* Fixed wox.tests

* Fixed MSI

* Removed obsolete methods from PublicAPI

* nit fixes

* Throw null exception

* Fix merge conflict
This commit is contained in:
Divyansh Srivastava
2020-07-20 11:22:03 -07:00
committed by GitHub
parent 177546bab6
commit c85cd4ac24
40 changed files with 587 additions and 1048 deletions

View File

@@ -0,0 +1,51 @@
using Microsoft.PowerLauncher.Telemetry;
using Microsoft.PowerToys.Telemetry;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Input;
using Wox.Plugin;
namespace PowerLauncher.ViewModel
{
public class ContextMenuItemViewModel : BaseModel
{
private ICommand _command;
public string PluginName { get; set; }
public string Title { get; set; }
public string Glyph { get; set; }
public string FontFamily { get; set; }
public ICommand Command {
get
{
return this._command;
}
set
{
// ICommand does not implement the INotifyPropertyChanged interface and must call OnPropertyChanged() to prevent memory leaks
if (value != this._command)
{
this._command = value;
OnPropertyChanged();
}
}
}
public Key AcceleratorKey { get; set; }
public ModifierKeys AcceleratorModifiers { get; set; }
public bool IsAcceleratorKeyEnabled { get; set; }
public void SendTelemetryEvent(LauncherResultActionEvent.TriggerType triggerType)
{
var eventData = new LauncherResultActionEvent()
{
PluginName = PluginName,
Trigger = triggerType.ToString(),
ActionName = Title
};
PowerToysTelemetry.Log.WriteEvent(eventData);
}
}
}