Beispiel #1
0
        /// <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();
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        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();
 }