Add improved resize in mainform + added settings for text color/background color

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@186 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2010-12-21 17:50:33 +00:00
parent 7f284aa267
commit 716375c09f
10 changed files with 412 additions and 200 deletions

View File

@ -44,6 +44,8 @@ namespace Nikse.SubtitleEdit.Controls
SubtitleFontBold = settings.General.SubtitleFontBold;
if (settings.General.SubtitleFontSize > 6 && settings.General.SubtitleFontSize < 72)
SubtitleFontSize = settings.General.SubtitleFontSize;
ForeColor = settings.General.SubtitleFontColor;
BackColor = settings.General.SubtitleBackgroundColor;
}
public SubtitleListView()

View File

@ -222,9 +222,6 @@
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.fontDialog1 = new System.Windows.Forms.FontDialog();
this.groupBoxVideo = new System.Windows.Forms.GroupBox();
this.panelVideoPlayer = new System.Windows.Forms.Panel();
this.labelSubtitle = new System.Windows.Forms.Label();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.checkBoxSyncListViewWithVideoWhilePlaying = new System.Windows.Forms.CheckBox();
this.labelVideoInfo = new System.Windows.Forms.Label();
this.trackBarWaveFormPosition = new System.Windows.Forms.TrackBar();
@ -296,6 +293,9 @@
this.buttonAdjustGoToPosAndPause = new System.Windows.Forms.Button();
this.buttonAdjustPlayBefore = new System.Windows.Forms.Button();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.panelVideoPlayer = new System.Windows.Forms.Panel();
this.labelSubtitle = new System.Windows.Forms.Label();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.videoTimer = 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);
@ -309,6 +309,8 @@
this.mergeWithNextToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItemWaveFormPlaySelection = new System.Windows.Forms.ToolStripMenuItem();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainerMain = new System.Windows.Forms.SplitContainer();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@ -320,7 +322,6 @@
this.contextMenuStripListview.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBoxVideo.SuspendLayout();
this.panelVideoPlayer.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBarWaveFormPosition)).BeginInit();
this.panelWaveFormControls.SuspendLayout();
this.toolStrip2.SuspendLayout();
@ -335,7 +336,14 @@
this.tabPageAdjust.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSecAdjust2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSecAdjust1)).BeginInit();
this.panelVideoPlayer.SuspendLayout();
this.contextMenuStripWaveForm.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.splitContainerMain.Panel1.SuspendLayout();
this.splitContainerMain.Panel2.SuspendLayout();
this.splitContainerMain.SuspendLayout();
this.SuspendLayout();
//
// statusStrip1
@ -347,7 +355,7 @@
this.toolStripStatusNetworking});
this.statusStrip1.Location = new System.Drawing.Point(0, 658);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(1502, 25);
this.statusStrip1.Size = new System.Drawing.Size(1244, 25);
this.statusStrip1.TabIndex = 4;
this.statusStrip1.Text = "statusStrip1";
//
@ -362,7 +370,7 @@
//
this.toolStripSelected.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripSelected.Name = "toolStripSelected";
this.toolStripSelected.Size = new System.Drawing.Size(570, 20);
this.toolStripSelected.Size = new System.Drawing.Size(312, 20);
this.toolStripSelected.Spring = true;
this.toolStripSelected.Text = "toolStripSelected";
this.toolStripSelected.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@ -412,7 +420,7 @@
this.toolStripButtonGetFrameRate});
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1502, 40);
this.toolStrip1.Size = new System.Drawing.Size(1244, 40);
this.toolStrip1.TabIndex = 5;
this.toolStrip1.Text = "toolStrip1";
//
@ -675,7 +683,7 @@
this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1502, 24);
this.menuStrip1.Size = new System.Drawing.Size(1244, 24);
this.menuStrip1.TabIndex = 6;
this.menuStrip1.Text = "menuStrip1";
//
@ -1219,9 +1227,10 @@
// toolStripMenuItemAdjustAllTimes
//
this.toolStripMenuItemAdjustAllTimes.Name = "toolStripMenuItemAdjustAllTimes";
this.toolStripMenuItemAdjustAllTimes.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
this.toolStripMenuItemAdjustAllTimes.Size = new System.Drawing.Size(317, 22);
this.toolStripMenuItemAdjustAllTimes.Text = "Adjust all times (show earlier/later)...";
this.toolStripMenuItemAdjustAllTimes.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.D)));
this.toolStripMenuItemAdjustAllTimes.Size = new System.Drawing.Size(336, 22);
this.toolStripMenuItemAdjustAllTimes.Text = "Adjust times (show earlier/later)...";
this.toolStripMenuItemAdjustAllTimes.Click += new System.EventHandler(this.toolStripMenuItemAdjustAllTimes_Click);
//
// visualSyncToolStripMenuItem
@ -1229,7 +1238,7 @@
this.visualSyncToolStripMenuItem.Name = "visualSyncToolStripMenuItem";
this.visualSyncToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.V)));
this.visualSyncToolStripMenuItem.Size = new System.Drawing.Size(317, 22);
this.visualSyncToolStripMenuItem.Size = new System.Drawing.Size(336, 22);
this.visualSyncToolStripMenuItem.Text = "Visual sync...";
this.visualSyncToolStripMenuItem.Click += new System.EventHandler(this.VisualSyncToolStripMenuItemClick);
//
@ -1238,7 +1247,7 @@
this.toolStripMenuItemPointSync.Name = "toolStripMenuItemPointSync";
this.toolStripMenuItemPointSync.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.P)));
this.toolStripMenuItemPointSync.Size = new System.Drawing.Size(317, 22);
this.toolStripMenuItemPointSync.Size = new System.Drawing.Size(336, 22);
this.toolStripMenuItemPointSync.Text = "Point sync...";
this.toolStripMenuItemPointSync.Click += new System.EventHandler(this.toolStripMenuItemPointSync_Click);
//
@ -1378,10 +1387,10 @@
this.tabControlSubtitle.Controls.Add(this.tabPage1);
this.tabControlSubtitle.Controls.Add(this.tabPage2);
this.tabControlSubtitle.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabControlSubtitle.Location = new System.Drawing.Point(6, 62);
this.tabControlSubtitle.Location = new System.Drawing.Point(3, 3);
this.tabControlSubtitle.Name = "tabControlSubtitle";
this.tabControlSubtitle.SelectedIndex = 0;
this.tabControlSubtitle.Size = new System.Drawing.Size(1490, 293);
this.tabControlSubtitle.Size = new System.Drawing.Size(945, 282);
this.tabControlSubtitle.TabIndex = 0;
this.tabControlSubtitle.SelectedIndexChanged += new System.EventHandler(this.TabControlSubtitleSelectedIndexChanged);
//
@ -1392,7 +1401,7 @@
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1482, 267);
this.tabPage1.Size = new System.Drawing.Size(937, 256);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "List view";
this.tabPage1.UseVisualStyleBackColor = true;
@ -1419,16 +1428,16 @@
this.groupBox1.Controls.Add(this.labelDuration);
this.groupBox1.Controls.Add(this.labelStartTime);
this.groupBox1.Controls.Add(this.textBoxListViewText);
this.groupBox1.Location = new System.Drawing.Point(3, 161);
this.groupBox1.Location = new System.Drawing.Point(3, 150);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1471, 102);
this.groupBox1.Size = new System.Drawing.Size(926, 102);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
//
// labelCharactersPerSecond
//
this.labelCharactersPerSecond.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelCharactersPerSecond.Location = new System.Drawing.Point(1170, 12);
this.labelCharactersPerSecond.Location = new System.Drawing.Point(625, 12);
this.labelCharactersPerSecond.Name = "labelCharactersPerSecond";
this.labelCharactersPerSecond.Size = new System.Drawing.Size(177, 13);
this.labelCharactersPerSecond.TabIndex = 31;
@ -1456,7 +1465,7 @@
// labelTextLineTotal
//
this.labelTextLineTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelTextLineTotal.Location = new System.Drawing.Point(1170, 86);
this.labelTextLineTotal.Location = new System.Drawing.Point(625, 86);
this.labelTextLineTotal.Name = "labelTextLineTotal";
this.labelTextLineTotal.Size = new System.Drawing.Size(177, 13);
this.labelTextLineTotal.TabIndex = 21;
@ -1466,7 +1475,7 @@
// buttonUnBreak
//
this.buttonUnBreak.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonUnBreak.Location = new System.Drawing.Point(1351, 31);
this.buttonUnBreak.Location = new System.Drawing.Point(806, 31);
this.buttonUnBreak.Name = "buttonUnBreak";
this.buttonUnBreak.Size = new System.Drawing.Size(117, 21);
this.buttonUnBreak.TabIndex = 6;
@ -1487,7 +1496,7 @@
// buttonUndoListViewChanges
//
this.buttonUndoListViewChanges.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonUndoListViewChanges.Location = new System.Drawing.Point(1351, 59);
this.buttonUndoListViewChanges.Location = new System.Drawing.Point(806, 59);
this.buttonUndoListViewChanges.Name = "buttonUndoListViewChanges";
this.buttonUndoListViewChanges.Size = new System.Drawing.Size(117, 21);
this.buttonUndoListViewChanges.TabIndex = 7;
@ -1615,7 +1624,7 @@
this.textBoxListViewText.Location = new System.Drawing.Point(206, 28);
this.textBoxListViewText.Multiline = true;
this.textBoxListViewText.Name = "textBoxListViewText";
this.textBoxListViewText.Size = new System.Drawing.Size(1141, 56);
this.textBoxListViewText.Size = new System.Drawing.Size(596, 56);
this.textBoxListViewText.TabIndex = 5;
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
@ -1747,7 +1756,7 @@
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(1, 3);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.Size = new System.Drawing.Size(1476, 157);
this.SubtitleListview1.Size = new System.Drawing.Size(932, 146);
this.SubtitleListview1.SmallImageList = this.imageList1;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
@ -1993,7 +2002,7 @@
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1482, 267);
this.tabPage2.Size = new System.Drawing.Size(937, 256);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Source view";
this.tabPage2.UseVisualStyleBackColor = true;
@ -2010,7 +2019,7 @@
this.textBoxSource.Multiline = true;
this.textBoxSource.Name = "textBoxSource";
this.textBoxSource.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxSource.Size = new System.Drawing.Size(1475, 253);
this.textBoxSource.Size = new System.Drawing.Size(932, 253);
this.textBoxSource.TabIndex = 12;
this.textBoxSource.WordWrap = false;
this.textBoxSource.Click += new System.EventHandler(this.TextBoxSourceClick);
@ -2031,9 +2040,9 @@
//
// groupBoxVideo
//
this.groupBoxVideo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
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.panelVideoPlayer);
this.groupBoxVideo.Controls.Add(this.checkBoxSyncListViewWithVideoWhilePlaying);
this.groupBoxVideo.Controls.Add(this.labelVideoInfo);
this.groupBoxVideo.Controls.Add(this.trackBarWaveFormPosition);
@ -2041,52 +2050,12 @@
this.groupBoxVideo.Controls.Add(this.AudioWaveForm);
this.groupBoxVideo.Controls.Add(this.tabControlButtons);
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(6, 356);
this.groupBoxVideo.Location = new System.Drawing.Point(3, 3);
this.groupBoxVideo.Name = "groupBoxVideo";
this.groupBoxVideo.Size = new System.Drawing.Size(1490, 297);
this.groupBoxVideo.Size = new System.Drawing.Size(1238, 299);
this.groupBoxVideo.TabIndex = 1;
this.groupBoxVideo.TabStop = false;
//
// panelVideoPlayer
//
this.panelVideoPlayer.Controls.Add(this.labelSubtitle);
this.panelVideoPlayer.Controls.Add(this.mediaPlayer);
this.panelVideoPlayer.Location = new System.Drawing.Point(759, 30);
this.panelVideoPlayer.Name = "panelVideoPlayer";
this.panelVideoPlayer.Size = new System.Drawing.Size(348, 263);
this.panelVideoPlayer.TabIndex = 5;
//
// labelSubtitle
//
this.labelSubtitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
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.ForeColor = System.Drawing.Color.White;
this.labelSubtitle.Location = new System.Drawing.Point(0, 234);
this.labelSubtitle.Name = "labelSubtitle";
this.labelSubtitle.Size = new System.Drawing.Size(346, 28);
this.labelSubtitle.TabIndex = 3;
this.labelSubtitle.Text = "labelSubtitle";
this.labelSubtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// mediaPlayer
//
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.Location = new System.Drawing.Point(0, 0);
this.mediaPlayer.Name = "mediaPlayer";
this.mediaPlayer.ShowStopButton = true;
this.mediaPlayer.Size = new System.Drawing.Size(346, 236);
this.mediaPlayer.TabIndex = 5;
this.mediaPlayer.VideoPlayer = null;
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);
//
// checkBoxSyncListViewWithVideoWhilePlaying
//
this.checkBoxSyncListViewWithVideoWhilePlaying.AutoSize = true;
@ -2100,7 +2069,7 @@
// labelVideoInfo
//
this.labelVideoInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelVideoInfo.Location = new System.Drawing.Point(1115, 12);
this.labelVideoInfo.Location = new System.Drawing.Point(863, 12);
this.labelVideoInfo.Name = "labelVideoInfo";
this.labelVideoInfo.Size = new System.Drawing.Size(369, 13);
this.labelVideoInfo.TabIndex = 12;
@ -2109,25 +2078,30 @@
//
// trackBarWaveFormPosition
//
this.trackBarWaveFormPosition.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.trackBarWaveFormPosition.AutoSize = false;
this.trackBarWaveFormPosition.Location = new System.Drawing.Point(645, 254);
this.trackBarWaveFormPosition.Location = new System.Drawing.Point(645, 258);
this.trackBarWaveFormPosition.Maximum = 1000;
this.trackBarWaveFormPosition.Name = "trackBarWaveFormPosition";
this.trackBarWaveFormPosition.Size = new System.Drawing.Size(108, 20);
this.trackBarWaveFormPosition.Size = new System.Drawing.Size(586, 20);
this.trackBarWaveFormPosition.TabIndex = 11;
this.trackBarWaveFormPosition.TickStyle = System.Windows.Forms.TickStyle.None;
this.trackBarWaveFormPosition.ValueChanged += new System.EventHandler(this.trackBarWaveFormPosition_ValueChanged);
//
// panelWaveFormControls
//
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.Location = new System.Drawing.Point(478, 257);
this.panelWaveFormControls.Location = new System.Drawing.Point(478, 263);
this.panelWaveFormControls.Name = "panelWaveFormControls";
this.panelWaveFormControls.Size = new System.Drawing.Size(161, 29);
this.panelWaveFormControls.TabIndex = 10;
//
// toolStrip2
//
this.toolStrip2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButtonWaveFormZoomOut,
@ -2138,7 +2112,7 @@
this.toolStripButtonWaveFormPlay});
this.toolStrip2.Location = new System.Drawing.Point(0, 0);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Size = new System.Drawing.Size(161, 25);
this.toolStrip2.Size = new System.Drawing.Size(135, 25);
this.toolStrip2.TabIndex = 0;
this.toolStrip2.Text = "toolStrip2";
//
@ -2201,6 +2175,9 @@
//
this.AudioWaveForm.AllowDrop = true;
this.AudioWaveForm.AllowNewSelection = true;
this.AudioWaveForm.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.AudioWaveForm.BackColor = System.Drawing.Color.Black;
this.AudioWaveForm.BackgroundColor = System.Drawing.Color.Black;
this.AudioWaveForm.Color = System.Drawing.Color.GreenYellow;
@ -2211,7 +2188,7 @@
this.AudioWaveForm.Name = "AudioWaveForm";
this.AudioWaveForm.NewSelectionParagraph = null;
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
this.AudioWaveForm.Size = new System.Drawing.Size(278, 218);
this.AudioWaveForm.Size = new System.Drawing.Size(756, 222);
this.AudioWaveForm.StartPositionSeconds = 0D;
this.AudioWaveForm.TabIndex = 6;
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
@ -2227,7 +2204,7 @@
this.tabControlButtons.Controls.Add(this.tabPageTranslate);
this.tabControlButtons.Controls.Add(this.tabPageCreate);
this.tabControlButtons.Controls.Add(this.tabPageAdjust);
this.tabControlButtons.Location = new System.Drawing.Point(5, 11);
this.tabControlButtons.Location = new System.Drawing.Point(6, 12);
this.tabControlButtons.Name = "tabControlButtons";
this.tabControlButtons.SelectedIndex = 0;
this.tabControlButtons.Size = new System.Drawing.Size(467, 283);
@ -2945,6 +2922,49 @@
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(92, 25);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
//
// panelVideoPlayer
//
this.panelVideoPlayer.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.panelVideoPlayer.Controls.Add(this.labelSubtitle);
this.panelVideoPlayer.Controls.Add(this.mediaPlayer);
this.panelVideoPlayer.Location = new System.Drawing.Point(1, 1);
this.panelVideoPlayer.Name = "panelVideoPlayer";
this.panelVideoPlayer.Size = new System.Drawing.Size(282, 280);
this.panelVideoPlayer.TabIndex = 5;
//
// labelSubtitle
//
this.labelSubtitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
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.ForeColor = System.Drawing.Color.White;
this.labelSubtitle.Location = new System.Drawing.Point(0, 248);
this.labelSubtitle.Name = "labelSubtitle";
this.labelSubtitle.Size = new System.Drawing.Size(280, 32);
this.labelSubtitle.TabIndex = 3;
this.labelSubtitle.Text = "labelSubtitle";
this.labelSubtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// mediaPlayer
//
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.Location = new System.Drawing.Point(0, 2);
this.mediaPlayer.Name = "mediaPlayer";
this.mediaPlayer.ShowStopButton = true;
this.mediaPlayer.Size = new System.Drawing.Size(280, 246);
this.mediaPlayer.TabIndex = 5;
this.mediaPlayer.VideoPlayer = null;
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);
//
// videoTimer
//
this.videoTimer.Interval = 500;
@ -3029,13 +3049,48 @@
this.toolStripMenuItemWaveFormPlaySelection.Text = "Play selection";
this.toolStripMenuItemWaveFormPlaySelection.Click += new System.EventHandler(this.toolStripMenuItemWaveFormPlaySelection_Click);
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tabControlSubtitle);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.panelVideoPlayer);
this.splitContainer1.Size = new System.Drawing.Size(1244, 285);
this.splitContainer1.SplitterDistance = 950;
this.splitContainer1.TabIndex = 7;
//
// splitContainerMain
//
this.splitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerMain.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainerMain.Location = new System.Drawing.Point(0, 64);
this.splitContainerMain.Name = "splitContainerMain";
this.splitContainerMain.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainerMain.Panel1
//
this.splitContainerMain.Panel1.Controls.Add(this.splitContainer1);
//
// splitContainerMain.Panel2
//
this.splitContainerMain.Panel2.Controls.Add(this.groupBoxVideo);
this.splitContainerMain.Size = new System.Drawing.Size(1244, 594);
this.splitContainerMain.SplitterDistance = 285;
this.splitContainerMain.TabIndex = 8;
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1502, 683);
this.Controls.Add(this.tabControlSubtitle);
this.Controls.Add(this.groupBoxVideo);
this.ClientSize = new System.Drawing.Size(1244, 683);
this.Controls.Add(this.splitContainerMain);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
@ -3067,7 +3122,6 @@
this.tabPage2.PerformLayout();
this.groupBoxVideo.ResumeLayout(false);
this.groupBoxVideo.PerformLayout();
this.panelVideoPlayer.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.trackBarWaveFormPosition)).EndInit();
this.panelWaveFormControls.ResumeLayout(false);
this.panelWaveFormControls.PerformLayout();
@ -3090,7 +3144,14 @@
this.tabPageAdjust.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSecAdjust2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSecAdjust1)).EndInit();
this.panelVideoPlayer.ResumeLayout(false);
this.contextMenuStripWaveForm.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.ResumeLayout(false);
this.splitContainerMain.Panel1.ResumeLayout(false);
this.splitContainerMain.Panel2.ResumeLayout(false);
this.splitContainerMain.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -3377,6 +3438,8 @@
private System.Windows.Forms.ToolStripMenuItem leaveSessionToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showSessionKeyLogToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem chatToolStripMenuItem;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainerMain;
}
}

View File

@ -176,7 +176,9 @@ namespace Nikse.SubtitleEdit.Forms
UpdateRecentFilesUI();
InitializeToolbar();
InitializeSubtitleFont();
Utilities.InitializeSubtitleFont(textBoxSource);
Utilities.InitializeSubtitleFont(textBoxListViewText);
tabControlSubtitle.SelectTab(TabControlSourceView); // AC
ShowSourceLineNumber(); // AC
@ -389,6 +391,12 @@ namespace Nikse.SubtitleEdit.Forms
private void Main_Load(object sender, EventArgs e)
{
splitContainer1.Panel2MinSize = 250;
splitContainer1.Panel1MinSize = 250;
if (Configuration.Settings.General.StartListViewWidth < 250)
Configuration.Settings.General.StartListViewWidth = (Width / 3) * 2;
if (Configuration.Settings.General.StartRememberPositionAndSize &&
!string.IsNullOrEmpty(Configuration.Settings.General.StartPosition))
{
@ -410,8 +418,9 @@ namespace Nikse.SubtitleEdit.Forms
if (Configuration.Settings.General.StartSize == "Maximized")
{
CenterFormOnCurrentScreen();
WindowState = FormWindowState.Maximized;
if (!splitContainer1.Panel2Collapsed && Configuration.Settings.General.StartRememberPositionAndSize)
splitContainer1.SplitterDistance = Configuration.Settings.General.StartListViewWidth;
return;
}
@ -443,6 +452,10 @@ namespace Nikse.SubtitleEdit.Forms
{
CenterFormOnCurrentScreen();
}
if (!splitContainer1.Panel2Collapsed && Configuration.Settings.General.StartRememberPositionAndSize)
{
splitContainer1.SplitterDistance = Configuration.Settings.General.StartListViewWidth;
}
if (Environment.OSVersion.Version.Major < 6) // 6 == Vista/Win2008Server/Win7
{
@ -1408,9 +1421,11 @@ namespace Nikse.SubtitleEdit.Forms
private void ShowSettings()
{
string oldListViewLineSeparatorString = Configuration.Settings.General.ListViewLineSeparatorString;
string oldSubtitleFontSettings = Configuration.Settings.General.SubtitleFontName +
string oldSubtitleFontSettings = Configuration.Settings.General.SubtitleFontName +
Configuration.Settings.General.SubtitleFontBold +
Configuration.Settings.General.SubtitleFontSize;
Configuration.Settings.General.SubtitleFontSize +
Configuration.Settings.General.SubtitleFontColor.ToArgb().ToString() +
Configuration.Settings.General.SubtitleBackgroundColor.ToArgb().ToString();
var settings = new Settings();
@ -1423,7 +1438,8 @@ namespace Nikse.SubtitleEdit.Forms
InitializeToolbar();
UpdateRecentFilesUI();
InitializeSubtitleFont();
Utilities.InitializeSubtitleFont(textBoxSource);
Utilities.InitializeSubtitleFont(textBoxListViewText);
buttonCustomUrl.Text = Configuration.Settings.VideoControls.CustomSearchText;
buttonCustomUrl.Enabled = Configuration.Settings.VideoControls.CustomSearchUrl.Length > 1;
@ -1436,12 +1452,17 @@ namespace Nikse.SubtitleEdit.Forms
if (oldSubtitleFontSettings != Configuration.Settings.General.SubtitleFontName +
Configuration.Settings.General.SubtitleFontBold +
Configuration.Settings.General.SubtitleFontSize)
Configuration.Settings.General.SubtitleFontSize +
Configuration.Settings.General.SubtitleFontColor.ToArgb().ToString() +
Configuration.Settings.General.SubtitleBackgroundColor.ToArgb().ToString())
{
Utilities.InitializeSubtitleFont(textBoxListViewText);
Utilities.InitializeSubtitleFont(textBoxSource);
SubtitleListview1.SubtitleFontName = Configuration.Settings.General.SubtitleFontName;
SubtitleListview1.SubtitleFontBold = Configuration.Settings.General.SubtitleFontBold;
SubtitleListview1.SubtitleFontSize = Configuration.Settings.General.SubtitleFontSize;
SubtitleListview1.ForeColor = Configuration.Settings.General.SubtitleFontColor;
SubtitleListview1.BackColor = Configuration.Settings.General.SubtitleBackgroundColor;
SaveSubtitleListviewIndexes();
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RestoreSubtitleListviewIndexes();
@ -1464,25 +1485,6 @@ namespace Nikse.SubtitleEdit.Forms
}
private void InitializeSubtitleFont()
{
var gs = Configuration.Settings.General;
if (string.IsNullOrEmpty(gs.SubtitleFontName))
gs.SubtitleFontName = "Tahoma";
if (gs.SubtitleFontBold)
{
textBoxSource.Font = new System.Drawing.Font(gs.SubtitleFontName, gs.SubtitleFontSize, System.Drawing.FontStyle.Bold);
textBoxListViewText.Font = new System.Drawing.Font(gs.SubtitleFontName, gs.SubtitleFontSize, System.Drawing.FontStyle.Bold);
}
else
{
textBoxSource.Font = new System.Drawing.Font(gs.SubtitleFontName, gs.SubtitleFontSize);
textBoxListViewText.Font = new System.Drawing.Font(gs.SubtitleFontName, gs.SubtitleFontSize);
}
}
private void TryLoadIcon(ToolStripButton button, string iconName)
{
string fullPath = Configuration.IconsFolder + iconName + ".png";
@ -3708,18 +3710,19 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.General.StartSize = "Maximized";
else
Configuration.Settings.General.StartSize = Width + ";" + Height;
//TODO: save in adjust all lines ...Configuration.Settings.General.DefaultAdjustMilliseconds = (int)timeUpDownAdjust.TimeCode.TotalMilliseconds;
Configuration.Settings.General.AutoRepeatOn = checkBoxAutoRepeatOn.Checked;
Configuration.Settings.General.AutoContinueOn = checkBoxAutoContinue.Checked;
Configuration.Settings.General.SyncListViewWithVideoWhilePlaying = checkBoxSyncListViewWithVideoWhilePlaying.Checked;
if (!string.IsNullOrEmpty(_fileName))
Configuration.Settings.RecentFiles.Add(_fileName, FirstVisibleIndex, FirstSelectedIndex);
Configuration.Settings.Save();
Configuration.Settings.General.StartListViewWidth = splitContainer1.SplitterDistance;
}
else if (Configuration.Settings.General.StartRememberPositionAndSize)
{
Configuration.Settings.General.StartListViewWidth = splitContainer1.SplitterDistance;
}
Configuration.Settings.General.AutoRepeatOn = checkBoxAutoRepeatOn.Checked;
Configuration.Settings.General.AutoContinueOn = checkBoxAutoContinue.Checked;
Configuration.Settings.General.SyncListViewWithVideoWhilePlaying = checkBoxSyncListViewWithVideoWhilePlaying.Checked;
if (!string.IsNullOrEmpty(_fileName))
Configuration.Settings.RecentFiles.Add(_fileName, FirstVisibleIndex, FirstSelectedIndex);
Configuration.Settings.Save();
}
}
@ -5705,43 +5708,41 @@ namespace Nikse.SubtitleEdit.Forms
if (mediaPlayer != null)
mediaPlayer.Pause();
groupBoxVideo.Visible = false;
tabControlSubtitle.Height = this.Height - (tabControlSubtitle.Top + statusStrip1.Height + 38);
splitContainer1.Panel2Collapsed = true;
splitContainerMain.Panel2Collapsed = true;
}
private void ShowVideoPlayer()
{
groupBoxVideo.Visible = true;
groupBoxVideo.Top = statusStrip1.Top - (groupBoxVideo.Height + 5);
tabControlSubtitle.Height = groupBoxVideo.Top - (tabControlSubtitle.Top);
labelVideoInfo.TextAlign = ContentAlignment.TopRight;
labelVideoInfo.Left = groupBoxVideo.Width - (labelVideoInfo.Width + 10);
{
if (toolStripButtonToogleVideo.Checked && toolStripButtonToogleWaveForm.Checked)
{
splitContainer1.Panel2Collapsed = false;
MoveVideoUp();
}
else
{
splitContainer1.Panel2Collapsed = true;
MoveVideoDown();
}
splitContainerMain.Panel2Collapsed = false;
if (toolStripButtonToogleVideo.Checked)
{
if (AudioWaveForm.Visible)
{
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
panelVideoPlayer.Width = 360;
panelVideoPlayer.Left = this.Width - (360 + 34);
AudioWaveForm.Width = panelVideoPlayer.Left - (AudioWaveForm.Left + 5);
}
else
{
panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
int w = this.Width - (panelVideoPlayer.Left + 34);
if (w > 500)
w = 500;
panelVideoPlayer.Width = w; // this.Width - (panelVideoPlayer.Left + 34);
labelVideoInfo.TextAlign = ContentAlignment.TopLeft;
labelVideoInfo.Left = checkBoxSyncListViewWithVideoWhilePlaying.Left + checkBoxSyncListViewWithVideoWhilePlaying.Width + 10;
}
}
else if (AudioWaveForm.Visible)
{
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
AudioWaveForm.Width = this.Width - (AudioWaveForm.Left + 34);
}
AudioWaveForm.Width = groupBoxVideo.Width - (AudioWaveForm.Left + 10);
checkBoxSyncListViewWithVideoWhilePlaying.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
panelWaveFormControls.Left = AudioWaveForm.Left;
trackBarWaveFormPosition.Left = panelWaveFormControls.Left + panelWaveFormControls.Width + 5;
@ -5751,14 +5752,37 @@ namespace Nikse.SubtitleEdit.Forms
TryToFindAndOpenVideoFile(Path.Combine(Path.GetDirectoryName(_fileName), Path.GetFileNameWithoutExtension(_fileName)));
}
private void MoveVideoUp()
{
if (splitContainer1.Panel2.Controls.Count == 0)
{
var control = panelVideoPlayer;
groupBoxVideo.Controls.Remove(control);
splitContainer1.Panel2.Controls.Add(control);
}
panelVideoPlayer.Top = 0;
panelVideoPlayer.Left = 0;
panelVideoPlayer.Height = splitContainer1.Panel2.Height - 2;
panelVideoPlayer.Width = splitContainer1.Panel2.Width - 2;
}
private void MoveVideoDown()
{
if (splitContainer1.Panel2.Controls.Count > 0)
{
var control = panelVideoPlayer;
splitContainer1.Panel2.Controls.Clear();
groupBoxVideo.Controls.Add(control);
}
panelVideoPlayer.Top = 26;
panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
panelVideoPlayer.Height = groupBoxVideo.Height - (panelVideoPlayer.Top + 5);
panelVideoPlayer.Width = groupBoxVideo.Width - (panelVideoPlayer.Left + 5);
}
private void Main_Resize(object sender, EventArgs e)
{
tabControlSubtitle.Width = this.Width - tabControlSubtitle.Left - 22;
if (groupBoxVideo.Visible)
ShowVideoPlayer();
else
HideVideoPlayer();
AudioWaveForm.Invalidate();
panelVideoPlayer.Invalidate();
}
private void PlayCurrent()
@ -6138,17 +6162,24 @@ namespace Nikse.SubtitleEdit.Forms
private void toolStripMenuItemAdjustAllTimes_Click(object sender, EventArgs e)
{
if (_subtitle != null && _subtitle.Paragraphs.Count > 1)
if (SubtitleListview1.SelectedItems.Count > 1)
{
mediaPlayer.Pause();
_showEarlierOrLater = new ShowEarlierLater();
SaveSubtitleListviewIndexes();
_showEarlierOrLater.Initialize(ShowEarlierOrLater, false);
_showEarlierOrLater.Show(this);
ShowSelectedLinesEarlierlaterToolStripMenuItemClick(null, null);
}
else
{
MessageBox.Show(_language.NoSubtitleLoaded, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
if (_subtitle != null && _subtitle.Paragraphs.Count > 1)
{
mediaPlayer.Pause();
_showEarlierOrLater = new ShowEarlierLater();
SaveSubtitleListviewIndexes();
_showEarlierOrLater.Initialize(ShowEarlierOrLater, false);
_showEarlierOrLater.ShowDialog(this);
}
else
{
MessageBox.Show(_language.NoSubtitleLoaded, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
}
@ -6369,27 +6400,28 @@ namespace Nikse.SubtitleEdit.Forms
if (toolStripButtonToogleVideo.Checked && toolStripButtonToogleWaveForm.Checked )
{
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
panelVideoPlayer.Left = AudioWaveForm.Left + AudioWaveForm.Width + 5;
//panelVideoPlayer.Left = AudioWaveForm.Left + AudioWaveForm.Width + 5;
}
else if (toolStripButtonToogleVideo.Checked)
{
panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
//panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
}
else
{
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
}
AudioWaveForm.Width = groupBoxVideo.Width - (AudioWaveForm.Left + 10);
panelWaveFormControls.Left = AudioWaveForm.Left;
this.Main_Resize(null, null);
labelVideoInfo.TextAlign = ContentAlignment.TopRight;
labelVideoInfo.Left = groupBoxVideo.Width - (labelVideoInfo.Width + 10);
if (toolStripButtonToogleVideo.Checked && !AudioWaveForm.Visible)
{
labelVideoInfo.TextAlign = ContentAlignment.TopLeft;
labelVideoInfo.Left = checkBoxSyncListViewWithVideoWhilePlaying.Left + checkBoxSyncListViewWithVideoWhilePlaying.Width + 10;
}
//labelVideoInfo.TextAlign = ContentAlignment.TopRight;
//labelVideoInfo.Left = groupBoxVideo.Width - (labelVideoInfo.Width + 10);
//if (toolStripButtonToogleVideo.Checked && !AudioWaveForm.Visible)
//{
//labelVideoInfo.TextAlign = ContentAlignment.TopLeft;
//labelVideoInfo.Left = checkBoxSyncListViewWithVideoWhilePlaying.Left + checkBoxSyncListViewWithVideoWhilePlaying.Width + 10;
//}
Refresh();
}
@ -7220,6 +7252,12 @@ namespace Nikse.SubtitleEdit.Forms
{
foreach (var update in updates)
{
if (!string.IsNullOrEmpty(update.Text))
{
if (!update.Text.Contains(Environment.NewLine))
update.Text = update.Text.Replace("\n", Environment.NewLine);
update.Text = update.Text.Replace("<br />", Environment.NewLine);
}
if (update.User.Ip != _networkSession.CurrentUser.Ip || update.User.UserName != _networkSession.CurrentUser.UserName)
{
if (update.Action == "USR")

View File

@ -33,6 +33,10 @@
this.tabControlSettings = new System.Windows.Forms.TabControl();
this.tabPageGenerel = new System.Windows.Forms.TabPage();
this.groupBoxMiscellaneous = new System.Windows.Forms.GroupBox();
this.panelSubtitleBackgroundColor = new System.Windows.Forms.Panel();
this.panelSubtitleFontColor = new System.Windows.Forms.Panel();
this.labelSubtitleFontBackgroundColor = new System.Windows.Forms.Label();
this.labelSubtitleFontColor = new System.Windows.Forms.Label();
this.comboBoxAutoBackup = new System.Windows.Forms.ComboBox();
this.labelAutoBackup = new System.Windows.Forms.Label();
this.checkBoxRememberSelectedLine = new System.Windows.Forms.CheckBox();
@ -227,7 +231,7 @@
// buttonOK
//
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.Location = new System.Drawing.Point(661, 434);
this.buttonOK.Location = new System.Drawing.Point(661, 456);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 21);
this.buttonOK.TabIndex = 0;
@ -238,7 +242,7 @@
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(740, 434);
this.buttonCancel.Location = new System.Drawing.Point(740, 456);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
this.buttonCancel.TabIndex = 1;
@ -257,7 +261,7 @@
this.tabControlSettings.Location = new System.Drawing.Point(13, 13);
this.tabControlSettings.Name = "tabControlSettings";
this.tabControlSettings.SelectedIndex = 0;
this.tabControlSettings.Size = new System.Drawing.Size(806, 415);
this.tabControlSettings.Size = new System.Drawing.Size(806, 437);
this.tabControlSettings.TabIndex = 2;
this.tabControlSettings.SelectedIndexChanged += new System.EventHandler(this.TabControlSettingsSelectedIndexChanged);
//
@ -268,13 +272,17 @@
this.tabPageGenerel.Location = new System.Drawing.Point(4, 22);
this.tabPageGenerel.Name = "tabPageGenerel";
this.tabPageGenerel.Padding = new System.Windows.Forms.Padding(3);
this.tabPageGenerel.Size = new System.Drawing.Size(798, 389);
this.tabPageGenerel.Size = new System.Drawing.Size(798, 411);
this.tabPageGenerel.TabIndex = 0;
this.tabPageGenerel.Text = "Generel";
this.tabPageGenerel.UseVisualStyleBackColor = true;
//
// groupBoxMiscellaneous
//
this.groupBoxMiscellaneous.Controls.Add(this.panelSubtitleBackgroundColor);
this.groupBoxMiscellaneous.Controls.Add(this.panelSubtitleFontColor);
this.groupBoxMiscellaneous.Controls.Add(this.labelSubtitleFontBackgroundColor);
this.groupBoxMiscellaneous.Controls.Add(this.labelSubtitleFontColor);
this.groupBoxMiscellaneous.Controls.Add(this.comboBoxAutoBackup);
this.groupBoxMiscellaneous.Controls.Add(this.labelAutoBackup);
this.groupBoxMiscellaneous.Controls.Add(this.checkBoxRememberSelectedLine);
@ -303,11 +311,47 @@
this.groupBoxMiscellaneous.Controls.Add(this.labelDefaultFrameRate);
this.groupBoxMiscellaneous.Location = new System.Drawing.Point(6, 121);
this.groupBoxMiscellaneous.Name = "groupBoxMiscellaneous";
this.groupBoxMiscellaneous.Size = new System.Drawing.Size(786, 262);
this.groupBoxMiscellaneous.Size = new System.Drawing.Size(786, 284);
this.groupBoxMiscellaneous.TabIndex = 0;
this.groupBoxMiscellaneous.TabStop = false;
this.groupBoxMiscellaneous.Text = "Miscellaneous";
//
// panelSubtitleBackgroundColor
//
this.panelSubtitleBackgroundColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelSubtitleBackgroundColor.Location = new System.Drawing.Point(180, 261);
this.panelSubtitleBackgroundColor.Name = "panelSubtitleBackgroundColor";
this.panelSubtitleBackgroundColor.Size = new System.Drawing.Size(46, 15);
this.panelSubtitleBackgroundColor.TabIndex = 35;
this.panelSubtitleBackgroundColor.Click += new System.EventHandler(this.panelSubtitleBackgroundColor_Click);
//
// panelSubtitleFontColor
//
this.panelSubtitleFontColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelSubtitleFontColor.Location = new System.Drawing.Point(180, 241);
this.panelSubtitleFontColor.Name = "panelSubtitleFontColor";
this.panelSubtitleFontColor.Size = new System.Drawing.Size(46, 15);
this.panelSubtitleFontColor.TabIndex = 34;
this.panelSubtitleFontColor.Click += new System.EventHandler(this.panelSubtitleFontColor_Click);
//
// labelSubtitleFontBackgroundColor
//
this.labelSubtitleFontBackgroundColor.AutoSize = true;
this.labelSubtitleFontBackgroundColor.Location = new System.Drawing.Point(15, 262);
this.labelSubtitleFontBackgroundColor.Name = "labelSubtitleFontBackgroundColor";
this.labelSubtitleFontBackgroundColor.Size = new System.Drawing.Size(151, 13);
this.labelSubtitleFontBackgroundColor.TabIndex = 33;
this.labelSubtitleFontBackgroundColor.Text = "Subtitle font background color";
//
// labelSubtitleFontColor
//
this.labelSubtitleFontColor.AutoSize = true;
this.labelSubtitleFontColor.Location = new System.Drawing.Point(15, 242);
this.labelSubtitleFontColor.Name = "labelSubtitleFontColor";
this.labelSubtitleFontColor.Size = new System.Drawing.Size(92, 13);
this.labelSubtitleFontColor.TabIndex = 32;
this.labelSubtitleFontColor.Text = "Subtitle font color";
//
// comboBoxAutoBackup
//
this.comboBoxAutoBackup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -500,7 +544,7 @@
// checkBoxSubtitleFontBold
//
this.checkBoxSubtitleFontBold.AutoSize = true;
this.checkBoxSubtitleFontBold.Location = new System.Drawing.Point(180, 222);
this.checkBoxSubtitleFontBold.Location = new System.Drawing.Point(180, 221);
this.checkBoxSubtitleFontBold.Name = "checkBoxSubtitleFontBold";
this.checkBoxSubtitleFontBold.Size = new System.Drawing.Size(47, 17);
this.checkBoxSubtitleFontBold.TabIndex = 10;
@ -897,7 +941,7 @@
this.tabPageVideoPlayer.Location = new System.Drawing.Point(4, 22);
this.tabPageVideoPlayer.Name = "tabPageVideoPlayer";
this.tabPageVideoPlayer.Padding = new System.Windows.Forms.Padding(3);
this.tabPageVideoPlayer.Size = new System.Drawing.Size(798, 389);
this.tabPageVideoPlayer.Size = new System.Drawing.Size(798, 411);
this.tabPageVideoPlayer.TabIndex = 2;
this.tabPageVideoPlayer.Text = "Video player";
this.tabPageVideoPlayer.UseVisualStyleBackColor = true;
@ -909,7 +953,7 @@
this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch);
this.groupBoxMainWindowVideoControls.Location = new System.Drawing.Point(7, 241);
this.groupBoxMainWindowVideoControls.Name = "groupBoxMainWindowVideoControls";
this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(785, 142);
this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(785, 164);
this.groupBoxMainWindowVideoControls.TabIndex = 15;
this.groupBoxMainWindowVideoControls.TabStop = false;
this.groupBoxMainWindowVideoControls.Text = "Main window video controls";
@ -1108,7 +1152,7 @@
this.tabPageWaveForm.Controls.Add(this.groupBoxWaveFormAppearence);
this.tabPageWaveForm.Location = new System.Drawing.Point(4, 22);
this.tabPageWaveForm.Name = "tabPageWaveForm";
this.tabPageWaveForm.Size = new System.Drawing.Size(798, 389);
this.tabPageWaveForm.Size = new System.Drawing.Size(798, 411);
this.tabPageWaveForm.TabIndex = 6;
this.tabPageWaveForm.Text = "Wave form";
this.tabPageWaveForm.UseVisualStyleBackColor = true;
@ -1119,7 +1163,7 @@
this.groupBox1.Controls.Add(this.labelWaveFormsFolderInfo);
this.groupBox1.Location = new System.Drawing.Point(6, 216);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(786, 170);
this.groupBox1.Size = new System.Drawing.Size(786, 192);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
//
@ -1164,6 +1208,7 @@
//
// panelWaveFormTextColor
//
this.panelWaveFormTextColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelWaveFormTextColor.Location = new System.Drawing.Point(138, 109);
this.panelWaveFormTextColor.Name = "panelWaveFormTextColor";
this.panelWaveFormTextColor.Size = new System.Drawing.Size(21, 20);
@ -1182,6 +1227,7 @@
//
// panelWaveFormGridColor
//
this.panelWaveFormGridColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelWaveFormGridColor.Location = new System.Drawing.Point(138, 135);
this.panelWaveFormGridColor.Name = "panelWaveFormGridColor";
this.panelWaveFormGridColor.Size = new System.Drawing.Size(21, 20);
@ -1200,6 +1246,7 @@
//
// panelWaveFormBackgroundColor
//
this.panelWaveFormBackgroundColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelWaveFormBackgroundColor.Location = new System.Drawing.Point(138, 82);
this.panelWaveFormBackgroundColor.Name = "panelWaveFormBackgroundColor";
this.panelWaveFormBackgroundColor.Size = new System.Drawing.Size(21, 20);
@ -1218,6 +1265,7 @@
//
// panelWaveFormColor
//
this.panelWaveFormColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelWaveFormColor.Location = new System.Drawing.Point(138, 55);
this.panelWaveFormColor.Name = "panelWaveFormColor";
this.panelWaveFormColor.Size = new System.Drawing.Size(21, 20);
@ -1236,6 +1284,7 @@
//
// panelWaveFormSelectedColor
//
this.panelWaveFormSelectedColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelWaveFormSelectedColor.Location = new System.Drawing.Point(138, 27);
this.panelWaveFormSelectedColor.Name = "panelWaveFormSelectedColor";
this.panelWaveFormSelectedColor.Size = new System.Drawing.Size(21, 20);
@ -1270,7 +1319,7 @@
this.tabPageTools.Location = new System.Drawing.Point(4, 22);
this.tabPageTools.Name = "tabPageTools";
this.tabPageTools.Padding = new System.Windows.Forms.Padding(3);
this.tabPageTools.Size = new System.Drawing.Size(798, 389);
this.tabPageTools.Size = new System.Drawing.Size(798, 411);
this.tabPageTools.TabIndex = 5;
this.tabPageTools.Text = "Tools";
this.tabPageTools.UseVisualStyleBackColor = true;
@ -1280,7 +1329,7 @@
this.groupBoxSpellCheck.Controls.Add(this.checkBoxSpellCheckAutoChangeNames);
this.groupBoxSpellCheck.Location = new System.Drawing.Point(7, 257);
this.groupBoxSpellCheck.Name = "groupBoxSpellCheck";
this.groupBoxSpellCheck.Size = new System.Drawing.Size(785, 126);
this.groupBoxSpellCheck.Size = new System.Drawing.Size(785, 148);
this.groupBoxSpellCheck.TabIndex = 4;
this.groupBoxSpellCheck.TabStop = false;
this.groupBoxSpellCheck.Text = "Spell check";
@ -1458,7 +1507,7 @@
this.tabPageWordLists.Location = new System.Drawing.Point(4, 22);
this.tabPageWordLists.Name = "tabPageWordLists";
this.tabPageWordLists.Padding = new System.Windows.Forms.Padding(3);
this.tabPageWordLists.Size = new System.Drawing.Size(798, 389);
this.tabPageWordLists.Size = new System.Drawing.Size(798, 411);
this.tabPageWordLists.TabIndex = 3;
this.tabPageWordLists.Text = "Word lists";
this.tabPageWordLists.UseVisualStyleBackColor = true;
@ -1473,7 +1522,7 @@
this.groupBoxWordLists.Controls.Add(this.comboBoxWordListLanguage);
this.groupBoxWordLists.Location = new System.Drawing.Point(6, 6);
this.groupBoxWordLists.Name = "groupBoxWordLists";
this.groupBoxWordLists.Size = new System.Drawing.Size(786, 377);
this.groupBoxWordLists.Size = new System.Drawing.Size(786, 399);
this.groupBoxWordLists.TabIndex = 2;
this.groupBoxWordLists.TabStop = false;
this.groupBoxWordLists.Text = "Word lists";
@ -1487,14 +1536,14 @@
this.groupBoxOcrFixList.Controls.Add(this.buttonAddOcrFix);
this.groupBoxOcrFixList.Location = new System.Drawing.Point(510, 43);
this.groupBoxOcrFixList.Name = "groupBoxOcrFixList";
this.groupBoxOcrFixList.Size = new System.Drawing.Size(264, 238);
this.groupBoxOcrFixList.Size = new System.Drawing.Size(264, 267);
this.groupBoxOcrFixList.TabIndex = 6;
this.groupBoxOcrFixList.TabStop = false;
this.groupBoxOcrFixList.Text = "OCR fix list";
//
// textBoxOcrFixValue
//
this.textBoxOcrFixValue.Location = new System.Drawing.Point(82, 208);
this.textBoxOcrFixValue.Location = new System.Drawing.Point(82, 238);
this.textBoxOcrFixValue.Name = "textBoxOcrFixValue";
this.textBoxOcrFixValue.Size = new System.Drawing.Size(74, 21);
this.textBoxOcrFixValue.TabIndex = 45;
@ -1515,7 +1564,7 @@
this.listBoxOcrFixList.FormattingEnabled = true;
this.listBoxOcrFixList.Location = new System.Drawing.Point(6, 16);
this.listBoxOcrFixList.Name = "listBoxOcrFixList";
this.listBoxOcrFixList.Size = new System.Drawing.Size(150, 186);
this.listBoxOcrFixList.Size = new System.Drawing.Size(150, 212);
this.listBoxOcrFixList.TabIndex = 40;
this.listBoxOcrFixList.SelectedIndexChanged += new System.EventHandler(this.ListBoxOcrFixListSelectedIndexChanged);
this.listBoxOcrFixList.Enter += new System.EventHandler(this.ListBoxSearchReset);
@ -1523,14 +1572,14 @@
//
// textBoxOcrFixKey
//
this.textBoxOcrFixKey.Location = new System.Drawing.Point(6, 208);
this.textBoxOcrFixKey.Location = new System.Drawing.Point(6, 238);
this.textBoxOcrFixKey.Name = "textBoxOcrFixKey";
this.textBoxOcrFixKey.Size = new System.Drawing.Size(74, 21);
this.textBoxOcrFixKey.TabIndex = 44;
//
// buttonAddOcrFix
//
this.buttonAddOcrFix.Location = new System.Drawing.Point(162, 206);
this.buttonAddOcrFix.Location = new System.Drawing.Point(162, 236);
this.buttonAddOcrFix.Name = "buttonAddOcrFix";
this.buttonAddOcrFix.Size = new System.Drawing.Size(75, 23);
this.buttonAddOcrFix.TabIndex = 46;
@ -1546,7 +1595,7 @@
this.groupBoxUserWordList.Controls.Add(this.buttonAddUserWord);
this.groupBoxUserWordList.Location = new System.Drawing.Point(259, 43);
this.groupBoxUserWordList.Name = "groupBoxUserWordList";
this.groupBoxUserWordList.Size = new System.Drawing.Size(241, 238);
this.groupBoxUserWordList.Size = new System.Drawing.Size(241, 267);
this.groupBoxUserWordList.TabIndex = 4;
this.groupBoxUserWordList.TabStop = false;
this.groupBoxUserWordList.Text = "User word list";
@ -1566,7 +1615,7 @@
this.listBoxUserWordLists.FormattingEnabled = true;
this.listBoxUserWordLists.Location = new System.Drawing.Point(3, 16);
this.listBoxUserWordLists.Name = "listBoxUserWordLists";
this.listBoxUserWordLists.Size = new System.Drawing.Size(150, 186);
this.listBoxUserWordLists.Size = new System.Drawing.Size(150, 212);
this.listBoxUserWordLists.TabIndex = 30;
this.listBoxUserWordLists.SelectedIndexChanged += new System.EventHandler(this.ListBoxUserWordListsSelectedIndexChanged);
this.listBoxUserWordLists.Enter += new System.EventHandler(this.ListBoxSearchReset);
@ -1574,7 +1623,7 @@
//
// textBoxUserWord
//
this.textBoxUserWord.Location = new System.Drawing.Point(3, 209);
this.textBoxUserWord.Location = new System.Drawing.Point(3, 238);
this.textBoxUserWord.Name = "textBoxUserWord";
this.textBoxUserWord.Size = new System.Drawing.Size(147, 21);
this.textBoxUserWord.TabIndex = 34;
@ -1582,7 +1631,7 @@
//
// buttonAddUserWord
//
this.buttonAddUserWord.Location = new System.Drawing.Point(156, 207);
this.buttonAddUserWord.Location = new System.Drawing.Point(156, 236);
this.buttonAddUserWord.Name = "buttonAddUserWord";
this.buttonAddUserWord.Size = new System.Drawing.Size(75, 23);
this.buttonAddUserWord.TabIndex = 36;
@ -1594,7 +1643,7 @@
//
this.groupBoxWordListLocation.Controls.Add(this.checkBoxNamesEtcOnline);
this.groupBoxWordListLocation.Controls.Add(this.textBoxNamesEtcOnline);
this.groupBoxWordListLocation.Location = new System.Drawing.Point(6, 287);
this.groupBoxWordListLocation.Location = new System.Drawing.Point(6, 316);
this.groupBoxWordListLocation.Name = "groupBoxWordListLocation";
this.groupBoxWordListLocation.Size = new System.Drawing.Size(774, 77);
this.groupBoxWordListLocation.TabIndex = 8;
@ -1627,7 +1676,7 @@
this.groupBoxNamesIgonoreLists.Controls.Add(this.buttonAddNamesEtc);
this.groupBoxNamesIgonoreLists.Location = new System.Drawing.Point(6, 43);
this.groupBoxNamesIgonoreLists.Name = "groupBoxNamesIgonoreLists";
this.groupBoxNamesIgonoreLists.Size = new System.Drawing.Size(241, 238);
this.groupBoxNamesIgonoreLists.Size = new System.Drawing.Size(241, 267);
this.groupBoxNamesIgonoreLists.TabIndex = 2;
this.groupBoxNamesIgonoreLists.TabStop = false;
this.groupBoxNamesIgonoreLists.Text = "Names/ignore lists";
@ -1647,7 +1696,7 @@
this.listBoxNamesEtc.FormattingEnabled = true;
this.listBoxNamesEtc.Location = new System.Drawing.Point(3, 16);
this.listBoxNamesEtc.Name = "listBoxNamesEtc";
this.listBoxNamesEtc.Size = new System.Drawing.Size(150, 186);
this.listBoxNamesEtc.Size = new System.Drawing.Size(150, 212);
this.listBoxNamesEtc.TabIndex = 20;
this.listBoxNamesEtc.SelectedIndexChanged += new System.EventHandler(this.ListBoxNamesEtcSelectedIndexChanged);
this.listBoxNamesEtc.Enter += new System.EventHandler(this.ListBoxSearchReset);
@ -1655,7 +1704,7 @@
//
// textBoxNameEtc
//
this.textBoxNameEtc.Location = new System.Drawing.Point(3, 212);
this.textBoxNameEtc.Location = new System.Drawing.Point(3, 241);
this.textBoxNameEtc.Name = "textBoxNameEtc";
this.textBoxNameEtc.Size = new System.Drawing.Size(151, 21);
this.textBoxNameEtc.TabIndex = 24;
@ -1663,7 +1712,7 @@
//
// buttonAddNamesEtc
//
this.buttonAddNamesEtc.Location = new System.Drawing.Point(160, 209);
this.buttonAddNamesEtc.Location = new System.Drawing.Point(160, 238);
this.buttonAddNamesEtc.Name = "buttonAddNamesEtc";
this.buttonAddNamesEtc.Size = new System.Drawing.Size(75, 23);
this.buttonAddNamesEtc.TabIndex = 26;
@ -1695,7 +1744,7 @@
this.tabPageSsaStyle.Location = new System.Drawing.Point(4, 22);
this.tabPageSsaStyle.Name = "tabPageSsaStyle";
this.tabPageSsaStyle.Padding = new System.Windows.Forms.Padding(3);
this.tabPageSsaStyle.Size = new System.Drawing.Size(798, 389);
this.tabPageSsaStyle.Size = new System.Drawing.Size(798, 411);
this.tabPageSsaStyle.TabIndex = 1;
this.tabPageSsaStyle.Text = "SSA style";
this.tabPageSsaStyle.UseVisualStyleBackColor = true;
@ -1709,7 +1758,7 @@
this.groupBoxSsaStyle.Controls.Add(this.buttonSSAChooseFont);
this.groupBoxSsaStyle.Location = new System.Drawing.Point(6, 6);
this.groupBoxSsaStyle.Name = "groupBoxSsaStyle";
this.groupBoxSsaStyle.Size = new System.Drawing.Size(786, 377);
this.groupBoxSsaStyle.Size = new System.Drawing.Size(786, 399);
this.groupBoxSsaStyle.TabIndex = 0;
this.groupBoxSsaStyle.TabStop = false;
this.groupBoxSsaStyle.Text = "Sub Station Alpha style";
@ -1770,7 +1819,7 @@
this.tabPageProxy.Location = new System.Drawing.Point(4, 22);
this.tabPageProxy.Name = "tabPageProxy";
this.tabPageProxy.Padding = new System.Windows.Forms.Padding(3);
this.tabPageProxy.Size = new System.Drawing.Size(798, 389);
this.tabPageProxy.Size = new System.Drawing.Size(798, 411);
this.tabPageProxy.TabIndex = 4;
this.tabPageProxy.Text = "Proxy";
this.tabPageProxy.UseVisualStyleBackColor = true;
@ -1782,7 +1831,7 @@
this.groupBoxProxySettings.Controls.Add(this.labelProxyAddress);
this.groupBoxProxySettings.Location = new System.Drawing.Point(6, 6);
this.groupBoxProxySettings.Name = "groupBoxProxySettings";
this.groupBoxProxySettings.Size = new System.Drawing.Size(786, 377);
this.groupBoxProxySettings.Size = new System.Drawing.Size(786, 399);
this.groupBoxProxySettings.TabIndex = 1;
this.groupBoxProxySettings.TabStop = false;
this.groupBoxProxySettings.Text = "Proxy server settings";
@ -1870,7 +1919,7 @@
// labelStatus
//
this.labelStatus.AutoSize = true;
this.labelStatus.Location = new System.Drawing.Point(12, 432);
this.labelStatus.Location = new System.Drawing.Point(10, 456);
this.labelStatus.Name = "labelStatus";
this.labelStatus.Size = new System.Drawing.Size(60, 13);
this.labelStatus.TabIndex = 3;
@ -1880,7 +1929,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(831, 464);
this.ClientSize = new System.Drawing.Size(831, 484);
this.Controls.Add(this.labelStatus);
this.Controls.Add(this.tabControlSettings);
this.Controls.Add(this.buttonCancel);
@ -2112,5 +2161,9 @@
private System.Windows.Forms.CheckBox checkBoxRememberSelectedLine;
private System.Windows.Forms.ComboBox comboBoxAutoBackup;
private System.Windows.Forms.Label labelAutoBackup;
private System.Windows.Forms.Panel panelSubtitleBackgroundColor;
private System.Windows.Forms.Panel panelSubtitleFontColor;
private System.Windows.Forms.Label labelSubtitleFontBackgroundColor;
private System.Windows.Forms.Label labelSubtitleFontColor;
}
}

View File

@ -63,6 +63,8 @@ namespace Nikse.SubtitleEdit.Forms
checkBoxAutoDetectAnsiEncoding.Checked = gs.AutoGuessAnsiEncoding;
comboBoxSubtitleFontSize.Text = gs.SubtitleFontSize.ToString();
checkBoxSubtitleFontBold.Checked = gs.SubtitleFontBold;
panelSubtitleFontColor.BackColor = gs.SubtitleFontColor;
panelSubtitleBackgroundColor.BackColor = gs.SubtitleBackgroundColor;
checkBoxRememberRecentFiles.Checked = gs.ShowRecentFiles;
checkBoxRememberRecentFiles_CheckedChanged(null, null);
checkBoxRememberSelectedLine.Checked = gs.RememberSelectedLine;
@ -178,6 +180,8 @@ namespace Nikse.SubtitleEdit.Forms
labelSubMaxLen.Text = language.SubtitleLineMaximumLength;
labelSubtitleFont.Text = language.SubtitleFont;
labelSubtitleFontSize.Text = language.SubtitleFontSize;
labelSubtitleFontColor.Text = language.SubtitleFontColor;
labelSubtitleFontBackgroundColor.Text = language.SubtitleBackgroundColor;
checkBoxSubtitleFontBold.Text = Configuration.Settings.Language.General.Bold;
checkBoxRememberRecentFiles.Text = language.RememberRecentFiles;
checkBoxReopenLastOpened.Text = language.StartWithLastFileLoaded;
@ -519,6 +523,8 @@ namespace Nikse.SubtitleEdit.Forms
gs.AutoGuessAnsiEncoding = checkBoxAutoDetectAnsiEncoding.Checked;
gs.SubtitleFontSize = int.Parse(comboBoxSubtitleFontSize.Text);
gs.SubtitleFontBold = checkBoxSubtitleFontBold.Checked;
gs.SubtitleFontColor = panelSubtitleFontColor.BackColor;
gs.SubtitleBackgroundColor = panelSubtitleBackgroundColor.BackColor;
gs.ShowRecentFiles = checkBoxRememberRecentFiles.Checked;
gs.RememberSelectedLine = checkBoxRememberSelectedLine.Checked;
gs.StartLoadLastFile = checkBoxReopenLastOpened.Checked;
@ -1302,5 +1308,32 @@ namespace Nikse.SubtitleEdit.Forms
checkBoxRememberSelectedLine.Enabled = checkBoxRememberRecentFiles.Checked;
}
private void buttonWaveFormSelectedColor_Click(object sender, MouseEventArgs e)
{
colorDialogSSAStyle.Color = panelWaveFormSelectedColor.BackColor;
if (colorDialogSSAStyle.ShowDialog() == DialogResult.OK)
{
panelWaveFormSelectedColor.BackColor = colorDialogSSAStyle.Color;
}
}
private void panelSubtitleFontColor_Click(object sender, EventArgs e)
{
colorDialogSSAStyle.Color = panelSubtitleFontColor.BackColor;
if (colorDialogSSAStyle.ShowDialog() == DialogResult.OK)
{
panelSubtitleFontColor.BackColor = colorDialogSSAStyle.Color;
}
}
private void panelSubtitleBackgroundColor_Click(object sender, EventArgs e)
{
colorDialogSSAStyle.Color = panelSubtitleBackgroundColor.BackColor;
if (colorDialogSSAStyle.ShowDialog() == DialogResult.OK)
{
panelSubtitleBackgroundColor.BackColor = colorDialogSSAStyle.Color;
}
}
}
}

View File

@ -990,6 +990,8 @@ namespace Nikse.SubtitleEdit.Logic
SubtitleLineMaximumLength = "Single line max. length",
SubtitleFont = "Subtitle font",
SubtitleFontSize = "Subtitle font size",
SubtitleFontColor = "Subtitle font color",
SubtitleBackgroundColor = "Subtitle background color",
RememberRecentFiles = "Remember recent files (for reopen)",
StartWithLastFileLoaded = "Start with last file loaded",
RememberSelectedLine = "Remember selected line",

View File

@ -927,6 +927,8 @@
public string SubtitleLineMaximumLength { get; set; }
public string SubtitleFont { get; set; }
public string SubtitleFontSize { get; set; }
public string SubtitleFontColor { get; set; }
public string SubtitleBackgroundColor { get; set; }
public string RememberRecentFiles { get; set; }
public string StartWithLastFileLoaded { get; set; }
public string RememberSelectedLine { get; set; }

View File

@ -59,7 +59,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
{
StartMilliseconds = (int)p.StartTime.TotalMilliseconds,
EndMilliseconds = (int)p.EndTime.TotalMilliseconds,
Text = p.Text
Text = p.Text.Replace(Environment.NewLine, "<br />")
});
}
@ -72,7 +72,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
{
StartMilliseconds = (int)p.StartTime.TotalMilliseconds,
EndMilliseconds = (int)p.EndTime.TotalMilliseconds,
Text = p.Text
Text = p.Text.Replace(Environment.NewLine, "<br />")
});
}
}
@ -103,7 +103,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
DateTime updateTime;
Subtitle = new Subtitle();
foreach (var sequence in _seWs.GetSubtitle(sessionKey, out tempFileName, out updateTime))
Subtitle.Paragraphs.Add(new Paragraph(sequence.Text, sequence.StartMilliseconds, sequence.EndMilliseconds));
Subtitle.Paragraphs.Add(new Paragraph(sequence.Text.Replace("<br />", Environment.NewLine), sequence.StartMilliseconds, sequence.EndMilliseconds));
FileName = tempFileName;
OriginalSubtitle = new Subtitle();
@ -111,7 +111,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
if (sequences != null)
{
foreach (var sequence in sequences)
OriginalSubtitle.Paragraphs.Add(new Paragraph(sequence.Text, sequence.StartMilliseconds, sequence.EndMilliseconds));
OriginalSubtitle.Paragraphs.Add(new Paragraph(sequence.Text.Replace("<br />", Environment.NewLine), sequence.StartMilliseconds, sequence.EndMilliseconds));
}
SessionId = sessionKey;
@ -155,7 +155,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
var sequences = _seWs.GetSubtitle(SessionId, out FileName, out _seWsLastUpdate);
foreach (var sequence in sequences)
{
Paragraph p = new Paragraph(sequence.Text, sequence.StartMilliseconds, sequence.EndMilliseconds);
Paragraph p = new Paragraph(sequence.Text.Replace("<br />", Environment.NewLine), sequence.StartMilliseconds, sequence.EndMilliseconds);
Subtitle.Paragraphs.Add(p);
}
Subtitle.Renumber(1);
@ -176,7 +176,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
public void SendChatMessage(string message)
{
_seWs.SendMessage(SessionId, message, CurrentUser);
_seWs.SendMessage(SessionId, message.Replace(Environment.NewLine, "<br />"), CurrentUser);
}
internal void UpdateLine(int index, Paragraph paragraph)
@ -185,7 +185,7 @@ namespace Nikse.SubtitleEdit.Logic.Networking
{
StartMilliseconds = (int)paragraph.StartTime.TotalMilliseconds,
EndMilliseconds = (int)paragraph.EndTime.TotalMilliseconds,
Text = paragraph.Text
Text = paragraph.Text.Replace(Environment.NewLine, "<br />")
}, CurrentUser);
AddToWsUserLog(CurrentUser, index, "UPD", true);
}
@ -281,6 +281,5 @@ namespace Nikse.SubtitleEdit.Logic.Networking
UpdateLog.Remove(removeThis);
}
}
}

View File

@ -211,12 +211,15 @@ namespace Nikse.SubtitleEdit.Logic
public string SubtitleFontName { get; set; }
public int SubtitleFontSize { get; set; }
public bool SubtitleFontBold { get; set; }
public Color SubtitleFontColor { get; set; }
public Color SubtitleBackgroundColor { get; set; }
public bool ShowRecentFiles { get; set; }
public bool RememberSelectedLine { get; set; }
public bool StartLoadLastFile { get; set; }
public bool StartRememberPositionAndSize { get; set; }
public string StartPosition { get; set; }
public string StartSize { get; set; }
public int StartListViewWidth { get; set; }
public bool StartInSourceView { get; set; }
public bool RemoveBlankLinesWhenOpening { get; set; }
public int SubtitleLineMaximumLength { get; set; }
@ -258,6 +261,8 @@ namespace Nikse.SubtitleEdit.Logic
SubtitleFontSize = 8;
SubtitleFontBold = false;
SubtitleFontColor = System.Drawing.Color.Black;
SubtitleBackgroundColor = System.Drawing.Color.White;
DefaultEncoding = "UTF-8";
AutoGuessAnsiEncoding = false;
ShowRecentFiles = true;
@ -542,6 +547,12 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("SubtitleFontBold");
if (subNode != null)
settings.General.SubtitleFontBold = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("SubtitleFontColor");
if (subNode != null)
settings.General.SubtitleFontColor = Color.FromArgb(Convert.ToInt32(subNode.InnerText));
subNode = node.SelectSingleNode("SubtitleBackgroundColor");
if (subNode != null)
settings.General.SubtitleBackgroundColor = Color.FromArgb(Convert.ToInt32(subNode.InnerText));
subNode = node.SelectSingleNode("ShowRecentFiles");
if (subNode != null)
settings.General.ShowRecentFiles = Convert.ToBoolean(subNode.InnerText);
@ -560,6 +571,9 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("StartSize");
if (subNode != null)
settings.General.StartSize = subNode.InnerText;
subNode = node.SelectSingleNode("StartListViewWidth");
if (subNode != null)
settings.General.StartListViewWidth = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("StartInSourceView");
if (subNode != null)
settings.General.StartInSourceView = Convert.ToBoolean(subNode.InnerText);
@ -886,12 +900,15 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("SubtitleFontName", settings.General.SubtitleFontName);
textWriter.WriteElementString("SubtitleFontSize", settings.General.SubtitleFontSize.ToString());
textWriter.WriteElementString("SubtitleFontBold", settings.General.SubtitleFontBold.ToString());
textWriter.WriteElementString("SubtitleFontColor", settings.General.SubtitleFontColor.ToArgb().ToString());
textWriter.WriteElementString("SubtitleBackgroundColor", settings.General.SubtitleBackgroundColor.ToArgb().ToString());
textWriter.WriteElementString("ShowRecentFiles", settings.General.ShowRecentFiles.ToString());
textWriter.WriteElementString("RememberSelectedLine", settings.General.RememberSelectedLine.ToString());
textWriter.WriteElementString("StartLoadLastFile", settings.General.StartLoadLastFile.ToString());
textWriter.WriteElementString("StartRememberPositionAndSize", settings.General.StartRememberPositionAndSize.ToString());
textWriter.WriteElementString("StartPosition", settings.General.StartPosition);
textWriter.WriteElementString("StartSize", settings.General.StartSize);
textWriter.WriteElementString("StartListViewWidth", settings.General.StartListViewWidth.ToString());
textWriter.WriteElementString("StartInSourceView", settings.General.StartInSourceView.ToString());
textWriter.WriteElementString("RemoveBlankLinesWhenOpening", settings.General.RemoveBlankLinesWhenOpening.ToString());
textWriter.WriteElementString("SubtitleLineMaximumLength", settings.General.SubtitleLineMaximumLength.ToString());

View File

@ -414,6 +414,9 @@ namespace Nikse.SubtitleEdit.Logic
control.Font = new System.Drawing.Font(gs.SubtitleFontName, gs.SubtitleFontSize, System.Drawing.FontStyle.Bold);
else
control.Font = new System.Drawing.Font(gs.SubtitleFontName, gs.SubtitleFontSize);
control.BackColor = gs.SubtitleBackgroundColor;
control.ForeColor = gs.SubtitleFontColor;
}
public static string RemoveHtmlTags(string s)