/// <summary> /// keyboard shortcuts /// </summary> private void SetupShortcuts() { globalKeyHook.HookedKeys.Add(Keys.LControlKey); //record/pause globalKeyHook.HookedKeys.Add(Keys.RControlKey); //stop globalKeyHook.KeyUp += globalKeyHook_KeyUp; globalKeyHook.Hook(); }
public TestForm(Exam exam, User user) { this.exam = exam; this.user = user; InitializeComponent(); GlobalKeyboardHook hook = new GlobalKeyboardHook(); hook.KeyDown += new KeyEventHandler(hook_KeyDown); hook.Hook(); TopMost = true; }
public TestForm() { exam = ExamsBLL.getExamsByID(1); user = UserBLL.getUser(3); InitializeComponent(); GlobalKeyboardHook hook = new GlobalKeyboardHook(); hook.KeyDown += new KeyEventHandler(hook_KeyDown); hook.Hook(); TopMost = true; }
private void Init() { config = Config.GetInstanceInit(functions); intelligentPlayingManager = new IntelligentPlayingManager(); title = new TitleAssembler(SetTitle); changeAllowed = true; SetFunctions(); jmp = JMediaPlayer.GetJMediaPlayer(); config.SignUp(ConfigChanged); SetConfig(); jmp.SetMediaEvents(MediaEnded, MediaOpened, PositionChanged, PlayChanged); if (JMediaPlayer.NowPlaying != String.Empty) { btn_start.IsEnabled = true; btn_start_Click(null, null); } ofd = new OpenFileDialog(); slide_volume.Value = 50; hook = new GlobalKeyboardHook(KeyDownHandler); hook.Hook(); }