mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Merge pull request #533 from xylographe/mpcrf
Try "K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" in GetMpcHcFileName()
This commit is contained in:
commit
4bd0ba0657
@ -782,7 +782,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
||||
}
|
||||
else
|
||||
{
|
||||
bmp.Save(fileName, imageFormat);
|
||||
bmp.Save(fileName, imageFormat);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1368,7 +1368,7 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
||||
if (param.Bitmap.Width == 720 && param.Bitmap.Width == 480) // NTSC
|
||||
return string.Format("{0:00};{1:00};{2:00};{3:00}", time.Hours, time.Minutes, time.Seconds, SubtitleFormat.MillisecondsToFramesMaxFrameRate(time.Milliseconds));
|
||||
|
||||
// drop frame
|
||||
// drop frame
|
||||
if (Math.Abs(param.FramesPerSeconds - 24 * (999 / 1000)) < 0.01 ||
|
||||
Math.Abs(param.FramesPerSeconds - 29 * (999 / 1000)) < 0.01 ||
|
||||
Math.Abs(param.FramesPerSeconds - 59 * (999 / 1000)) < 0.01)
|
||||
|
@ -482,7 +482,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
for (double zoomCounter = AudioVisualizer.ZoomMininum; zoomCounter <= AudioVisualizer.ZoomMaxinum + (0.001); zoomCounter += 0.1)
|
||||
{
|
||||
int percent = (int)Math.Round((zoomCounter * 100));
|
||||
ComboBoxZoomItem item = new ComboBoxZoomItem() { Text = percent + "%", ZoomFactor = zoomCounter };
|
||||
ComboBoxZoomItem item = new ComboBoxZoomItem { Text = percent + "%", ZoomFactor = zoomCounter };
|
||||
toolStripComboBoxWaveform.Items.Add(item);
|
||||
if (percent == 100)
|
||||
toolStripComboBoxWaveform.SelectedIndex = toolStripComboBoxWaveform.Items.Count - 1;
|
||||
@ -15676,7 +15676,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (update.Action == "MSG")
|
||||
{
|
||||
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry() { User = update.User, Message = update.Text });
|
||||
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry { User = update.User, Message = update.Text });
|
||||
if (_networkChat == null || _networkChat.IsDisposed)
|
||||
{
|
||||
_networkChat = new NetworkChat();
|
||||
|
@ -52,7 +52,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_networkSession.SendChatMessage(textBoxChat.Text.Trim());
|
||||
AddChatMessage(_networkSession.CurrentUser, textBoxChat.Text.Trim());
|
||||
listViewChat.EnsureVisible(listViewChat.Items.Count - 1);
|
||||
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry() { User = _networkSession.CurrentUser, Message = textBoxChat.Text.Trim() });
|
||||
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry { User = _networkSession.CurrentUser, Message = textBoxChat.Text.Trim() });
|
||||
}
|
||||
textBoxChat.Text = string.Empty;
|
||||
textBoxChat.Focus();
|
||||
|
@ -112,12 +112,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
checkBoxAutoWrapWhileTyping.Checked = gs.AutoWrapLineWhileTyping;
|
||||
textBoxShowLineBreaksAs.Text = gs.ListViewLineSeparatorString;
|
||||
|
||||
numericUpDownDurationMin.Value = Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds;
|
||||
numericUpDownDurationMax.Value = Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds;
|
||||
numericUpDownDurationMin.Value = gs.SubtitleMinimumDisplayMilliseconds;
|
||||
numericUpDownDurationMax.Value = gs.SubtitleMaximumDisplayMilliseconds;
|
||||
|
||||
if (Configuration.Settings.General.MininumMillisecondsBetweenLines >= numericUpDownMinGapMs.Minimum &&
|
||||
Configuration.Settings.General.MininumMillisecondsBetweenLines <= numericUpDownMinGapMs.Maximum)
|
||||
numericUpDownMinGapMs.Value = Configuration.Settings.General.MininumMillisecondsBetweenLines;
|
||||
if (gs.MininumMillisecondsBetweenLines >= numericUpDownMinGapMs.Minimum &&
|
||||
gs.MininumMillisecondsBetweenLines <= numericUpDownMinGapMs.Maximum)
|
||||
numericUpDownMinGapMs.Value = gs.MininumMillisecondsBetweenLines;
|
||||
|
||||
if (gs.VideoPlayer.Trim().Equals("VLC", StringComparison.OrdinalIgnoreCase) && LibVlcDynamic.IsInstalled)
|
||||
radioButtonVideoPlayerVLC.Checked = true;
|
||||
@ -141,7 +141,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC.MpcHc.GetMpcHcFileName() == null)
|
||||
radioButtonVideoPlayerMpcHc.Enabled = false;
|
||||
|
||||
textBoxVlcPath.Text = Configuration.Settings.General.VlcLocation;
|
||||
textBoxVlcPath.Text = gs.VlcLocation;
|
||||
textBoxVlcPath.Left = labelVideoPlayerVLC.Left + labelVideoPlayerVLC.Width + 5;
|
||||
textBoxVlcPath.Width = buttonVlcPathBrowse.Left - textBoxVlcPath.Left - 5;
|
||||
|
||||
@ -305,7 +305,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxTimeCodeMode.Items.Clear();
|
||||
comboBoxTimeCodeMode.Items.Add(language.TimeCodeModeHHMMSSMS);
|
||||
comboBoxTimeCodeMode.Items.Add(language.TimeCodeModeHHMMSSFF);
|
||||
if (Configuration.Settings.General.UseTimeFormatHHMMSSFF)
|
||||
if (gs.UseTimeFormatHHMMSSFF)
|
||||
comboBoxTimeCodeMode.SelectedIndex = 1;
|
||||
else
|
||||
comboBoxTimeCodeMode.SelectedIndex = 0;
|
||||
@ -329,7 +329,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
labelVideoPlayerMPlayer.Text = language.MPlayerDescription;
|
||||
radioButtonVideoPlayerVLC.Text = language.VlcMediaPlayer;
|
||||
labelVideoPlayerVLC.Text = language.VlcMediaPlayerDescription;
|
||||
Configuration.Settings.General.VlcLocation = textBoxVlcPath.Text;
|
||||
gs.VlcLocation = textBoxVlcPath.Text;
|
||||
|
||||
checkBoxVideoPlayerShowStopButton.Text = language.ShowStopButton;
|
||||
checkBoxVideoPlayerShowMuteButton.Text = language.ShowMuteButton;
|
||||
@ -462,8 +462,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxListViewDoubleClickEvent.Items.Add(language.MainListViewEditTextAndPause);
|
||||
comboBoxListViewDoubleClickEvent.Items.Add(language.MainListViewEditText);
|
||||
|
||||
if (Configuration.Settings.General.ListViewDoubleClickAction >= 0 && Configuration.Settings.General.ListViewDoubleClickAction < comboBoxListViewDoubleClickEvent.Items.Count)
|
||||
comboBoxListViewDoubleClickEvent.SelectedIndex = Configuration.Settings.General.ListViewDoubleClickAction;
|
||||
if (gs.ListViewDoubleClickAction >= 0 && gs.ListViewDoubleClickAction < comboBoxListViewDoubleClickEvent.Items.Count)
|
||||
comboBoxListViewDoubleClickEvent.SelectedIndex = gs.ListViewDoubleClickAction;
|
||||
|
||||
if (gs.AutoBackupSeconds == 60)
|
||||
comboBoxAutoBackup.SelectedIndex = 1;
|
||||
@ -474,7 +474,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else
|
||||
comboBoxAutoBackup.SelectedIndex = 0;
|
||||
|
||||
checkBoxCheckForUpdates.Checked = Configuration.Settings.General.CheckForUpdates;
|
||||
checkBoxCheckForUpdates.Checked = gs.CheckForUpdates;
|
||||
|
||||
if (gs.SpellChecker.Contains("word", StringComparison.OrdinalIgnoreCase))
|
||||
comboBoxSpellChecker.SelectedIndex = 1;
|
||||
@ -595,8 +595,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (Configuration.Settings.VideoControls.WaveformBorderHitMs >= numericUpDownWaveformBorderHitMs.Minimum &&
|
||||
Configuration.Settings.VideoControls.WaveformBorderHitMs <= numericUpDownWaveformBorderHitMs.Maximum)
|
||||
numericUpDownWaveformBorderHitMs.Value = Configuration.Settings.VideoControls.WaveformBorderHitMs;
|
||||
checkBoxUseFFmpeg.Checked = Configuration.Settings.General.UseFFmpegForWaveExtraction;
|
||||
textBoxFFmpegPath.Text = Configuration.Settings.General.FFmpegLocation;
|
||||
checkBoxUseFFmpeg.Checked = gs.UseFFmpegForWaveExtraction;
|
||||
textBoxFFmpegPath.Text = gs.FFmpegLocation;
|
||||
var generalNode = new TreeNode(Configuration.Settings.Language.General.GeneralText);
|
||||
generalNode.Nodes.Add(language.MergeSelectedLines + GetShortcutText(Configuration.Settings.Shortcuts.GeneralMergeSelectedLines));
|
||||
generalNode.Nodes.Add(language.MergeSelectedLinesOnlyFirstText + GetShortcutText(Configuration.Settings.Shortcuts.GeneralMergeSelectedLinesOnlyFirstText));
|
||||
@ -798,8 +798,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxShortcutKey.Left = labelShortcutKey.Left + labelShortcutKey.Width + 2;
|
||||
buttonUpdateShortcut.Left = comboBoxShortcutKey.Left + comboBoxShortcutKey.Width + 15;
|
||||
|
||||
_oldVlcLocation = Configuration.Settings.General.VlcLocation;
|
||||
_oldVlcLocationRelative = Configuration.Settings.General.VlcLocationRelative;
|
||||
_oldVlcLocation = gs.VlcLocation;
|
||||
_oldVlcLocationRelative = gs.VlcLocationRelative;
|
||||
|
||||
labelPlatform.Text = (IntPtr.Size * 8) + "-bit";
|
||||
}
|
||||
@ -1059,10 +1059,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else
|
||||
gs.AutoBackupSeconds = 0;
|
||||
|
||||
Configuration.Settings.General.CheckForUpdates = checkBoxCheckForUpdates.Checked;
|
||||
gs.CheckForUpdates = checkBoxCheckForUpdates.Checked;
|
||||
|
||||
if (comboBoxTimeCodeMode.Visible)
|
||||
Configuration.Settings.General.UseTimeFormatHHMMSSFF = comboBoxTimeCodeMode.SelectedIndex == 1;
|
||||
gs.UseTimeFormatHHMMSSFF = comboBoxTimeCodeMode.SelectedIndex == 1;
|
||||
|
||||
if (comboBoxSpellChecker.SelectedIndex == 1)
|
||||
gs.SpellChecker = "word";
|
||||
@ -1189,8 +1189,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Configuration.Settings.VideoControls.WaveformFocusOnMouseEnter = checkBoxWaveformHoverFocus.Checked;
|
||||
Configuration.Settings.VideoControls.WaveformListViewFocusOnMouseEnter = checkBoxListViewMouseEnterFocus.Checked;
|
||||
Configuration.Settings.VideoControls.WaveformBorderHitMs = Convert.ToInt32(numericUpDownWaveformBorderHitMs.Value);
|
||||
Configuration.Settings.General.UseFFmpegForWaveExtraction = checkBoxUseFFmpeg.Checked;
|
||||
Configuration.Settings.General.FFmpegLocation = textBoxFFmpegPath.Text;
|
||||
gs.UseFFmpegForWaveExtraction = checkBoxUseFFmpeg.Checked;
|
||||
gs.FFmpegLocation = textBoxFFmpegPath.Text;
|
||||
|
||||
//Main General
|
||||
foreach (TreeNode node in treeViewShortcuts.Nodes[0].Nodes)
|
||||
|
@ -350,7 +350,7 @@ https://github.com/SubtitleEdit/subtitleedit
|
||||
|
||||
private void buttonExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var saveFile = new SaveFileDialog() { Filter = "Text files (*.txt)|*.txt|NFO files (*.nfo)|*.nfo" };
|
||||
var saveFile = new SaveFileDialog { Filter = "Text files (*.txt)|*.txt|NFO files (*.nfo)|*.nfo" };
|
||||
if (saveFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
string fileName = saveFile.FileName;
|
||||
|
@ -1077,7 +1077,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
}
|
||||
|
||||
public void SaveAsTarga(string fileName)
|
||||
{
|
||||
{
|
||||
// TGA header (18-byte fixed header)
|
||||
byte[] header =
|
||||
{
|
||||
|
@ -274,6 +274,10 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
|
||||
if (File.Exists(path))
|
||||
return path;
|
||||
|
||||
path = @"C:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe";
|
||||
if (File.Exists(path))
|
||||
return path;
|
||||
|
||||
path = @"C:\Program Files (x86)\MPC-HC\mpc-hc64.exe";
|
||||
if (File.Exists(path))
|
||||
return path;
|
||||
|
Loading…
Reference in New Issue
Block a user