mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
Added undocking of video controls
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@203 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
101221d700
commit
1cf68f9dc0
68
src/Forms/Main.Designer.cs
generated
68
src/Forms/Main.Designer.cs
generated
@ -122,6 +122,9 @@
|
|||||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.showhideWaveFormToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.showhideWaveFormToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.showhideVideoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.showhideVideoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator19 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.undockVideoControlsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.redockVideoControlsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemSpellCheckMain = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemSpellCheckMain = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.spellCheckToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.spellCheckToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.findDoubleWordsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.findDoubleWordsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@ -1132,7 +1135,10 @@
|
|||||||
this.openVideoToolStripMenuItem,
|
this.openVideoToolStripMenuItem,
|
||||||
this.toolStripSeparator5,
|
this.toolStripSeparator5,
|
||||||
this.showhideWaveFormToolStripMenuItem,
|
this.showhideWaveFormToolStripMenuItem,
|
||||||
this.showhideVideoToolStripMenuItem});
|
this.showhideVideoToolStripMenuItem,
|
||||||
|
this.toolStripSeparator19,
|
||||||
|
this.undockVideoControlsToolStripMenuItem,
|
||||||
|
this.redockVideoControlsToolStripMenuItem});
|
||||||
this.toolStripMenuItemVideo.Name = "toolStripMenuItemVideo";
|
this.toolStripMenuItemVideo.Name = "toolStripMenuItemVideo";
|
||||||
this.toolStripMenuItemVideo.Size = new System.Drawing.Size(50, 20);
|
this.toolStripMenuItemVideo.Size = new System.Drawing.Size(50, 20);
|
||||||
this.toolStripMenuItemVideo.Text = "Video";
|
this.toolStripMenuItemVideo.Text = "Video";
|
||||||
@ -1140,29 +1146,49 @@
|
|||||||
// openVideoToolStripMenuItem
|
// openVideoToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.openVideoToolStripMenuItem.Name = "openVideoToolStripMenuItem";
|
this.openVideoToolStripMenuItem.Name = "openVideoToolStripMenuItem";
|
||||||
this.openVideoToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.openVideoToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||||
this.openVideoToolStripMenuItem.Text = "Open video...";
|
this.openVideoToolStripMenuItem.Text = "Open video...";
|
||||||
this.openVideoToolStripMenuItem.Click += new System.EventHandler(this.buttonOpenVideo_Click);
|
this.openVideoToolStripMenuItem.Click += new System.EventHandler(this.buttonOpenVideo_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator5
|
// toolStripSeparator5
|
||||||
//
|
//
|
||||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||||
this.toolStripSeparator5.Size = new System.Drawing.Size(192, 6);
|
this.toolStripSeparator5.Size = new System.Drawing.Size(196, 6);
|
||||||
//
|
//
|
||||||
// showhideWaveFormToolStripMenuItem
|
// showhideWaveFormToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.showhideWaveFormToolStripMenuItem.Name = "showhideWaveFormToolStripMenuItem";
|
this.showhideWaveFormToolStripMenuItem.Name = "showhideWaveFormToolStripMenuItem";
|
||||||
this.showhideWaveFormToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.showhideWaveFormToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||||
this.showhideWaveFormToolStripMenuItem.Text = "Show/hide wave form";
|
this.showhideWaveFormToolStripMenuItem.Text = "Show/hide wave form";
|
||||||
this.showhideWaveFormToolStripMenuItem.Click += new System.EventHandler(this.showhideWaveFormToolStripMenuItem_Click);
|
this.showhideWaveFormToolStripMenuItem.Click += new System.EventHandler(this.showhideWaveFormToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// showhideVideoToolStripMenuItem
|
// showhideVideoToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.showhideVideoToolStripMenuItem.Name = "showhideVideoToolStripMenuItem";
|
this.showhideVideoToolStripMenuItem.Name = "showhideVideoToolStripMenuItem";
|
||||||
this.showhideVideoToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
this.showhideVideoToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||||
this.showhideVideoToolStripMenuItem.Text = "Show/hide video";
|
this.showhideVideoToolStripMenuItem.Text = "Show/hide video";
|
||||||
this.showhideVideoToolStripMenuItem.Click += new System.EventHandler(this.toolStripButtonToogleVideo_Click);
|
this.showhideVideoToolStripMenuItem.Click += new System.EventHandler(this.toolStripButtonToogleVideo_Click);
|
||||||
//
|
//
|
||||||
|
// toolStripSeparator19
|
||||||
|
//
|
||||||
|
this.toolStripSeparator19.Name = "toolStripSeparator19";
|
||||||
|
this.toolStripSeparator19.Size = new System.Drawing.Size(196, 6);
|
||||||
|
//
|
||||||
|
// undockVideoControlsToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.undockVideoControlsToolStripMenuItem.Name = "undockVideoControlsToolStripMenuItem";
|
||||||
|
this.undockVideoControlsToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||||
|
this.undockVideoControlsToolStripMenuItem.Text = "Un-dock video controls";
|
||||||
|
this.undockVideoControlsToolStripMenuItem.Click += new System.EventHandler(this.undockVideoControlsToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// redockVideoControlsToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.redockVideoControlsToolStripMenuItem.Name = "redockVideoControlsToolStripMenuItem";
|
||||||
|
this.redockVideoControlsToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
|
||||||
|
this.redockVideoControlsToolStripMenuItem.Text = "Re-dock video controls";
|
||||||
|
this.redockVideoControlsToolStripMenuItem.Visible = false;
|
||||||
|
this.redockVideoControlsToolStripMenuItem.Click += new System.EventHandler(this.redockVideoControlsToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// toolStripMenuItemSpellCheckMain
|
// toolStripMenuItemSpellCheckMain
|
||||||
//
|
//
|
||||||
this.toolStripMenuItemSpellCheckMain.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.toolStripMenuItemSpellCheckMain.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
@ -2040,19 +2066,17 @@
|
|||||||
//
|
//
|
||||||
// groupBoxVideo
|
// groupBoxVideo
|
||||||
//
|
//
|
||||||
this.groupBoxVideo.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.groupBoxVideo.Controls.Add(this.checkBoxSyncListViewWithVideoWhilePlaying);
|
this.groupBoxVideo.Controls.Add(this.checkBoxSyncListViewWithVideoWhilePlaying);
|
||||||
this.groupBoxVideo.Controls.Add(this.labelVideoInfo);
|
this.groupBoxVideo.Controls.Add(this.labelVideoInfo);
|
||||||
this.groupBoxVideo.Controls.Add(this.trackBarWaveFormPosition);
|
this.groupBoxVideo.Controls.Add(this.trackBarWaveFormPosition);
|
||||||
this.groupBoxVideo.Controls.Add(this.panelWaveFormControls);
|
this.groupBoxVideo.Controls.Add(this.panelWaveFormControls);
|
||||||
this.groupBoxVideo.Controls.Add(this.AudioWaveForm);
|
this.groupBoxVideo.Controls.Add(this.AudioWaveForm);
|
||||||
this.groupBoxVideo.Controls.Add(this.tabControlButtons);
|
this.groupBoxVideo.Controls.Add(this.tabControlButtons);
|
||||||
|
this.groupBoxVideo.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.groupBoxVideo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.groupBoxVideo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.groupBoxVideo.Location = new System.Drawing.Point(3, 3);
|
this.groupBoxVideo.Location = new System.Drawing.Point(0, 0);
|
||||||
this.groupBoxVideo.Name = "groupBoxVideo";
|
this.groupBoxVideo.Name = "groupBoxVideo";
|
||||||
this.groupBoxVideo.Size = new System.Drawing.Size(1238, 299);
|
this.groupBoxVideo.Size = new System.Drawing.Size(1244, 305);
|
||||||
this.groupBoxVideo.TabIndex = 1;
|
this.groupBoxVideo.TabIndex = 1;
|
||||||
this.groupBoxVideo.TabStop = false;
|
this.groupBoxVideo.TabStop = false;
|
||||||
//
|
//
|
||||||
@ -2069,7 +2093,7 @@
|
|||||||
// labelVideoInfo
|
// labelVideoInfo
|
||||||
//
|
//
|
||||||
this.labelVideoInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.labelVideoInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.labelVideoInfo.Location = new System.Drawing.Point(863, 12);
|
this.labelVideoInfo.Location = new System.Drawing.Point(869, 12);
|
||||||
this.labelVideoInfo.Name = "labelVideoInfo";
|
this.labelVideoInfo.Name = "labelVideoInfo";
|
||||||
this.labelVideoInfo.Size = new System.Drawing.Size(369, 13);
|
this.labelVideoInfo.Size = new System.Drawing.Size(369, 13);
|
||||||
this.labelVideoInfo.TabIndex = 12;
|
this.labelVideoInfo.TabIndex = 12;
|
||||||
@ -2081,10 +2105,10 @@
|
|||||||
this.trackBarWaveFormPosition.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
this.trackBarWaveFormPosition.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.trackBarWaveFormPosition.AutoSize = false;
|
this.trackBarWaveFormPosition.AutoSize = false;
|
||||||
this.trackBarWaveFormPosition.Location = new System.Drawing.Point(645, 258);
|
this.trackBarWaveFormPosition.Location = new System.Drawing.Point(645, 264);
|
||||||
this.trackBarWaveFormPosition.Maximum = 1000;
|
this.trackBarWaveFormPosition.Maximum = 1000;
|
||||||
this.trackBarWaveFormPosition.Name = "trackBarWaveFormPosition";
|
this.trackBarWaveFormPosition.Name = "trackBarWaveFormPosition";
|
||||||
this.trackBarWaveFormPosition.Size = new System.Drawing.Size(586, 20);
|
this.trackBarWaveFormPosition.Size = new System.Drawing.Size(592, 20);
|
||||||
this.trackBarWaveFormPosition.TabIndex = 11;
|
this.trackBarWaveFormPosition.TabIndex = 11;
|
||||||
this.trackBarWaveFormPosition.TickStyle = System.Windows.Forms.TickStyle.None;
|
this.trackBarWaveFormPosition.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||||
this.trackBarWaveFormPosition.ValueChanged += new System.EventHandler(this.trackBarWaveFormPosition_ValueChanged);
|
this.trackBarWaveFormPosition.ValueChanged += new System.EventHandler(this.trackBarWaveFormPosition_ValueChanged);
|
||||||
@ -2093,7 +2117,7 @@
|
|||||||
//
|
//
|
||||||
this.panelWaveFormControls.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.panelWaveFormControls.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.panelWaveFormControls.Controls.Add(this.toolStrip2);
|
this.panelWaveFormControls.Controls.Add(this.toolStrip2);
|
||||||
this.panelWaveFormControls.Location = new System.Drawing.Point(478, 263);
|
this.panelWaveFormControls.Location = new System.Drawing.Point(478, 269);
|
||||||
this.panelWaveFormControls.Name = "panelWaveFormControls";
|
this.panelWaveFormControls.Name = "panelWaveFormControls";
|
||||||
this.panelWaveFormControls.Size = new System.Drawing.Size(161, 29);
|
this.panelWaveFormControls.Size = new System.Drawing.Size(161, 29);
|
||||||
this.panelWaveFormControls.TabIndex = 10;
|
this.panelWaveFormControls.TabIndex = 10;
|
||||||
@ -2184,11 +2208,11 @@
|
|||||||
this.AudioWaveForm.DrawGridLines = true;
|
this.AudioWaveForm.DrawGridLines = true;
|
||||||
this.AudioWaveForm.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
|
this.AudioWaveForm.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
|
||||||
this.AudioWaveForm.Location = new System.Drawing.Point(475, 30);
|
this.AudioWaveForm.Location = new System.Drawing.Point(475, 30);
|
||||||
this.AudioWaveForm.Margin = new System.Windows.Forms.Padding(4);
|
this.AudioWaveForm.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.AudioWaveForm.Name = "AudioWaveForm";
|
this.AudioWaveForm.Name = "AudioWaveForm";
|
||||||
this.AudioWaveForm.NewSelectionParagraph = null;
|
this.AudioWaveForm.NewSelectionParagraph = null;
|
||||||
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
|
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
|
||||||
this.AudioWaveForm.Size = new System.Drawing.Size(756, 222);
|
this.AudioWaveForm.Size = new System.Drawing.Size(762, 228);
|
||||||
this.AudioWaveForm.StartPositionSeconds = 0D;
|
this.AudioWaveForm.StartPositionSeconds = 0D;
|
||||||
this.AudioWaveForm.TabIndex = 6;
|
this.AudioWaveForm.TabIndex = 6;
|
||||||
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
|
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
|
||||||
@ -2941,9 +2965,9 @@
|
|||||||
this.labelSubtitle.BackColor = System.Drawing.Color.Black;
|
this.labelSubtitle.BackColor = System.Drawing.Color.Black;
|
||||||
this.labelSubtitle.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.labelSubtitle.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.labelSubtitle.ForeColor = System.Drawing.Color.White;
|
this.labelSubtitle.ForeColor = System.Drawing.Color.White;
|
||||||
this.labelSubtitle.Location = new System.Drawing.Point(0, 248);
|
this.labelSubtitle.Location = new System.Drawing.Point(0, 246);
|
||||||
this.labelSubtitle.Name = "labelSubtitle";
|
this.labelSubtitle.Name = "labelSubtitle";
|
||||||
this.labelSubtitle.Size = new System.Drawing.Size(280, 32);
|
this.labelSubtitle.Size = new System.Drawing.Size(281, 33);
|
||||||
this.labelSubtitle.TabIndex = 3;
|
this.labelSubtitle.TabIndex = 3;
|
||||||
this.labelSubtitle.Text = "labelSubtitle";
|
this.labelSubtitle.Text = "labelSubtitle";
|
||||||
this.labelSubtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
this.labelSubtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
@ -2955,10 +2979,11 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
this.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||||
this.mediaPlayer.CurrentPosition = 0D;
|
this.mediaPlayer.CurrentPosition = 0D;
|
||||||
this.mediaPlayer.Location = new System.Drawing.Point(0, 2);
|
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.mediaPlayer.Name = "mediaPlayer";
|
this.mediaPlayer.Name = "mediaPlayer";
|
||||||
this.mediaPlayer.ShowStopButton = true;
|
this.mediaPlayer.ShowStopButton = true;
|
||||||
this.mediaPlayer.Size = new System.Drawing.Size(280, 246);
|
this.mediaPlayer.Size = new System.Drawing.Size(281, 246);
|
||||||
this.mediaPlayer.TabIndex = 5;
|
this.mediaPlayer.TabIndex = 5;
|
||||||
this.mediaPlayer.VideoPlayer = null;
|
this.mediaPlayer.VideoPlayer = null;
|
||||||
this.mediaPlayer.Volume = 0D;
|
this.mediaPlayer.Volume = 0D;
|
||||||
@ -3440,6 +3465,9 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem chatToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem chatToolStripMenuItem;
|
||||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||||
private System.Windows.Forms.SplitContainer splitContainerMain;
|
private System.Windows.Forms.SplitContainer splitContainerMain;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem undockVideoControlsToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem redockVideoControlsToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator19;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,6 +78,11 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
ShowEarlierLater _showEarlierOrLater = null;
|
ShowEarlierLater _showEarlierOrLater = null;
|
||||||
|
|
||||||
|
bool _isVideoControlsUnDocked = false;
|
||||||
|
VideoPlayerUnDocked _videoPlayerUnDocked = null;
|
||||||
|
WaveFormUnDocked _waveFormUnDocked = null;
|
||||||
|
VideoControlsUndocked _videoControlsUnDocked = null;
|
||||||
|
|
||||||
private bool AutoRepeatContinueOn
|
private bool AutoRepeatContinueOn
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -4029,7 +4034,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
MakeHistoryForUndo(_language.BeforeImportFromMatroskaFile);
|
MakeHistoryForUndo(_language.BeforeImportFromMatroskaFile);
|
||||||
_subtitleListViewIndex = -1;
|
_subtitleListViewIndex = -1;
|
||||||
|
FileNew();
|
||||||
_subtitle.Paragraphs.Clear();
|
_subtitle.Paragraphs.Clear();
|
||||||
|
|
||||||
if (isSsa)
|
if (isSsa)
|
||||||
@ -4074,10 +4079,18 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
ShowStatus(_language.SubtitleImportedFromMatroskaFile);
|
ShowStatus(_language.SubtitleImportedFromMatroskaFile);
|
||||||
_subtitle.Renumber(1);
|
_subtitle.Renumber(1);
|
||||||
_subtitle.WasLoadedWithFrameNumbers = false;
|
_subtitle.WasLoadedWithFrameNumbers = false;
|
||||||
_fileName = string.Empty;
|
if (fileName.ToLower().EndsWith(".mkv"))
|
||||||
_fileDateTime = new DateTime();
|
{
|
||||||
|
_fileName = fileName.Substring(0, fileName.Length - 4);
|
||||||
|
Text = Title + " - " + _fileName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Text = Title;
|
Text = Title;
|
||||||
_converted = false;
|
}
|
||||||
|
_fileDateTime = new DateTime();
|
||||||
|
|
||||||
|
_converted = true;
|
||||||
|
|
||||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||||
if (_subtitle.Paragraphs.Count > 0)
|
if (_subtitle.Paragraphs.Count > 0)
|
||||||
@ -4521,7 +4534,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (vobSubOcr.ShowDialog(this) == DialogResult.OK)
|
if (vobSubOcr.ShowDialog(this) == DialogResult.OK)
|
||||||
{
|
{
|
||||||
MakeHistoryForUndo(_language.BeforeImportingVobSubFile);
|
MakeHistoryForUndo(_language.BeforeImportingVobSubFile);
|
||||||
|
FileNew();
|
||||||
_subtitle.Paragraphs.Clear();
|
_subtitle.Paragraphs.Clear();
|
||||||
SetCurrentFormat(new SubRip().FriendlyName);
|
SetCurrentFormat(new SubRip().FriendlyName);
|
||||||
_subtitle.WasLoadedWithFrameNumbers = false;
|
_subtitle.WasLoadedWithFrameNumbers = false;
|
||||||
@ -5284,7 +5297,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (formSubOcr.ShowDialog(this) == DialogResult.OK)
|
if (formSubOcr.ShowDialog(this) == DialogResult.OK)
|
||||||
{
|
{
|
||||||
MakeHistoryForUndo(_language.BeforeImportingDvdSubtitle);
|
MakeHistoryForUndo(_language.BeforeImportingDvdSubtitle);
|
||||||
|
FileNew();
|
||||||
_subtitle.Paragraphs.Clear();
|
_subtitle.Paragraphs.Clear();
|
||||||
SetCurrentFormat(new SubRip().FriendlyName);
|
SetCurrentFormat(new SubRip().FriendlyName);
|
||||||
_subtitle.WasLoadedWithFrameNumbers = false;
|
_subtitle.WasLoadedWithFrameNumbers = false;
|
||||||
@ -5773,6 +5786,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ShowVideoPlayer()
|
private void ShowVideoPlayer()
|
||||||
|
{
|
||||||
|
if (_isVideoControlsUnDocked)
|
||||||
|
{
|
||||||
|
ShowHideUnDockedVideoControls();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (toolStripButtonToogleVideo.Checked && toolStripButtonToogleWaveForm.Checked)
|
if (toolStripButtonToogleVideo.Checked && toolStripButtonToogleWaveForm.Checked)
|
||||||
{
|
{
|
||||||
@ -5807,9 +5826,47 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
panelWaveFormControls.Left = AudioWaveForm.Left;
|
panelWaveFormControls.Left = AudioWaveForm.Left;
|
||||||
trackBarWaveFormPosition.Left = panelWaveFormControls.Left + panelWaveFormControls.Width + 5;
|
trackBarWaveFormPosition.Left = panelWaveFormControls.Left + panelWaveFormControls.Width + 5;
|
||||||
trackBarWaveFormPosition.Width = AudioWaveForm.Left + AudioWaveForm.Width - trackBarWaveFormPosition.Left + 5;
|
trackBarWaveFormPosition.Width = AudioWaveForm.Left + AudioWaveForm.Width - trackBarWaveFormPosition.Left + 5;
|
||||||
|
}
|
||||||
|
|
||||||
if (mediaPlayer.VideoPlayer == null && !string.IsNullOrEmpty(_fileName))
|
if (mediaPlayer.VideoPlayer == null && !string.IsNullOrEmpty(_fileName))
|
||||||
TryToFindAndOpenVideoFile(Path.Combine(Path.GetDirectoryName(_fileName), Path.GetFileNameWithoutExtension(_fileName)));
|
TryToFindAndOpenVideoFile(Path.Combine(Path.GetDirectoryName(_fileName), Path.GetFileNameWithoutExtension(_fileName)));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowHideUnDockedVideoControls()
|
||||||
|
{
|
||||||
|
if (_videoPlayerUnDocked == null || _videoPlayerUnDocked.IsDisposed)
|
||||||
|
UnDockVideoPlayer();
|
||||||
|
_videoPlayerUnDocked.Visible = false;
|
||||||
|
if (toolStripButtonToogleVideo.Checked)
|
||||||
|
{
|
||||||
|
_videoPlayerUnDocked.Show(this);
|
||||||
|
if (_videoPlayerUnDocked.WindowState == FormWindowState.Minimized)
|
||||||
|
_videoPlayerUnDocked.WindowState = FormWindowState.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_waveFormUnDocked == null || _waveFormUnDocked.IsDisposed)
|
||||||
|
UnDockWaveForm();
|
||||||
|
_waveFormUnDocked.Visible = false;
|
||||||
|
if (toolStripButtonToogleWaveForm.Checked)
|
||||||
|
{
|
||||||
|
_waveFormUnDocked.Show(this);
|
||||||
|
if (_waveFormUnDocked.WindowState == FormWindowState.Minimized)
|
||||||
|
_waveFormUnDocked.WindowState = FormWindowState.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (toolStripButtonToogleVideo.Checked || toolStripButtonToogleWaveForm.Checked)
|
||||||
|
{
|
||||||
|
if (_videoControlsUnDocked == null || _videoControlsUnDocked.IsDisposed)
|
||||||
|
UnDockVideoButtons();
|
||||||
|
_videoControlsUnDocked.Visible = false;
|
||||||
|
_videoControlsUnDocked.Show(this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_videoControlsUnDocked != null && !_videoControlsUnDocked.IsDisposed)
|
||||||
|
_videoControlsUnDocked.Visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MoveVideoUp()
|
private void MoveVideoUp()
|
||||||
@ -5834,7 +5891,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
splitContainer1.Panel2.Controls.Clear();
|
splitContainer1.Panel2.Controls.Clear();
|
||||||
groupBoxVideo.Controls.Add(control);
|
groupBoxVideo.Controls.Add(control);
|
||||||
}
|
}
|
||||||
panelVideoPlayer.Top = 26;
|
panelVideoPlayer.Top = 27;
|
||||||
panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
|
panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
|
||||||
panelVideoPlayer.Height = groupBoxVideo.Height - (panelVideoPlayer.Top + 5);
|
panelVideoPlayer.Height = groupBoxVideo.Height - (panelVideoPlayer.Top + 5);
|
||||||
panelVideoPlayer.Width = groupBoxVideo.Width - (panelVideoPlayer.Left + 5);
|
panelVideoPlayer.Width = groupBoxVideo.Width - (panelVideoPlayer.Left + 5);
|
||||||
@ -6156,6 +6213,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
labelSubtitle.BringToFront();
|
labelSubtitle.BringToFront();
|
||||||
if (!toolStripButtonToogleVideo.Checked && !toolStripButtonToogleWaveForm.Checked)
|
if (!toolStripButtonToogleVideo.Checked && !toolStripButtonToogleWaveForm.Checked)
|
||||||
{
|
{
|
||||||
|
if (_isVideoControlsUnDocked)
|
||||||
|
ShowHideUnDockedVideoControls();
|
||||||
|
else
|
||||||
HideVideoPlayer();
|
HideVideoPlayer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -6174,6 +6234,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
panelWaveFormControls.Visible = toolStripButtonToogleWaveForm.Checked;
|
panelWaveFormControls.Visible = toolStripButtonToogleWaveForm.Checked;
|
||||||
if (!toolStripButtonToogleWaveForm.Checked && !toolStripButtonToogleVideo.Checked)
|
if (!toolStripButtonToogleWaveForm.Checked && !toolStripButtonToogleVideo.Checked)
|
||||||
{
|
{
|
||||||
|
if (_isVideoControlsUnDocked)
|
||||||
|
ShowHideUnDockedVideoControls();
|
||||||
|
else
|
||||||
HideVideoPlayer();
|
HideVideoPlayer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -6462,6 +6525,8 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Configuration.Settings.VideoControls.LastActiveTab = "Adjust";
|
Configuration.Settings.VideoControls.LastActiveTab = "Adjust";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_isVideoControlsUnDocked)
|
||||||
|
{
|
||||||
if (toolStripButtonToogleWaveForm.Checked)
|
if (toolStripButtonToogleWaveForm.Checked)
|
||||||
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
|
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
|
||||||
AudioWaveForm.Width = groupBoxVideo.Width - (AudioWaveForm.Left + 10);
|
AudioWaveForm.Width = groupBoxVideo.Width - (AudioWaveForm.Left + 10);
|
||||||
@ -6472,6 +6537,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
checkBoxSyncListViewWithVideoWhilePlaying.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
|
checkBoxSyncListViewWithVideoWhilePlaying.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
else if (_videoControlsUnDocked != null && !_videoControlsUnDocked.IsDisposed)
|
||||||
|
{
|
||||||
|
_videoControlsUnDocked.Width = tabControlButtons.Width + 20;
|
||||||
|
_videoControlsUnDocked.Height = tabControlButtons.Height + 40;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void buttonSecBack1_Click(object sender, EventArgs e)
|
private void buttonSecBack1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -6988,7 +7059,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (vobSubOcr.ShowDialog(this) == DialogResult.OK)
|
if (vobSubOcr.ShowDialog(this) == DialogResult.OK)
|
||||||
{
|
{
|
||||||
MakeHistoryForUndo(_language.BeforeImportingBluRaySupFile);
|
MakeHistoryForUndo(_language.BeforeImportingBluRaySupFile);
|
||||||
|
FileNew();
|
||||||
_subtitle.Paragraphs.Clear();
|
_subtitle.Paragraphs.Clear();
|
||||||
SetCurrentFormat(new SubRip().FriendlyName);
|
SetCurrentFormat(new SubRip().FriendlyName);
|
||||||
_subtitle.WasLoadedWithFrameNumbers = false;
|
_subtitle.WasLoadedWithFrameNumbers = false;
|
||||||
@ -7293,8 +7364,29 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
bool doReFill = false;
|
bool doReFill = false;
|
||||||
bool updateListViewStatus = false;
|
bool updateListViewStatus = false;
|
||||||
SubtitleListview1.SelectedIndexChanged -= SubtitleListview1_SelectedIndexChanged;
|
SubtitleListview1.SelectedIndexChanged -= SubtitleListview1_SelectedIndexChanged;
|
||||||
string message;
|
string message = string.Empty;
|
||||||
var updates = _networkSession.GetUpdates(out message);
|
|
||||||
|
List<SeNetworkService.SeUpdate> updates = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
updates = (List<SeNetworkService.SeUpdate>)_networkSession.GetUpdates(out message);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Unable to connect to server: " + exception.Message);
|
||||||
|
_networkSession.TimerStop();
|
||||||
|
if (_networkChat != null && !_networkChat.IsDisposed)
|
||||||
|
{
|
||||||
|
_networkChat.Close();
|
||||||
|
_networkChat = null;
|
||||||
|
}
|
||||||
|
_networkSession = null;
|
||||||
|
EnableDisableControlsNotWorkingInNetworkMode(true);
|
||||||
|
toolStripStatusNetworking.Visible = false;
|
||||||
|
SubtitleListview1.HideExtraColumn();
|
||||||
|
_networkChat = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
int currentSelectedIndex = -1;
|
int currentSelectedIndex = -1;
|
||||||
if (SubtitleListview1.SelectedItems.Count > 0)
|
if (SubtitleListview1.SelectedItems.Count > 0)
|
||||||
currentSelectedIndex = SubtitleListview1.SelectedItems[0].Index;
|
currentSelectedIndex = SubtitleListview1.SelectedItems[0].Index;
|
||||||
@ -7461,8 +7553,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_networkSession.InsertLine(insertIndex, insertParagraph);
|
_networkSession.InsertLine(insertIndex, insertParagraph);
|
||||||
doReFill = true;
|
doReFill = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_networkSession.CheckForAndSubmitUpdates(updates); // updates only (no inserts/deletes)
|
_networkSession.CheckForAndSubmitUpdates(updates); // updates only (no inserts/deletes)
|
||||||
|
|
||||||
|
//TODO: do some compare lines count... and reload if no match!
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -7573,5 +7666,177 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private void UnDockVideoPlayer()
|
||||||
|
{
|
||||||
|
_videoPlayerUnDocked = new VideoPlayerUnDocked(this, labelVideoInfo.Text, _formPositionsAndSizes, mediaPlayer);
|
||||||
|
_formPositionsAndSizes.SetPositionAndSize(_videoPlayerUnDocked);
|
||||||
|
|
||||||
|
Control control = null;
|
||||||
|
if (splitContainer1.Panel2.Controls.Count == 0)
|
||||||
|
{
|
||||||
|
control = panelVideoPlayer;
|
||||||
|
groupBoxVideo.Controls.Remove(control);
|
||||||
|
}
|
||||||
|
else if (splitContainer1.Panel2.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
control = panelVideoPlayer;
|
||||||
|
splitContainer1.Panel2.Controls.Clear();
|
||||||
|
}
|
||||||
|
if (control != null)
|
||||||
|
{
|
||||||
|
control.Top = 0;
|
||||||
|
control.Left = 0;
|
||||||
|
control.Width = _videoPlayerUnDocked.PanelContainer.Width;
|
||||||
|
control.Height = _videoPlayerUnDocked.PanelContainer.Height;
|
||||||
|
_videoPlayerUnDocked.PanelContainer.Controls.Add(control);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReDockVideoPlayer(Control control)
|
||||||
|
{
|
||||||
|
groupBoxVideo.Controls.Add(control);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UnDockWaveForm()
|
||||||
|
{
|
||||||
|
_waveFormUnDocked = new WaveFormUnDocked(this, labelVideoInfo.Text, _formPositionsAndSizes);
|
||||||
|
_formPositionsAndSizes.SetPositionAndSize(_waveFormUnDocked);
|
||||||
|
|
||||||
|
var control = AudioWaveForm;
|
||||||
|
groupBoxVideo.Controls.Remove(control);
|
||||||
|
control.Top = 0;
|
||||||
|
control.Left = 0;
|
||||||
|
control.Width = _waveFormUnDocked.PanelContainer.Width;
|
||||||
|
control.Height = _waveFormUnDocked.PanelContainer.Height - panelWaveFormControls.Height;
|
||||||
|
_waveFormUnDocked.PanelContainer.Controls.Add(control);
|
||||||
|
|
||||||
|
var control2 = (Control)panelWaveFormControls;
|
||||||
|
groupBoxVideo.Controls.Remove(control2);
|
||||||
|
control2.Top = control.Height;
|
||||||
|
control2.Left = 0;
|
||||||
|
_waveFormUnDocked.PanelContainer.Controls.Add(control2);
|
||||||
|
|
||||||
|
var control3 = (Control)trackBarWaveFormPosition;
|
||||||
|
groupBoxVideo.Controls.Remove(control3);
|
||||||
|
control3.Top = control.Height;
|
||||||
|
control3.Left = control2.Width +2;
|
||||||
|
control3.Width = _waveFormUnDocked.PanelContainer.Width - control3.Left;
|
||||||
|
_waveFormUnDocked.PanelContainer.Controls.Add(control3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReDockWaveForm(Control waveForm, Control buttons, Control trackBar)
|
||||||
|
{
|
||||||
|
groupBoxVideo.Controls.Add(waveForm);
|
||||||
|
waveForm.Top = 30;
|
||||||
|
waveForm.Height = groupBoxVideo.Height - (waveForm.Top + buttons.Height + 10);
|
||||||
|
|
||||||
|
groupBoxVideo.Controls.Add(buttons);
|
||||||
|
buttons.Top = waveForm.Top + waveForm.Height + 5;
|
||||||
|
|
||||||
|
groupBoxVideo.Controls.Add(trackBar);
|
||||||
|
trackBar.Top = buttons.Top;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UnDockVideoButtons()
|
||||||
|
{
|
||||||
|
_videoControlsUnDocked = new VideoControlsUndocked(this, labelVideoInfo.Text, _formPositionsAndSizes);
|
||||||
|
_formPositionsAndSizes.SetPositionAndSize(_videoControlsUnDocked);
|
||||||
|
var control = tabControlButtons;
|
||||||
|
groupBoxVideo.Controls.Remove(control);
|
||||||
|
control.Top = 0;
|
||||||
|
control.Left = 0;
|
||||||
|
_videoControlsUnDocked.PanelContainer.Controls.Add(control);
|
||||||
|
splitContainerMain.Panel2Collapsed = true;
|
||||||
|
splitContainer1.Panel2Collapsed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReDockVideoButtons(Control videoButtons)
|
||||||
|
{
|
||||||
|
groupBoxVideo.Controls.Add(videoButtons);
|
||||||
|
videoButtons.Top = 12;
|
||||||
|
videoButtons.Left = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void undockVideoControlsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
UnDockVideoPlayer();
|
||||||
|
if (toolStripButtonToogleVideo.Checked)
|
||||||
|
_videoPlayerUnDocked.Show(this);
|
||||||
|
|
||||||
|
UnDockWaveForm();
|
||||||
|
if (toolStripButtonToogleWaveForm.Checked)
|
||||||
|
_waveFormUnDocked.Show(this);
|
||||||
|
|
||||||
|
UnDockVideoButtons();
|
||||||
|
_videoControlsUnDocked.Show(this);
|
||||||
|
|
||||||
|
_isVideoControlsUnDocked = true;
|
||||||
|
|
||||||
|
undockVideoControlsToolStripMenuItem.Visible = false;
|
||||||
|
redockVideoControlsToolStripMenuItem.Visible = true;
|
||||||
|
|
||||||
|
tabControl1_SelectedIndexChanged(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void redockVideoControlsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_videoControlsUnDocked != null && !_videoControlsUnDocked.IsDisposed)
|
||||||
|
{
|
||||||
|
var control = _videoControlsUnDocked.PanelContainer.Controls[0];
|
||||||
|
_videoControlsUnDocked.PanelContainer.Controls.Clear();
|
||||||
|
ReDockVideoButtons(control);
|
||||||
|
_videoControlsUnDocked.Close();
|
||||||
|
_videoControlsUnDocked = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_waveFormUnDocked != null && !_waveFormUnDocked.IsDisposed)
|
||||||
|
{
|
||||||
|
var controlWaveForm = _waveFormUnDocked.PanelContainer.Controls[0];
|
||||||
|
var controlButtons = _waveFormUnDocked.PanelContainer.Controls[1];
|
||||||
|
var controlTrackBar = _waveFormUnDocked.PanelContainer.Controls[2];
|
||||||
|
_waveFormUnDocked.PanelContainer.Controls.Clear();
|
||||||
|
ReDockWaveForm(controlWaveForm, controlButtons, controlTrackBar);
|
||||||
|
_waveFormUnDocked.Close();
|
||||||
|
_waveFormUnDocked = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_videoPlayerUnDocked != null && !_videoPlayerUnDocked.IsDisposed)
|
||||||
|
{
|
||||||
|
var control = _videoPlayerUnDocked.PanelContainer.Controls[0];
|
||||||
|
_videoPlayerUnDocked.PanelContainer.Controls.Remove(control);
|
||||||
|
ReDockVideoPlayer(control);
|
||||||
|
_videoPlayerUnDocked.Close();
|
||||||
|
_videoPlayerUnDocked = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
_isVideoControlsUnDocked = false;
|
||||||
|
_videoPlayerUnDocked = null;
|
||||||
|
_waveFormUnDocked = null;
|
||||||
|
_videoControlsUnDocked = null;
|
||||||
|
ShowVideoPlayer();
|
||||||
|
|
||||||
|
AudioWaveForm.Visible = toolStripButtonToogleWaveForm.Checked;
|
||||||
|
trackBarWaveFormPosition.Visible = toolStripButtonToogleWaveForm.Checked;
|
||||||
|
panelWaveFormControls.Visible = toolStripButtonToogleWaveForm.Checked;
|
||||||
|
if (!toolStripButtonToogleVideo.Checked)
|
||||||
|
HideVideoPlayer();
|
||||||
|
|
||||||
|
mediaPlayer.Invalidate();
|
||||||
|
this.Refresh();
|
||||||
|
|
||||||
|
undockVideoControlsToolStripMenuItem.Visible = true;
|
||||||
|
redockVideoControlsToolStripMenuItem.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void SetWaveFormToogleOff()
|
||||||
|
{
|
||||||
|
toolStripButtonToogleWaveForm.Checked = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void SetVideoPlayerToogleOff()
|
||||||
|
{
|
||||||
|
toolStripButtonToogleVideo.Checked = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
61
src/Forms/VideoControlsUndocked.Designer.cs
generated
Normal file
61
src/Forms/VideoControlsUndocked.Designer.cs
generated
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
partial class VideoControlsUndocked
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panelContainer = new System.Windows.Forms.Panel();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panelContainer
|
||||||
|
//
|
||||||
|
this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panelContainer.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panelContainer.Name = "panelContainer";
|
||||||
|
this.panelContainer.Size = new System.Drawing.Size(458, 307);
|
||||||
|
this.panelContainer.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// VideoControlsUndocked
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(458, 307);
|
||||||
|
this.Controls.Add(this.panelContainer);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||||
|
this.MaximizeBox = false;
|
||||||
|
this.Name = "VideoControlsUndocked";
|
||||||
|
this.Text = "VideoControlsUndocked";
|
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.VideoControlsUndocked_FormClosing);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Panel panelContainer;
|
||||||
|
}
|
||||||
|
}
|
44
src/Forms/VideoControlsUndocked.cs
Normal file
44
src/Forms/VideoControlsUndocked.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
public partial class VideoControlsUndocked : Form
|
||||||
|
{
|
||||||
|
Main _mainForm = null;
|
||||||
|
PositionsAndSizes _positionsAndSizes = null;
|
||||||
|
|
||||||
|
public Panel PanelContainer
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return panelContainer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public VideoControlsUndocked(Main mainForm, string title, PositionsAndSizes positionsAndSizes)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_mainForm = mainForm;
|
||||||
|
_positionsAndSizes = positionsAndSizes;
|
||||||
|
Text = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void VideoControlsUndocked_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.CloseReason == CloseReason.UserClosing && panelContainer.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
var control = panelContainer.Controls[0];
|
||||||
|
panelContainer.Controls.Clear();
|
||||||
|
_mainForm.ReDockVideoButtons(control);
|
||||||
|
}
|
||||||
|
_positionsAndSizes.SavePositionAndSize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
src/Forms/VideoControlsUndocked.resx
Normal file
120
src/Forms/VideoControlsUndocked.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
63
src/Forms/VideoPlayerUnDocked.Designer.cs
generated
Normal file
63
src/Forms/VideoPlayerUnDocked.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
partial class VideoPlayerUnDocked
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panelContainer = new System.Windows.Forms.Panel();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panelContainer
|
||||||
|
//
|
||||||
|
this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panelContainer.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panelContainer.Margin = new System.Windows.Forms.Padding(0);
|
||||||
|
this.panelContainer.Name = "panelContainer";
|
||||||
|
this.panelContainer.Size = new System.Drawing.Size(614, 323);
|
||||||
|
this.panelContainer.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// VideoPlayerUnDocked
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(614, 323);
|
||||||
|
this.Controls.Add(this.panelContainer);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.Name = "VideoPlayerUnDocked";
|
||||||
|
this.Text = "VideoPlayerUnDocked";
|
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.VideoPlayerUnDocked_FormClosing);
|
||||||
|
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VideoPlayerUnDocked_KeyDown_1);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Panel panelContainer;
|
||||||
|
}
|
||||||
|
}
|
90
src/Forms/VideoPlayerUnDocked.cs
Normal file
90
src/Forms/VideoPlayerUnDocked.cs
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
public partial class VideoPlayerUnDocked : Form
|
||||||
|
{
|
||||||
|
Main _mainForm = null;
|
||||||
|
PositionsAndSizes _positionsAndSizes = null;
|
||||||
|
Controls.VideoPlayerContainer _videoPlayerContainer;
|
||||||
|
|
||||||
|
public Panel PanelContainer
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return panelContainer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public VideoPlayerUnDocked(Main main, string title, PositionsAndSizes positionsAndSizes, Controls.VideoPlayerContainer videoPlayerContainer)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_mainForm = main;
|
||||||
|
_positionsAndSizes = positionsAndSizes;
|
||||||
|
_videoPlayerContainer = videoPlayerContainer;
|
||||||
|
Text = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void VideoPlayerUnDocked_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.CloseReason == CloseReason.UserClosing && panelContainer.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
var control = panelContainer.Controls[0];
|
||||||
|
panelContainer.Controls.Clear();
|
||||||
|
_mainForm.ReDockVideoPlayer(control);
|
||||||
|
_mainForm.SetVideoPlayerToogleOff();
|
||||||
|
}
|
||||||
|
_positionsAndSizes.SavePositionAndSize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void VideoPlayerUnDocked_KeyDown_1(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
|
if (WindowState == FormWindowState.Maximized)
|
||||||
|
WindowState = FormWindowState.Normal;
|
||||||
|
else if (WindowState == FormWindowState.Normal)
|
||||||
|
WindowState = FormWindowState.Maximized;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
else if (_videoPlayerContainer.VideoPlayer != null)
|
||||||
|
{
|
||||||
|
if (e.Modifiers == Keys.None && e.KeyCode == Keys.Space)
|
||||||
|
{
|
||||||
|
if (_videoPlayerContainer.VideoPlayer.IsPlaying)
|
||||||
|
_videoPlayerContainer.VideoPlayer.Pause();
|
||||||
|
else
|
||||||
|
_videoPlayerContainer.VideoPlayer.Play();
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
else if (e.KeyCode == Keys.Right && e.Modifiers == Keys.Control)
|
||||||
|
{
|
||||||
|
_videoPlayerContainer.CurrentPosition += 0.10;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
else if (e.KeyCode == Keys.Left && e.Modifiers == Keys.Control)
|
||||||
|
{
|
||||||
|
_videoPlayerContainer.CurrentPosition -= 0.10;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
else if (e.KeyCode == Keys.Right && e.Modifiers == Keys.Alt)
|
||||||
|
{
|
||||||
|
_videoPlayerContainer.CurrentPosition += 0.5;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
else if (e.KeyCode == Keys.Left && e.Modifiers == Keys.Alt)
|
||||||
|
{
|
||||||
|
_videoPlayerContainer.CurrentPosition -= 0.5;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
src/Forms/VideoPlayerUnDocked.resx
Normal file
120
src/Forms/VideoPlayerUnDocked.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
60
src/Forms/WaveFormUnDocked.Designer.cs
generated
Normal file
60
src/Forms/WaveFormUnDocked.Designer.cs
generated
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
partial class WaveFormUnDocked
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panelContainer = new System.Windows.Forms.Panel();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panelContainer
|
||||||
|
//
|
||||||
|
this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panelContainer.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panelContainer.Name = "panelContainer";
|
||||||
|
this.panelContainer.Size = new System.Drawing.Size(632, 203);
|
||||||
|
this.panelContainer.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// WaveFormUnDocked
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(632, 203);
|
||||||
|
this.Controls.Add(this.panelContainer);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||||
|
this.Name = "WaveFormUnDocked";
|
||||||
|
this.Text = "WaveFormUnDocked";
|
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.WaveFormUnDocked_FormClosing);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Panel panelContainer;
|
||||||
|
}
|
||||||
|
}
|
47
src/Forms/WaveFormUnDocked.cs
Normal file
47
src/Forms/WaveFormUnDocked.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
public partial class WaveFormUnDocked : Form
|
||||||
|
{
|
||||||
|
Main _mainForm = null;
|
||||||
|
PositionsAndSizes _positionsAndSizes = null;
|
||||||
|
|
||||||
|
public Panel PanelContainer
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return panelContainer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public WaveFormUnDocked(Main mainForm, string title, PositionsAndSizes positionsAndSizes)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_mainForm = mainForm;
|
||||||
|
_positionsAndSizes = positionsAndSizes;
|
||||||
|
Text = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WaveFormUnDocked_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.CloseReason == CloseReason.UserClosing && panelContainer.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
var controlWaveForm = panelContainer.Controls[0];
|
||||||
|
var controlButtons = panelContainer.Controls[1];
|
||||||
|
var controlTrackBar = panelContainer.Controls[2];
|
||||||
|
panelContainer.Controls.Clear();
|
||||||
|
_mainForm.ReDockWaveForm(controlWaveForm, controlButtons, controlTrackBar);
|
||||||
|
_mainForm.SetWaveFormToogleOff();
|
||||||
|
}
|
||||||
|
_positionsAndSizes.SavePositionAndSize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
src/Forms/WaveFormUnDocked.resx
Normal file
120
src/Forms/WaveFormUnDocked.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
@ -3,7 +3,7 @@ using System.Windows.Forms;
|
|||||||
|
|
||||||
namespace Nikse.SubtitleEdit.Logic
|
namespace Nikse.SubtitleEdit.Logic
|
||||||
{
|
{
|
||||||
class PositionsAndSizes
|
public class PositionsAndSizes
|
||||||
{
|
{
|
||||||
List<PositionAndSize> _positionsAndSizes = new List<PositionAndSize>();
|
List<PositionAndSize> _positionsAndSizes = new List<PositionAndSize>();
|
||||||
|
|
||||||
|
@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.1.*")]
|
[assembly: AssemblyVersion("3.1.0.*")]
|
||||||
|
@ -361,12 +361,24 @@
|
|||||||
<Compile Include="Forms\UnknownSubtitle.Designer.cs">
|
<Compile Include="Forms\UnknownSubtitle.Designer.cs">
|
||||||
<DependentUpon>UnknownSubtitle.cs</DependentUpon>
|
<DependentUpon>UnknownSubtitle.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\VideoControlsUndocked.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\VideoControlsUndocked.Designer.cs">
|
||||||
|
<DependentUpon>VideoControlsUndocked.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\VideoError.cs">
|
<Compile Include="Forms\VideoError.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Forms\VideoError.Designer.cs">
|
<Compile Include="Forms\VideoError.Designer.cs">
|
||||||
<DependentUpon>VideoError.cs</DependentUpon>
|
<DependentUpon>VideoError.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\VideoPlayerUnDocked.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\VideoPlayerUnDocked.Designer.cs">
|
||||||
|
<DependentUpon>VideoPlayerUnDocked.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\VisualSync.cs">
|
<Compile Include="Forms\VisualSync.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -403,6 +415,12 @@
|
|||||||
<Compile Include="Forms\Watermark.Designer.cs">
|
<Compile Include="Forms\Watermark.Designer.cs">
|
||||||
<DependentUpon>Watermark.cs</DependentUpon>
|
<DependentUpon>Watermark.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\WaveFormUnDocked.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\WaveFormUnDocked.Designer.cs">
|
||||||
|
<DependentUpon>WaveFormUnDocked.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Logic\BluRaySup\BluRaySupPalette.cs" />
|
<Compile Include="Logic\BluRaySup\BluRaySupPalette.cs" />
|
||||||
<Compile Include="Logic\BluRaySup\BluRaySupParser.cs" />
|
<Compile Include="Logic\BluRaySup\BluRaySupParser.cs" />
|
||||||
<Compile Include="Logic\BluRaySup\BluRaySupPicture.cs" />
|
<Compile Include="Logic\BluRaySup\BluRaySupPicture.cs" />
|
||||||
@ -696,6 +714,12 @@
|
|||||||
<DependentUpon>UnknownSubtitle.cs</DependentUpon>
|
<DependentUpon>UnknownSubtitle.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\VideoControlsUndocked.resx">
|
||||||
|
<DependentUpon>VideoControlsUndocked.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\VideoPlayerUnDocked.resx">
|
||||||
|
<DependentUpon>VideoPlayerUnDocked.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\VisualSync.resx">
|
<EmbeddedResource Include="Forms\VisualSync.resx">
|
||||||
<DependentUpon>VisualSync.cs</DependentUpon>
|
<DependentUpon>VisualSync.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@ -715,6 +739,9 @@
|
|||||||
<EmbeddedResource Include="Forms\Watermark.resx">
|
<EmbeddedResource Include="Forms\Watermark.resx">
|
||||||
<DependentUpon>Watermark.cs</DependentUpon>
|
<DependentUpon>Watermark.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\WaveFormUnDocked.resx">
|
||||||
|
<DependentUpon>WaveFormUnDocked.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
Loading…
Reference in New Issue
Block a user