Пример #1
0
        // FilePlayerChange: The user has clicked on the file player. Take action on what was requested
        private void FilePlayer_FilePlayerChange(object sender, FilePlayerEventArgs args)
        {
            switch (args.Selection)
            {
            case FilePlayerSelectionEnum.First:
                this.FilePlayer_Stop();
                this.FileNavigatorSlider.Value = 1;
                break;

            case FilePlayerSelectionEnum.Page:
                this.FilePlayer_ScrollPage();
                break;

            case FilePlayerSelectionEnum.Row:
                this.FilePlayer_ScrollRow();
                break;

            case FilePlayerSelectionEnum.Last:
                this.FilePlayer_Stop();
                this.FileNavigatorSlider.Value = this.DataHandler.FileDatabase.CountAllCurrentlySelectedFiles;
                break;

            case FilePlayerSelectionEnum.Step:
                this.FilePlayer_Stop();
                this.FilePlayerTimer_Tick(null, null);
                break;

            case FilePlayerSelectionEnum.PlayFast:
                this.FilePlayer_Play(TimeSpan.FromSeconds(this.State.FilePlayerFastValue));
                break;

            case FilePlayerSelectionEnum.PlaySlow:
                this.FilePlayer_Play(TimeSpan.FromSeconds(this.State.FilePlayerSlowValue));
                break;

            case FilePlayerSelectionEnum.Stop:
            default:
                this.FilePlayer_Stop();
                break;
            }
        }
Пример #2
0
 public void OnFilePlayerChange(object sender, FilePlayerEventArgs e)
 {
     // If there exist any subscribers call the event
     this.FilePlayerChange?.Invoke(this, e);
 }