mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Keep format when loading EBU STL files
This commit is contained in:
parent
e3e0214707
commit
3489533169
@ -59,7 +59,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
int _count;
|
||||
int _converted;
|
||||
int _errors;
|
||||
IList<SubtitleFormat> _allFormats = SubtitleFormat.AllSubtitleFormats;
|
||||
IList<SubtitleFormat> _allFormats;
|
||||
bool _abort;
|
||||
ListViewItem _matroskaListViewItem;
|
||||
|
||||
@ -137,10 +137,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
FixLargeFonts();
|
||||
|
||||
_allFormats = new List<SubtitleFormat>();
|
||||
foreach (var f in SubtitleFormat.AllSubtitleFormats)
|
||||
{
|
||||
if (!f.IsVobSubIndexFile)
|
||||
if (!f.IsVobSubIndexFile && f.IsTextBased)
|
||||
{
|
||||
comboBoxSubtitleFormats.Items.Add(f.Name);
|
||||
_allFormats.Add(f);
|
||||
}
|
||||
|
||||
}
|
||||
comboBoxSubtitleFormats.SelectedIndex = 0;
|
||||
|
366
src/Forms/Main.Designer.cs
generated
366
src/Forms/Main.Designer.cs
generated
@ -186,6 +186,7 @@
|
||||
this.toolStripMenuItemOpenDvd = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItemSetAudioTrack = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.closeVideoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.setVideoOffsetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItemImportSceneChanges = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItemRemoveSceneChanges = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
@ -281,6 +282,7 @@
|
||||
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||
this.fontDialog1 = new System.Windows.Forms.FontDialog();
|
||||
this.groupBoxVideo = new System.Windows.Forms.GroupBox();
|
||||
this.audioVisualizer = new Nikse.SubtitleEdit.Controls.AudioVisualizer();
|
||||
this.checkBoxSyncListViewWithVideoWhilePlaying = new System.Windows.Forms.CheckBox();
|
||||
this.labelVideoInfo = new System.Windows.Forms.Label();
|
||||
this.trackBarWaveFormPosition = new System.Windows.Forms.TrackBar();
|
||||
@ -320,6 +322,7 @@
|
||||
this.buttonPlayCurrent = new System.Windows.Forms.Button();
|
||||
this.buttonPlayNext = new System.Windows.Forms.Button();
|
||||
this.tabPageCreate = new System.Windows.Forms.TabPage();
|
||||
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.buttonGotoSub = new System.Windows.Forms.Button();
|
||||
this.buttonBeforeText = new System.Windows.Forms.Button();
|
||||
this.buttonSetEnd = new System.Windows.Forms.Button();
|
||||
@ -356,6 +359,7 @@
|
||||
this.labelVideoPosition2 = new System.Windows.Forms.Label();
|
||||
this.buttonAdjustGoToPosAndPause = new System.Windows.Forms.Button();
|
||||
this.buttonAdjustPlayBefore = new System.Windows.Forms.Button();
|
||||
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.ShowSubtitleTimer = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerAutoDuration = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerAutoContinue = new System.Windows.Forms.Timer(this.components);
|
||||
@ -383,6 +387,7 @@
|
||||
this.tabControlSubtitle = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.splitContainerListViewAndText = new System.Windows.Forms.SplitContainer();
|
||||
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||
this.groupBoxEdit = new System.Windows.Forms.GroupBox();
|
||||
this.labelSingleLine = new System.Windows.Forms.Label();
|
||||
this.labelAlternateSingleLine = new System.Windows.Forms.Label();
|
||||
@ -394,6 +399,7 @@
|
||||
this.labelTextAlternateLineLengths = new System.Windows.Forms.Label();
|
||||
this.labelAlternateText = new System.Windows.Forms.Label();
|
||||
this.labelText = new System.Windows.Forms.Label();
|
||||
this.textBoxListViewTextAlternate = new Nikse.SubtitleEdit.Controls.SETextBox();
|
||||
this.contextMenuStripTextBoxListView = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.toolStripMenuItemWebVttVoice = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparatorWebVTT = new System.Windows.Forms.ToolStripSeparator();
|
||||
@ -427,29 +433,24 @@
|
||||
this.labelTextLineTotal = new System.Windows.Forms.Label();
|
||||
this.labelCharactersPerSecond = new System.Windows.Forms.Label();
|
||||
this.buttonUnBreak = new System.Windows.Forms.Button();
|
||||
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.numericUpDownDuration = new System.Windows.Forms.NumericUpDown();
|
||||
this.buttonPrevious = new System.Windows.Forms.Button();
|
||||
this.buttonNext = new System.Windows.Forms.Button();
|
||||
this.labelStartTime = new System.Windows.Forms.Label();
|
||||
this.textBoxListViewText = new Nikse.SubtitleEdit.Controls.SETextBox();
|
||||
this.labelDuration = new System.Windows.Forms.Label();
|
||||
this.labelAutoDuration = new System.Windows.Forms.Label();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.textBoxSource = new System.Windows.Forms.TextBox();
|
||||
this.panelVideoPlayer = new System.Windows.Forms.Panel();
|
||||
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
|
||||
this.contextMenuStripEmpty = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.insertLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
|
||||
this.timerTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerAlternateTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||
this.setVideoOffsetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||
this.textBoxListViewTextAlternate = new Nikse.SubtitleEdit.Controls.SETextBox();
|
||||
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.textBoxListViewText = new Nikse.SubtitleEdit.Controls.SETextBox();
|
||||
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
|
||||
this.audioVisualizer = new Nikse.SubtitleEdit.Controls.AudioVisualizer();
|
||||
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.toolStripMenuItemEbuProperties = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
@ -871,6 +872,7 @@
|
||||
this.toolStripMenuItemNuendoProperties,
|
||||
this.toolStripMenuItemFcpProperties,
|
||||
this.toolStripMenuItemSubStationAlpha,
|
||||
this.toolStripMenuItemEbuProperties,
|
||||
this.toolStripSeparator20,
|
||||
this.openOriginalToolStripMenuItem,
|
||||
this.saveOriginalToolStripMenuItem,
|
||||
@ -1841,6 +1843,13 @@
|
||||
this.closeVideoToolStripMenuItem.Text = "Close video";
|
||||
this.closeVideoToolStripMenuItem.Click += new System.EventHandler(this.CloseVideoToolStripMenuItemClick);
|
||||
//
|
||||
// setVideoOffsetToolStripMenuItem
|
||||
//
|
||||
this.setVideoOffsetToolStripMenuItem.Name = "setVideoOffsetToolStripMenuItem";
|
||||
this.setVideoOffsetToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
|
||||
this.setVideoOffsetToolStripMenuItem.Text = "Set video offset...";
|
||||
this.setVideoOffsetToolStripMenuItem.Click += new System.EventHandler(this.setVideoOffsetToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItemImportSceneChanges
|
||||
//
|
||||
this.toolStripMenuItemImportSceneChanges.Name = "toolStripMenuItemImportSceneChanges";
|
||||
@ -2569,6 +2578,41 @@
|
||||
this.groupBoxVideo.TabIndex = 1;
|
||||
this.groupBoxVideo.TabStop = false;
|
||||
//
|
||||
// audioVisualizer
|
||||
//
|
||||
this.audioVisualizer.AllowDrop = true;
|
||||
this.audioVisualizer.AllowNewSelection = true;
|
||||
this.audioVisualizer.AllowOverlap = false;
|
||||
this.audioVisualizer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.audioVisualizer.BackColor = System.Drawing.Color.Black;
|
||||
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
|
||||
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
|
||||
this.audioVisualizer.DrawGridLines = true;
|
||||
this.audioVisualizer.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
|
||||
this.audioVisualizer.Location = new System.Drawing.Point(472, 32);
|
||||
this.audioVisualizer.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.audioVisualizer.Name = "audioVisualizer";
|
||||
this.audioVisualizer.NewSelectionParagraph = null;
|
||||
this.audioVisualizer.Offset = 0D;
|
||||
this.audioVisualizer.SceneChanges = ((System.Collections.Generic.List<double>)(resources.GetObject("audioVisualizer.SceneChanges")));
|
||||
this.audioVisualizer.SelectedColor = System.Drawing.Color.Red;
|
||||
this.audioVisualizer.ShowSpectrogram = false;
|
||||
this.audioVisualizer.ShowWaveform = true;
|
||||
this.audioVisualizer.Size = new System.Drawing.Size(499, 229);
|
||||
this.audioVisualizer.StartPositionSeconds = 0D;
|
||||
this.audioVisualizer.TabIndex = 6;
|
||||
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
|
||||
this.audioVisualizer.VerticalZoomPercent = 1D;
|
||||
this.audioVisualizer.WaveFormNotLoadedText = "Click to add wave form";
|
||||
this.audioVisualizer.WavePeaks = null;
|
||||
this.audioVisualizer.ZoomFactor = 1D;
|
||||
this.audioVisualizer.Click += new System.EventHandler(this.AudioWaveForm_Click);
|
||||
this.audioVisualizer.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveFormDragDrop);
|
||||
this.audioVisualizer.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveFormDragEnter);
|
||||
this.audioVisualizer.MouseEnter += new System.EventHandler(this.audioVisualizer_MouseEnter);
|
||||
//
|
||||
// checkBoxSyncListViewWithVideoWhilePlaying
|
||||
//
|
||||
this.checkBoxSyncListViewWithVideoWhilePlaying.AutoSize = true;
|
||||
@ -3029,6 +3073,16 @@
|
||||
this.tabPageCreate.Text = "Create";
|
||||
this.tabPageCreate.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// timeUpDownVideoPosition
|
||||
//
|
||||
this.timeUpDownVideoPosition.AutoSize = true;
|
||||
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(96, 191);
|
||||
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
|
||||
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(96, 25);
|
||||
this.timeUpDownVideoPosition.TabIndex = 12;
|
||||
//
|
||||
// buttonGotoSub
|
||||
//
|
||||
this.buttonGotoSub.Location = new System.Drawing.Point(6, 58);
|
||||
@ -3463,6 +3517,16 @@
|
||||
this.buttonAdjustPlayBefore.UseVisualStyleBackColor = true;
|
||||
this.buttonAdjustPlayBefore.Click += new System.EventHandler(this.buttonBeforeText_Click);
|
||||
//
|
||||
// timeUpDownVideoPositionAdjust
|
||||
//
|
||||
this.timeUpDownVideoPositionAdjust.AutoSize = true;
|
||||
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(96, 213);
|
||||
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
|
||||
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(96, 25);
|
||||
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
|
||||
//
|
||||
// ShowSubtitleTimer
|
||||
//
|
||||
this.ShowSubtitleTimer.Enabled = true;
|
||||
@ -3702,6 +3766,35 @@
|
||||
this.splitContainerListViewAndText.SplitterDistance = 89;
|
||||
this.splitContainerListViewAndText.TabIndex = 2;
|
||||
//
|
||||
// SubtitleListview1
|
||||
//
|
||||
this.SubtitleListview1.AllowDrop = true;
|
||||
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
this.SubtitleListview1.GridLines = true;
|
||||
this.SubtitleListview1.HideSelection = false;
|
||||
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
|
||||
this.SubtitleListview1.Name = "SubtitleListview1";
|
||||
this.SubtitleListview1.OwnerDraw = true;
|
||||
this.SubtitleListview1.Size = new System.Drawing.Size(724, 89);
|
||||
this.SubtitleListview1.SubtitleFontBold = false;
|
||||
this.SubtitleListview1.SubtitleFontName = "Tahoma";
|
||||
this.SubtitleListview1.SubtitleFontSize = 8;
|
||||
this.SubtitleListview1.TabIndex = 0;
|
||||
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
||||
this.SubtitleListview1.UseSyntaxColoring = true;
|
||||
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
||||
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
|
||||
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
|
||||
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
|
||||
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
|
||||
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
|
||||
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
|
||||
//
|
||||
// groupBoxEdit
|
||||
//
|
||||
this.groupBoxEdit.Controls.Add(this.labelSingleLine);
|
||||
@ -3837,6 +3930,28 @@
|
||||
this.labelText.TabIndex = 5;
|
||||
this.labelText.Text = "Text";
|
||||
//
|
||||
// textBoxListViewTextAlternate
|
||||
//
|
||||
this.textBoxListViewTextAlternate.AllowDrop = true;
|
||||
this.textBoxListViewTextAlternate.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxListViewTextAlternate.ContextMenuStrip = this.contextMenuStripTextBoxListView;
|
||||
this.textBoxListViewTextAlternate.Enabled = false;
|
||||
this.textBoxListViewTextAlternate.HideSelection = false;
|
||||
this.textBoxListViewTextAlternate.Location = new System.Drawing.Point(946, 28);
|
||||
this.textBoxListViewTextAlternate.Multiline = true;
|
||||
this.textBoxListViewTextAlternate.Name = "textBoxListViewTextAlternate";
|
||||
this.textBoxListViewTextAlternate.Size = new System.Drawing.Size(0, 60);
|
||||
this.textBoxListViewTextAlternate.TabIndex = 33;
|
||||
this.textBoxListViewTextAlternate.Visible = false;
|
||||
this.textBoxListViewTextAlternate.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseClick);
|
||||
this.textBoxListViewTextAlternate.TextChanged += new System.EventHandler(this.textBoxListViewTextAlternate_TextChanged);
|
||||
this.textBoxListViewTextAlternate.Enter += new System.EventHandler(this.TextBoxListViewTextAlternateEnter);
|
||||
this.textBoxListViewTextAlternate.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyDown);
|
||||
this.textBoxListViewTextAlternate.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyUp);
|
||||
this.textBoxListViewTextAlternate.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseMove);
|
||||
//
|
||||
// contextMenuStripTextBoxListView
|
||||
//
|
||||
this.contextMenuStripTextBoxListView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -4107,6 +4222,16 @@
|
||||
this.buttonUnBreak.UseVisualStyleBackColor = true;
|
||||
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
|
||||
//
|
||||
// timeUpDownStartTime
|
||||
//
|
||||
this.timeUpDownStartTime.AutoSize = true;
|
||||
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 26);
|
||||
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
||||
this.timeUpDownStartTime.Size = new System.Drawing.Size(96, 25);
|
||||
this.timeUpDownStartTime.TabIndex = 0;
|
||||
//
|
||||
// numericUpDownDuration
|
||||
//
|
||||
this.numericUpDownDuration.DecimalPlaces = 3;
|
||||
@ -4160,6 +4285,28 @@
|
||||
this.labelStartTime.TabIndex = 3;
|
||||
this.labelStartTime.Text = "Start time";
|
||||
//
|
||||
// textBoxListViewText
|
||||
//
|
||||
this.textBoxListViewText.AllowDrop = true;
|
||||
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
|
||||
this.textBoxListViewText.Enabled = false;
|
||||
this.textBoxListViewText.HideSelection = false;
|
||||
this.textBoxListViewText.Location = new System.Drawing.Point(236, 28);
|
||||
this.textBoxListViewText.Multiline = true;
|
||||
this.textBoxListViewText.Name = "textBoxListViewText";
|
||||
this.textBoxListViewText.Size = new System.Drawing.Size(362, 60);
|
||||
this.textBoxListViewText.TabIndex = 5;
|
||||
this.textBoxListViewText.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextMouseClick);
|
||||
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
|
||||
this.textBoxListViewText.Enter += new System.EventHandler(this.TextBoxListViewTextEnter);
|
||||
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
|
||||
this.textBoxListViewText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyUp);
|
||||
this.textBoxListViewText.Leave += new System.EventHandler(this.textBoxListViewText_Leave);
|
||||
this.textBoxListViewText.MouseMove += new System.Windows.Forms.MouseEventHandler(this.textBoxListViewText_MouseMove);
|
||||
//
|
||||
// labelDuration
|
||||
//
|
||||
this.labelDuration.AutoSize = true;
|
||||
@ -4220,6 +4367,33 @@
|
||||
this.panelVideoPlayer.Size = new System.Drawing.Size(220, 241);
|
||||
this.panelVideoPlayer.TabIndex = 5;
|
||||
//
|
||||
// mediaPlayer
|
||||
//
|
||||
this.mediaPlayer.AllowDrop = true;
|
||||
this.mediaPlayer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||
this.mediaPlayer.CurrentPosition = 0D;
|
||||
this.mediaPlayer.FontSizeFactor = 1F;
|
||||
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
|
||||
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.mediaPlayer.Name = "mediaPlayer";
|
||||
this.mediaPlayer.Offset = 0D;
|
||||
this.mediaPlayer.ShowFullscreenButton = true;
|
||||
this.mediaPlayer.ShowMuteButton = true;
|
||||
this.mediaPlayer.ShowStopButton = true;
|
||||
this.mediaPlayer.Size = new System.Drawing.Size(219, 241);
|
||||
this.mediaPlayer.SubtitleText = "";
|
||||
this.mediaPlayer.TabIndex = 5;
|
||||
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.mediaPlayer.VideoHeight = 0;
|
||||
this.mediaPlayer.VideoPlayer = null;
|
||||
this.mediaPlayer.VideoWidth = 0;
|
||||
this.mediaPlayer.Volume = 0D;
|
||||
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
|
||||
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
|
||||
//
|
||||
// contextMenuStripEmpty
|
||||
//
|
||||
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -4251,175 +4425,12 @@
|
||||
this.timerAlternateTextUndo.Interval = 700;
|
||||
this.timerAlternateTextUndo.Tick += new System.EventHandler(this.TimerAlternateTextUndoTick);
|
||||
//
|
||||
// setVideoOffsetToolStripMenuItem
|
||||
// toolStripMenuItemEbuProperties
|
||||
//
|
||||
this.setVideoOffsetToolStripMenuItem.Name = "setVideoOffsetToolStripMenuItem";
|
||||
this.setVideoOffsetToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
|
||||
this.setVideoOffsetToolStripMenuItem.Text = "Set video offset...";
|
||||
this.setVideoOffsetToolStripMenuItem.Click += new System.EventHandler(this.setVideoOffsetToolStripMenuItem_Click);
|
||||
//
|
||||
// SubtitleListview1
|
||||
//
|
||||
this.SubtitleListview1.AllowDrop = true;
|
||||
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
this.SubtitleListview1.GridLines = true;
|
||||
this.SubtitleListview1.HideSelection = false;
|
||||
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
|
||||
this.SubtitleListview1.Name = "SubtitleListview1";
|
||||
this.SubtitleListview1.OwnerDraw = true;
|
||||
this.SubtitleListview1.Size = new System.Drawing.Size(724, 89);
|
||||
this.SubtitleListview1.SubtitleFontBold = false;
|
||||
this.SubtitleListview1.SubtitleFontName = "Tahoma";
|
||||
this.SubtitleListview1.SubtitleFontSize = 8;
|
||||
this.SubtitleListview1.TabIndex = 0;
|
||||
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
||||
this.SubtitleListview1.UseSyntaxColoring = true;
|
||||
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
||||
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
|
||||
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
|
||||
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
|
||||
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
|
||||
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
|
||||
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
|
||||
//
|
||||
// textBoxListViewTextAlternate
|
||||
//
|
||||
this.textBoxListViewTextAlternate.AllowDrop = true;
|
||||
this.textBoxListViewTextAlternate.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxListViewTextAlternate.ContextMenuStrip = this.contextMenuStripTextBoxListView;
|
||||
this.textBoxListViewTextAlternate.Enabled = false;
|
||||
this.textBoxListViewTextAlternate.HideSelection = false;
|
||||
this.textBoxListViewTextAlternate.Location = new System.Drawing.Point(946, 28);
|
||||
this.textBoxListViewTextAlternate.Multiline = true;
|
||||
this.textBoxListViewTextAlternate.Name = "textBoxListViewTextAlternate";
|
||||
this.textBoxListViewTextAlternate.Size = new System.Drawing.Size(0, 60);
|
||||
this.textBoxListViewTextAlternate.TabIndex = 33;
|
||||
this.textBoxListViewTextAlternate.Visible = false;
|
||||
this.textBoxListViewTextAlternate.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseClick);
|
||||
this.textBoxListViewTextAlternate.TextChanged += new System.EventHandler(this.textBoxListViewTextAlternate_TextChanged);
|
||||
this.textBoxListViewTextAlternate.Enter += new System.EventHandler(this.TextBoxListViewTextAlternateEnter);
|
||||
this.textBoxListViewTextAlternate.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyDown);
|
||||
this.textBoxListViewTextAlternate.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyUp);
|
||||
this.textBoxListViewTextAlternate.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseMove);
|
||||
//
|
||||
// timeUpDownStartTime
|
||||
//
|
||||
this.timeUpDownStartTime.AutoSize = true;
|
||||
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 26);
|
||||
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
||||
this.timeUpDownStartTime.Size = new System.Drawing.Size(96, 25);
|
||||
this.timeUpDownStartTime.TabIndex = 0;
|
||||
//
|
||||
// textBoxListViewText
|
||||
//
|
||||
this.textBoxListViewText.AllowDrop = true;
|
||||
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
|
||||
this.textBoxListViewText.Enabled = false;
|
||||
this.textBoxListViewText.HideSelection = false;
|
||||
this.textBoxListViewText.Location = new System.Drawing.Point(236, 28);
|
||||
this.textBoxListViewText.Multiline = true;
|
||||
this.textBoxListViewText.Name = "textBoxListViewText";
|
||||
this.textBoxListViewText.Size = new System.Drawing.Size(362, 60);
|
||||
this.textBoxListViewText.TabIndex = 5;
|
||||
this.textBoxListViewText.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextMouseClick);
|
||||
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
|
||||
this.textBoxListViewText.Enter += new System.EventHandler(this.TextBoxListViewTextEnter);
|
||||
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
|
||||
this.textBoxListViewText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyUp);
|
||||
this.textBoxListViewText.Leave += new System.EventHandler(this.textBoxListViewText_Leave);
|
||||
this.textBoxListViewText.MouseMove += new System.Windows.Forms.MouseEventHandler(this.textBoxListViewText_MouseMove);
|
||||
//
|
||||
// mediaPlayer
|
||||
//
|
||||
this.mediaPlayer.AllowDrop = true;
|
||||
this.mediaPlayer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||
this.mediaPlayer.CurrentPosition = 0D;
|
||||
this.mediaPlayer.FontSizeFactor = 1F;
|
||||
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
|
||||
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.mediaPlayer.Name = "mediaPlayer";
|
||||
this.mediaPlayer.ShowFullscreenButton = true;
|
||||
this.mediaPlayer.ShowMuteButton = true;
|
||||
this.mediaPlayer.ShowStopButton = true;
|
||||
this.mediaPlayer.Size = new System.Drawing.Size(219, 241);
|
||||
this.mediaPlayer.SubtitleText = "";
|
||||
this.mediaPlayer.TabIndex = 5;
|
||||
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.mediaPlayer.VideoHeight = 0;
|
||||
this.mediaPlayer.VideoPlayer = null;
|
||||
this.mediaPlayer.VideoWidth = 0;
|
||||
this.mediaPlayer.Volume = 0D;
|
||||
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
|
||||
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
|
||||
//
|
||||
// audioVisualizer
|
||||
//
|
||||
this.audioVisualizer.AllowDrop = true;
|
||||
this.audioVisualizer.AllowNewSelection = true;
|
||||
this.audioVisualizer.AllowOverlap = false;
|
||||
this.audioVisualizer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.audioVisualizer.BackColor = System.Drawing.Color.Black;
|
||||
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
|
||||
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
|
||||
this.audioVisualizer.DrawGridLines = true;
|
||||
this.audioVisualizer.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
|
||||
this.audioVisualizer.Location = new System.Drawing.Point(472, 32);
|
||||
this.audioVisualizer.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.audioVisualizer.Name = "audioVisualizer";
|
||||
this.audioVisualizer.NewSelectionParagraph = null;
|
||||
this.audioVisualizer.SceneChanges = ((System.Collections.Generic.List<double>)(resources.GetObject("audioVisualizer.SceneChanges")));
|
||||
this.audioVisualizer.SelectedColor = System.Drawing.Color.Red;
|
||||
this.audioVisualizer.ShowSpectrogram = false;
|
||||
this.audioVisualizer.ShowWaveform = true;
|
||||
this.audioVisualizer.Size = new System.Drawing.Size(499, 229);
|
||||
this.audioVisualizer.StartPositionSeconds = 0D;
|
||||
this.audioVisualizer.TabIndex = 6;
|
||||
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
|
||||
this.audioVisualizer.VerticalZoomPercent = 1D;
|
||||
this.audioVisualizer.WaveFormNotLoadedText = "Click to add wave form";
|
||||
this.audioVisualizer.WavePeaks = null;
|
||||
this.audioVisualizer.ZoomFactor = 1D;
|
||||
this.audioVisualizer.Click += new System.EventHandler(this.AudioWaveForm_Click);
|
||||
this.audioVisualizer.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveFormDragDrop);
|
||||
this.audioVisualizer.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveFormDragEnter);
|
||||
this.audioVisualizer.MouseEnter += new System.EventHandler(this.audioVisualizer_MouseEnter);
|
||||
//
|
||||
// timeUpDownVideoPosition
|
||||
//
|
||||
this.timeUpDownVideoPosition.AutoSize = true;
|
||||
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(96, 191);
|
||||
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
|
||||
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(96, 25);
|
||||
this.timeUpDownVideoPosition.TabIndex = 12;
|
||||
//
|
||||
// timeUpDownVideoPositionAdjust
|
||||
//
|
||||
this.timeUpDownVideoPositionAdjust.AutoSize = true;
|
||||
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(96, 213);
|
||||
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
|
||||
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(96, 25);
|
||||
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
|
||||
this.toolStripMenuItemEbuProperties.Name = "toolStripMenuItemEbuProperties";
|
||||
this.toolStripMenuItemEbuProperties.Size = new System.Drawing.Size(337, 22);
|
||||
this.toolStripMenuItemEbuProperties.Text = "Ebu properties...";
|
||||
this.toolStripMenuItemEbuProperties.Click += new System.EventHandler(this.toolStripMenuItemEbuProperties_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
@ -4924,6 +4935,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem checkForUpdatesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItemSplitterCheckForUpdates;
|
||||
private System.Windows.Forms.ToolStripMenuItem setVideoOffsetToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEbuProperties;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -600,7 +600,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Console.WriteLine(" " + new Captionate().FriendlyName);
|
||||
Console.WriteLine(" " + new Cavena890().FriendlyName);
|
||||
Console.WriteLine(" " + new CheetahCaption().FriendlyName);
|
||||
Console.WriteLine(" " + new Ebu().FriendlyName);
|
||||
// Console.WriteLine(" " + new Ebu().FriendlyName);
|
||||
Console.WriteLine(" Matroska (.mkv)");
|
||||
Console.WriteLine(" Matroska subtitle (.mks)");
|
||||
Console.WriteLine(" " + new NciCaption().FriendlyName);
|
||||
@ -805,7 +805,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
format = sub.LoadSubtitle(fileName, out encoding, null, true);
|
||||
|
||||
if (format == null)
|
||||
if (format == null || format.GetType() == typeof(Ebu))
|
||||
{
|
||||
var ebu = new Ebu();
|
||||
if (ebu.IsMine(null, fileName))
|
||||
@ -2322,6 +2322,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (!change)
|
||||
_changeSubtitleToString = SerializeSubtitle(_subtitle);
|
||||
|
||||
ShowHideTextBasedFeatures(format);
|
||||
|
||||
bool justConverted = false;
|
||||
if (format == null)
|
||||
{
|
||||
@ -3036,6 +3038,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowHideTextBasedFeatures(SubtitleFormat format)
|
||||
{
|
||||
if (format != null && !format.IsTextBased)
|
||||
{
|
||||
textBoxSource.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBoxSource.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private bool IsTransportStream(string fileName)
|
||||
{
|
||||
try
|
||||
@ -3439,6 +3453,16 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
try
|
||||
{
|
||||
if (format != null && !format.IsTextBased)
|
||||
{
|
||||
if (format.GetType() == typeof(Ebu))
|
||||
{
|
||||
var ebu = new Ebu();
|
||||
ebu.Save(_fileName, _subtitle);
|
||||
}
|
||||
return DialogResult.OK;
|
||||
}
|
||||
|
||||
string allText = _subtitle.ToText(format);
|
||||
|
||||
// Seungki begin
|
||||
@ -3730,9 +3754,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
SubtitleListview1.DisplayExtraFromExtra = true;
|
||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||
|
||||
}
|
||||
}
|
||||
ShowHideTextBasedFeatures(format);
|
||||
}
|
||||
|
||||
private List<string> GetNuendoStyles()
|
||||
@ -4028,6 +4052,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_lastDoNotPrompt = string.Empty;
|
||||
ReloadFromSourceView();
|
||||
FileNew();
|
||||
ShowHideTextBasedFeatures(GetCurrentSubtitleFormat());
|
||||
}
|
||||
|
||||
private void ToolStripButtonFileOpenClick(object sender, EventArgs e)
|
||||
@ -14116,6 +14141,16 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
toolStripMenuItemSubStationAlpha.Visible = false;
|
||||
}
|
||||
|
||||
if (format.GetType() == typeof(Ebu))
|
||||
{
|
||||
toolStripMenuItemEbuProperties.Text = Configuration.Settings.Language.Main.Menu.File.EbuProperties;
|
||||
toolStripMenuItemEbuProperties.Visible = true;
|
||||
}
|
||||
else if (format.GetType() == typeof(SubStationAlpha))
|
||||
{
|
||||
toolStripMenuItemEbuProperties.Visible = false;
|
||||
}
|
||||
|
||||
if (format.GetType() == typeof(DCSubtitle) || format.GetType() == typeof(DCinemaSmpte2010) || format.GetType() == typeof(DCinemaSmpte2007))
|
||||
{
|
||||
toolStripMenuItemDCinemaProperties.Visible = true;
|
||||
@ -17363,6 +17398,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (tabControlSubtitle.SelectedIndex != TabControlSourceView && textBoxSource.Text.Trim().Length > 1)
|
||||
{
|
||||
var currentFormat = GetCurrentSubtitleFormat();
|
||||
if (currentFormat != null && !currentFormat.IsTextBased)
|
||||
return;
|
||||
|
||||
var temp = new Subtitle(_subtitle);
|
||||
SubtitleFormat format = temp.ReloadLoadSubtitle(new List<string>(textBoxSource.Lines), null);
|
||||
if (format == null)
|
||||
@ -18667,21 +18706,24 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (saveFileDialog1.FilterIndex == index + 1)
|
||||
{
|
||||
// only allow current extension or ".txt"
|
||||
string fileName = saveFileDialog1.FileName;
|
||||
string ext = Path.GetExtension(fileName).ToLower();
|
||||
bool extOk = ext == format.Extension.ToLower() || format.AlternateExtensions.Contains(ext) || ext == ".txt";
|
||||
if (!extOk)
|
||||
if (format.IsTextBased)
|
||||
{
|
||||
if (fileName.EndsWith("."))
|
||||
fileName = fileName.Substring(0, _fileName.Length - 1);
|
||||
fileName += format.Extension;
|
||||
}
|
||||
// only allow current extension or ".txt"
|
||||
string fileName = saveFileDialog1.FileName;
|
||||
string ext = Path.GetExtension(fileName).ToLower();
|
||||
bool extOk = ext == format.Extension.ToLower() || format.AlternateExtensions.Contains(ext) || ext == ".txt";
|
||||
if (!extOk)
|
||||
{
|
||||
if (fileName.EndsWith("."))
|
||||
fileName = fileName.Substring(0, _fileName.Length - 1);
|
||||
fileName += format.Extension;
|
||||
}
|
||||
|
||||
string allText = newSub.ToText(format);
|
||||
File.WriteAllText(fileName, allText, GetCurrentEncoding());
|
||||
ShowStatus(string.Format(_language.XLinesSavedAsY, newSub.Paragraphs.Count, fileName));
|
||||
return;
|
||||
string allText = newSub.ToText(format);
|
||||
File.WriteAllText(fileName, allText, GetCurrentEncoding());
|
||||
ShowStatus(string.Format(_language.XLinesSavedAsY, newSub.Paragraphs.Count, fileName));
|
||||
return;
|
||||
}
|
||||
}
|
||||
index++;
|
||||
}
|
||||
@ -19615,5 +19657,27 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_formPositionsAndSizes.SavePositionAndSize(form);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemEbuProperties_Click(object sender, EventArgs e)
|
||||
{
|
||||
var properties = new EbuSaveOptions();
|
||||
|
||||
var header = new Nikse.SubtitleEdit.Logic.SubtitleFormats.Ebu.EbuGeneralSubtitleInformation();
|
||||
if (_subtitle != null && _subtitle.Header != null && (_subtitle.Header.Contains("STL2") || _subtitle.Header.Contains("STL3")))
|
||||
{
|
||||
header = Ebu.ReadHeader(Encoding.UTF8.GetBytes(_subtitle.Header));
|
||||
properties.Initialize(header, 0, null, _subtitle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_fileName) && new Ebu().IsMine(null, _fileName))
|
||||
properties.Initialize(header, 0, _fileName, _subtitle);
|
||||
else
|
||||
properties.Initialize(header, 0, null, _subtitle);
|
||||
}
|
||||
_formPositionsAndSizes.SetPositionAndSize(properties, true);
|
||||
properties.ShowDialog(this);
|
||||
_formPositionsAndSizes.SavePositionAndSize(properties);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -616,6 +616,9 @@
|
||||
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>208, 56</value>
|
||||
</metadata>
|
||||
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>208, 56</value>
|
||||
</metadata>
|
||||
<data name="toolStripButtonWaveFormZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
@ -722,7 +725,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAVABIQFQASEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAWgBIQFoASEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
@ -770,7 +773,7 @@
|
||||
<value>150, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>160</value>
|
||||
<value>81</value>
|
||||
</metadata>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
@ -690,6 +690,8 @@ E-mail: mailto:nikse.dk@gmail.com</AboutText1>
|
||||
<RestoreAutoBackup>Gendan fra auto-backup...</RestoreAutoBackup>
|
||||
<AdvancedSubStationAlphaProperties>Advanced Sub Station Alpha egenskaber...</AdvancedSubStationAlphaProperties>
|
||||
<SubStationAlphaProperties>Sub Station Alpha egenskaber...</SubStationAlphaProperties>
|
||||
<EbuProperties>EBU egenskaber...</EbuProperties>
|
||||
<PacProperties>PAC egenskaber...</PacProperties>
|
||||
<OpenOriginal>Åbn original undertekst (oversætter mode)...</OpenOriginal>
|
||||
<SaveOriginal>Gem original</SaveOriginal>
|
||||
<CloseOriginal>Luk original</CloseOriginal>
|
||||
@ -1066,6 +1068,7 @@ Fortsæt?</SubtitleAppendPrompt>
|
||||
<NothingToUndo>Intet at fortryde</NothingToUndo>
|
||||
<InvalidLanguageNameX>Ugyldigt sprog navn: {0}</InvalidLanguageNameX>
|
||||
<UnableToChangeLanguage>Kunne ikke skifte sprog!</UnableToChangeLanguage>
|
||||
<DoNotDisplayMessageAgain>Vis ikke denne meddelelse igen</DoNotDisplayMessageAgain>
|
||||
<NumberOfCorrectedWords>Antal rettede ord: {0}</NumberOfCorrectedWords>
|
||||
<NumberOfSkippedWords>Antal oversprungne ord: {0}</NumberOfSkippedWords>
|
||||
<NumberOfCorrectWords>Antal korrekte ord: {0}</NumberOfCorrectWords>
|
||||
@ -1653,6 +1656,11 @@ Fortsæt?</SubtitleAppendPrompt>
|
||||
<Miscellaneous>Diverse</Miscellaneous>
|
||||
<UseDoNotBreakAfterList>Benyt skift-ikke-efter-liste (for auto-ombrydning)</UseDoNotBreakAfterList>
|
||||
</Settings>
|
||||
<SetVideoOffset>
|
||||
<Title>Indstil video offset</Title>
|
||||
<Description>Indstil video offset (undertekster bør ikke følge real video tid, men fx +10 timer)</Description>
|
||||
<RelativeToCurrentVideoPosition>I forhold til aktuelle video position</RelativeToCurrentVideoPosition>
|
||||
</SetVideoOffset>
|
||||
<ShowEarlierLater>
|
||||
<Title>Vis valgte linjer tidligere/senere</Title>
|
||||
<TitleAll>Vis alle linjer tidligere/senere</TitleAll>
|
||||
@ -1772,6 +1780,9 @@ Fortsæt?</SubtitleAppendPrompt>
|
||||
<DurationMinimum>Varihed - minimum: {0:0.000} sekunder</DurationMinimum>
|
||||
<DurationMaximum>Varihed - maximum: {0:0.000} sekunder</DurationMaximum>
|
||||
<DurationAvarage>Varihed - average: {0:0.000} sekunder</DurationAvarage>
|
||||
<CharactersPerSecondMinimum>Karakterer/sek - min: {0:0.000}</CharactersPerSecondMinimum>
|
||||
<CharactersPerSecondMaximum>Karakterer/sek - maks: {0:0.000}</CharactersPerSecondMaximum>
|
||||
<CharactersPerSecondAverage>Karakterer/sek - gennemsnit: {0:0.000}</CharactersPerSecondAverage>
|
||||
</Statistics>
|
||||
<SubStationAlphaProperties>
|
||||
<Title>Advanced Sub Station Alpha egenskaber</Title>
|
||||
@ -1929,6 +1940,7 @@ Fortsæt?</SubtitleAppendPrompt>
|
||||
<OcrAutoCorrectionSpellchecking>OCR automatisk korrektion / stavekontrol</OcrAutoCorrectionSpellchecking>
|
||||
<FixOcrErrors>Ret OCR-fejl</FixOcrErrors>
|
||||
<ImportTextWithMatchingTimeCodes>Importer tekst med matchende tidskoder...</ImportTextWithMatchingTimeCodes>
|
||||
<ImportNewTimeCodes>Importer nye tidskoder</ImportNewTimeCodes>
|
||||
<SaveSubtitleImageAs>Gem undertekst billede som...</SaveSubtitleImageAs>
|
||||
<SaveAllSubtitleImagesAsBdnXml>Gem alle billeder (png/BDN xml)...</SaveAllSubtitleImagesAsBdnXml>
|
||||
<SaveAllSubtitleImagesWithHtml>Gem alle billeder med html-indeks...</SaveAllSubtitleImagesWithHtml>
|
||||
|
@ -1152,6 +1152,8 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
RestoreAutoBackup = "Restore auto-backup...",
|
||||
AdvancedSubStationAlphaProperties = "Advanced Sub Station Alpha properties...",
|
||||
SubStationAlphaProperties = "Sub Station Alpha properties...",
|
||||
EbuProperties = "EBU stl properties...",
|
||||
PacProperties = "PAC properties...",
|
||||
OpenOriginal = "Open original subtitle (translator mode)...",
|
||||
SaveOriginal = "Save original subtitle",
|
||||
CloseOriginal = "Close original subtitle",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1028,6 +1028,8 @@
|
||||
public string RestoreAutoBackup { get; set; }
|
||||
public string AdvancedSubStationAlphaProperties { get; set; }
|
||||
public string SubStationAlphaProperties { get; set; }
|
||||
public string EbuProperties { get; set; }
|
||||
public string PacProperties { get; set; }
|
||||
public string OpenOriginal { get; set; }
|
||||
public string SaveOriginal { get; set; }
|
||||
public string CloseOriginal { get; set; }
|
||||
|
@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using Nikse.SubtitleEdit.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
using Nikse.SubtitleEdit.Forms;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
{
|
||||
@ -637,7 +637,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
Header = header;
|
||||
}
|
||||
|
||||
private EbuGeneralSubtitleInformation ReadHeader(byte[] buffer)
|
||||
public static EbuGeneralSubtitleInformation ReadHeader(byte[] buffer)
|
||||
{
|
||||
var header = new EbuGeneralSubtitleInformation();
|
||||
header.CodePageNumber = Encoding.Default.GetString(buffer, 0, 3);
|
||||
@ -1104,5 +1104,13 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
return list;
|
||||
}
|
||||
|
||||
public override bool IsTextBased
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -52,6 +52,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
new DvdStudioProSpace(),
|
||||
new DvdSubtitle(),
|
||||
new DvdSubtitleSystem(),
|
||||
new Ebu(),
|
||||
new Eeg708(),
|
||||
new F4Text(),
|
||||
new F4Rtf(),
|
||||
@ -391,5 +392,13 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
return ToUtf8XmlString(xml, false);
|
||||
}
|
||||
|
||||
public virtual bool IsTextBased
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ Dialogue: Marked=0,0:00:01.00,0:00:03.00,Default,NTP,0000,0000,0000,!Effect," +
|
||||
int expected = subtitle.Paragraphs.Count;
|
||||
foreach (SubtitleFormat format in SubtitleFormat.AllSubtitleFormats)
|
||||
{
|
||||
if (format.GetType() != typeof(JsonType6))
|
||||
if (format.GetType() != typeof(JsonType6) && format.IsTextBased)
|
||||
{
|
||||
format.BatchMode = true;
|
||||
string text = format.ToText(subtitle, "test");
|
||||
@ -694,18 +694,21 @@ Dialogue: Marked=0,0:00:01.00,0:00:03.00,Default,NTP,0000,0000,0000,!Effect," +
|
||||
|
||||
foreach (SubtitleFormat format in SubtitleFormat.AllSubtitleFormats)
|
||||
{
|
||||
format.BatchMode = true;
|
||||
string text = format.ToText(subtitle, "test");
|
||||
var list = new List<string>();
|
||||
foreach (string line in text.Replace("\r\n", "\n").Split('\n'))
|
||||
list.Add(line);
|
||||
var s2 = new Subtitle();
|
||||
format.LoadSubtitle(s2, list, null);
|
||||
|
||||
if (s2.Paragraphs.Count == 4)
|
||||
if (format.IsTextBased)
|
||||
{
|
||||
Assert.AreEqual(subtitle.Paragraphs[0].Text, s2.Paragraphs[0].Text, format.FriendlyName);
|
||||
Assert.AreEqual(subtitle.Paragraphs[3].Text, s2.Paragraphs[3].Text, format.FriendlyName);
|
||||
format.BatchMode = true;
|
||||
string text = format.ToText(subtitle, "test");
|
||||
var list = new List<string>();
|
||||
foreach (string line in text.Replace("\r\n", "\n").Split('\n'))
|
||||
list.Add(line);
|
||||
var s2 = new Subtitle();
|
||||
format.LoadSubtitle(s2, list, null);
|
||||
|
||||
if (s2.Paragraphs.Count == 4)
|
||||
{
|
||||
Assert.AreEqual(subtitle.Paragraphs[0].Text, s2.Paragraphs[0].Text, format.FriendlyName);
|
||||
Assert.AreEqual(subtitle.Paragraphs[3].Text, s2.Paragraphs[3].Text, format.FriendlyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user