private void SetBluRayMKVMergeItemDefaults(MKVMergeItem item, MKVMergeItem defaults)
 {
     item.Compression      = defaults.Compression;
     item.DefaultTrackFlag = defaults.DefaultTrackFlag;
     item.ForcedTrackFlag  = defaults.ForcedTrackFlag;
     item.Language         = defaults.Language;
     item.TrackName        = defaults.TrackName;
 }
 public void SetBluRayTitleInfoExternalSubtitleForAdd(BluRaySummaryInfo bluRaySummaryInfo)
 {
     _currentBluRaySummaryInfo = bluRaySummaryInfo;
     _isAdd = true;
     lblExternalSubtitleEAC3ToTrackId.Text = string.Empty;
     _currentMKVMergeItem = new MKVMergeItem()
     {
         Compression = "determine automatically", DefaultTrackFlag = "no", ForcedTrackFlag = "no"
     };
 }
 public void SetBluRayTitleInfoExternalSubtitleForEdit(BluRayTitleSubtitle subtitle)
 {
     _isAdd = false;
     _currentSubtitleForEdit = subtitle;
     _currentMKVMergeItem    = new MKVMergeItem()
     {
         Compression      = _currentSubtitleForEdit.MKVMergeItem.Compression,
         DefaultTrackFlag = _currentSubtitleForEdit.MKVMergeItem.DefaultTrackFlag,
         ForcedTrackFlag  = _currentSubtitleForEdit.MKVMergeItem.ForcedTrackFlag,
         TrackName        = _currentSubtitleForEdit.MKVMergeItem.TrackName,
         Language         = new MKVMergeLanguageItem()
         {
             Name     = _currentSubtitleForEdit.MKVMergeItem.Language.Name, Value = _currentSubtitleForEdit.MKVMergeItem.Language.Value,
             Language = _currentSubtitleForEdit.MKVMergeItem.Language.Language
         }
     };
     lblExternalSubtitleEAC3ToTrackId.Text = _currentSubtitleForEdit.Id;
     txtExternalSubtitlePath.Text          = _currentSubtitleForEdit.ExternalSubtitlePath;
 }
示例#4
0
        private void HandleDGVSubtitlesCellClick(DataGridViewCellEventArgs e)
        {
            _mkvMergeChangeTriggeredByDataGridCellClick = true;
            var id = dgvSubtitles.Rows[e.RowIndex].Cells[1].Value;

            _currentBluRayTitleSubtitle = _bluRaySummaryInfo.BluRayTitleInfo.Subtitles.SingleOrDefault(a => a.Id == id.ToString());
            int externalSubtitleCellNumber = 5;

            _currentMKVMergeItem = _currentBluRayTitleSubtitle.MKVMergeItem;
            this.SetMKVToolNixControlsWithValues();

            if (e.ColumnIndex == 6)
            {
                this.RemoveExternalSubtitle(id.ToString(), e.RowIndex, externalSubtitleCellNumber);
            }

            if (_mkvMergeChangeTriggeredByDataGridCellClick)
            {
                _mkvMergeChangeTriggeredByDataGridCellClick = false;
            }
        }
示例#5
0
        private void HandleDGVAudioCellClick(DataGridViewCellEventArgs e)
        {
            _cbAudioTypeChangeTriggeredByDgvAudioCellClick = true;
            _mkvMergeChangeTriggeredByDataGridCellClick    = true;
            var id = dgvAudio.Rows[e.RowIndex].Cells[1].Value;

            _currentBluRayTitleAudio   = _bluRaySummaryInfo.BluRayTitleInfo.AudioList.SingleOrDefault(a => a.Id == id.ToString());
            cbAudioType.SelectedIndex  = cbAudioType.FindString(_audioService.GetAudioTypeName(_currentBluRayTitleAudio.AudioType));
            txtAudioTypeArguments.Text = _currentBluRayTitleAudio.Arguments;

            _currentMKVMergeItem = _currentBluRayTitleAudio.MKVMergeItem;
            this.SetMKVToolNixControlsWithValues();

            if (_cbAudioTypeChangeTriggeredByDgvAudioCellClick) //selected index may not have changed because the same audio type can exist on a blu-ray
            {
                _cbAudioTypeChangeTriggeredByDgvAudioCellClick = false;
            }

            if (_mkvMergeChangeTriggeredByDataGridCellClick)
            {
                _mkvMergeChangeTriggeredByDataGridCellClick = false;
            }
        }