using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace NumpadMonitor
{
public static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
string args0 = args.Length > 0 ? args[0] : "";
NumpadMonitorForm monitor = Initiate(args0 == "config-keys");
Application.Run(monitor);
}
public static NumpadMonitorForm Initiate(bool configKeys = false, bool alternativeKeyset = false, bool formVisible = true)
{
List keyinfo = KeyCodeReaderWriter.Read();
if (configKeys || keyinfo == null)
{
KeyConfig keyConfig = new KeyConfig(alternativeKeyset);
keyConfig.ShowDialog();
keyConfig.Dispose();
keyinfo = KeyCodeReaderWriter.Read();
}
NumpadMonitorForm monitor = new NumpadMonitorForm(keyinfo, alternativeKeyset, formVisible);
return monitor;
}
}
}