/// <summary> /// event handler to map keyboard shortcuts /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void PlayerForm_KeyPress(object sender, KeyPressEventArgs e) { switch (e.KeyChar) { //jump to position on textbox case 'j': jumpTo(PlayerUtils.ConvertTimestampToSeconds(jumpTextBox.Text)); break; //set begin text box case 'b': setBeginTextBoxToCurrent(); break; //set end text box case 'e': setEndTextBoxToCurrent(); break; default: break; } }
/// <summary> /// fill the playlist list box with the file names in FilePaths /// </summary> private void fillPlaylistListBox() { playlistListBox.Items.AddRange(FilePaths.Select(filePath => PlayerUtils.getFileName(filePath)).ToArray()); }
/// <summary> /// set jump text box with current timestamp of video /// </summary> private void setJumpTextBoxToCurrent() { jumpTextBox.Text = PlayerUtils.NormalizeTimestamp(Player.Ctlcontrols.currentPositionString); jumpTextBox.Enabled = true; }