Ejemplo n.º 1
0
        public NewMacro()
        {
            InitializeComponent();

            KeyboardHook.CreateHook();
            KeyboardHook.KeyPressed += KeyboardHook_KeyPressed;
            MouseHook.CreateHook();
            MouseHook.MouseAction += MouseHook_MouseAction;

            stopwatch = new Stopwatch();

            trayMenu = new ContextMenu();
            trayMenu.MenuItems.Add("Open", btnAbrir_Click);
            trayMenu.MenuItems.Add("Record/Pause", buttonRecord_Click);
            trayMenu.MenuItems.Add("Stop", buttonStop_Click);
            trayMenu.MenuItems.Add("Sair", btnFechar_Click);

            notifyIcon = new NotifyIcon();
            notifyIcon.MouseDoubleClick += notifyIcon_MouseDoubleClick;
            notifyIcon.Icon              = Resources.space;
            notifyIcon.ContextMenu       = trayMenu;
            notifyIcon.Visible           = true;

            ChangeLabelRecorder(RecorderStatus.Ready);
        }
 static void Main(string[] args)
 {
     KeyboardHook.CreateHook();
     KeyboardHook.KeyPressed += KeyboardHook_KeyPressed;
     Application.Run();
     KeyboardHook.DisposeHook();
 }
Ejemplo n.º 3
0
        public Shortcuts(string commandLists)
        {
            InitializeComponent();

            this.CommandLists = commandLists;

            this.ShowInTaskbar   = false;
            this.ShowIcon        = false;
            this.BackColor       = Color.Black;
            this.Opacity         = 0.7D;
            this.FormBorderStyle = FormBorderStyle.None;
            this.MaximizedBounds = Screen.FromHandle(this.Handle).WorkingArea; // For not covering the taskbar

            KeyboardHook.CreateHook();
            KeyboardHook.KeyPressed += KeyboardHook_KeyPressed;
        }
Ejemplo n.º 4
0
 private void LoadHooks()
 {
     _kh.CreateHook();
     _ch.Install();
     _wch.CreateHook();
 }
Ejemplo n.º 5
0
 public QubeTrainer(QubeTrainerUI.Form1 ui)
 {
     this.ui = ui;
     KeyboardHook.CreateHook(KeyReader);
 }