public Form1() { InitializeComponent(); hkm = new HotKeyManager(); hkm.Register(Keys.Space, HotKeyModifier.Shift, 100, new HotKeyEventHandler(Handler)); arrShortCuts = new String[10]; InitConfig(); InitDisplay(); }
/// <summary> /// Does the routine startup stuff such as starting the timers, performing the initial catalog update, /// and setting visibility as well as boilerplate GUI code. /// </summary> public Launchy() { // // Required for Windows Form Designer support // InitializeComponent(); catalog = new ArrayList(100); currentMatches = new ArrayList(100); ignoreNextChange = false; hkm = new HotKeyManager(); hkm.Register(Keys.Space, HotKeyModifier.Alt, 100, new HotKeyEventHandler(Handler)); delayTimer = new System.Timers.Timer(); delayTimer.Elapsed += new ElapsedEventHandler(onTimer); delayTimer.Interval = 1000; delayTimer.Stop(); delayTimer.AutoReset = false; rescanTimer = new System.Timers.Timer(); rescanTimer.Elapsed += new ElapsedEventHandler(onRescanTimer); rescanTimer.Interval = 1200000; // 20 minutes rescanTimer.Start(); rescanTimer.AutoReset = true; rescan(); // // TODO: Add any constructor code after InitializeComponent call // this.Opacity = 0; this.Visible = false; atLaunch = true; this.MouseDown += new MouseEventHandler(this.Form1_MouseDown); }