2014-02-06 22:22:02 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
|
|
|
|
namespace Wox.UAC
|
|
|
|
|
{
|
|
|
|
|
public partial class MainWindow : Window
|
|
|
|
|
{
|
2014-03-11 22:17:10 +08:00
|
|
|
|
FileTypeAssociateInstaller installer = new FileTypeAssociateInstaller();
|
2014-03-02 11:04:30 +08:00
|
|
|
|
|
2014-02-06 22:22:02 +08:00
|
|
|
|
public MainWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
string[] param = Environment.GetCommandLineArgs();
|
2014-03-02 11:04:30 +08:00
|
|
|
|
if (param.Length > 1)
|
2014-02-06 22:22:02 +08:00
|
|
|
|
{
|
|
|
|
|
switch (param[1])
|
|
|
|
|
{
|
2014-03-02 11:04:30 +08:00
|
|
|
|
case "AssociatePluginInstaller":
|
|
|
|
|
installer.RegisterInstaller();
|
|
|
|
|
break;
|
2014-02-06 22:22:02 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Application.Current.Shutdown(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|