Exemplo n.º 1
0
        // SPEEDLAUNCH_CONSTRUCTOR
        public SpeedLaunch()
        {
            loadConfigurationFile();

            if (!this.loadIndexFile())
            {
                this.buildIndex();
            }

            //CREATE_TRY_ICON
            trayIcon = new NotifyIcon()
            {
                Icon        = Resources.SpeedLaunch,
                ContextMenu = new ContextMenu(new MenuItem[] {
                    new MenuItem("Exit", Exit)
                }),
                Visible = true,
            };

            trayIcon.MouseDoubleClick += new MouseEventHandler(this.notifyIcon_Click);

            //REGISTER_KEYBOARD_HOOK
            Hook.registerHook(this.showSpeedLaunch);

            //CREATE_SPEEDLAUNCH_VIEW
            view = new SpeedLaunchView(this);
        }
Exemplo n.º 2
0
        public void Close()
        {
            view = null;
            Hook.unregisterHook();

            if (this.indexIsRebuilded)
            {
                this.saveIndexFile();
            }

            Application.Exit();
        }