-
Notifications
You must be signed in to change notification settings - Fork 8
/
App.xaml.cs
executable file
·30 lines (26 loc) · 1.1 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
namespace TouchInjector
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public static Dictionary<AvailableParameter, bool> StartParameters { get; set; }
public enum AvailableParameter { minimized }//TODO: Startup parameter max_touch ddd
private void Application_Startup(object sender, StartupEventArgs e)
{
StartParameters = new Dictionary<AvailableParameter, bool>();
foreach (AvailableParameter param in Enum.GetValues(typeof(AvailableParameter)))
StartParameters.Add(param, e.Args.Contains("-" + param.ToString("g")));
// Create main application window, starting minimized if specified
MainWindow mainWindow = new MainWindow();
if (!StartParameters[AvailableParameter.minimized])
mainWindow.Show();//show only if we don't start minimized
mainWindow.Initialize();
}
}
}