mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Remove unused "Netflix QC Result"
This commit is contained in:
parent
c14d683d31
commit
3dd8482c3e
@ -27214,8 +27214,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
string fileName = string.IsNullOrEmpty(_fileName) ? "UntitledSubtitle" : Path.GetFileNameWithoutExtension(_fileName);
|
||||
string language = LanguageAutoDetect.AutoDetectGoogleLanguage(_subtitle);
|
||||
var messages = new List<string>();
|
||||
var reportFiles = new List<string>();
|
||||
|
||||
var netflixController = new NetflixQualityController { Language = language, VideoFileName = _videoFileName };
|
||||
if (!string.IsNullOrEmpty(_videoFileName) && _videoInfo != null && _videoInfo.FramesPerSecond > 20)
|
||||
@ -27229,36 +27227,25 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
string reportPath = Path.GetTempPath() + fileName + "_NetflixQualityCheck.csv";
|
||||
netflixController.SaveCsv(reportPath);
|
||||
string msgFormat = string.Format("{0}\r\n\r\n{1}", string.Format(Configuration.Settings.Language.NetflixQualityCheck.FoundXIssues, netflixController.Records.Count),
|
||||
Configuration.Settings.Language.NetflixQualityCheck.ReportPrompt);
|
||||
messages.Add(string.Format(msgFormat, reportPath));
|
||||
reportFiles.Add(reportPath);
|
||||
using (var dialog = new NetflixQCResult(string.Join(Environment.NewLine, messages), reportFiles))
|
||||
if (!isSaving)
|
||||
{
|
||||
if (!isSaving)
|
||||
using (var form = new NetflixFixErrors(_subtitle, GetCurrentSubtitleFormat(), _fileName, _videoFileName))
|
||||
{
|
||||
using (var form = new NetflixFixErrors(_subtitle, GetCurrentSubtitleFormat(), _fileName, _videoFileName))
|
||||
if (form.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
if (form.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowStatus(string.Format(_language.SavedSubtitleX, _fileName) + " - " +
|
||||
string.Format(Configuration.Settings.Language.NetflixQualityCheck.FoundXIssues, netflixController.Records.Count));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowStatus(string.Format(_language.SavedSubtitleX, _fileName) + " - " +
|
||||
string.Format(Configuration.Settings.Language.NetflixQualityCheck.FoundXIssues, netflixController.Records.Count));
|
||||
}
|
||||
}
|
||||
else if (!isSaving)
|
||||
{
|
||||
messages.Add(Configuration.Settings.Language.NetflixQualityCheck.CheckOk);
|
||||
using (var dialog = new NetflixQCResult(string.Join(Environment.NewLine, messages), reportFiles))
|
||||
{
|
||||
dialog.ShowDialog(this);
|
||||
}
|
||||
MessageBox.Show("Netflix Quality Check found no issues.", "Netflix Quality Check");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,16 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
listViewFixes.Items.Add(item);
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (keyData == Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
|
102
src/Forms/NetflixQCResult.Designer.cs
generated
102
src/Forms/NetflixQCResult.Designer.cs
generated
@ -1,102 +0,0 @@
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
partial class NetflixQCResult
|
||||
{
|
||||
/// <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.btnOk = new System.Windows.Forms.Button();
|
||||
this.btnOpen = new System.Windows.Forms.Button();
|
||||
this.lnkLblText = new System.Windows.Forms.LinkLabel();
|
||||
this.lblText = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
this.btnOk.Location = new System.Drawing.Point(162, 64);
|
||||
this.btnOk.Name = "btnOk";
|
||||
this.btnOk.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOk.TabIndex = 0;
|
||||
this.btnOk.Text = "Ok";
|
||||
this.btnOk.UseVisualStyleBackColor = true;
|
||||
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
|
||||
//
|
||||
// btnOpen
|
||||
//
|
||||
this.btnOpen.Location = new System.Drawing.Point(46, 64);
|
||||
this.btnOpen.Name = "btnOpen";
|
||||
this.btnOpen.Size = new System.Drawing.Size(110, 23);
|
||||
this.btnOpen.TabIndex = 1;
|
||||
this.btnOpen.Text = "Open file location";
|
||||
this.btnOpen.UseVisualStyleBackColor = true;
|
||||
this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
|
||||
//
|
||||
// lnkLblText
|
||||
//
|
||||
this.lnkLblText.AutoSize = true;
|
||||
this.lnkLblText.Location = new System.Drawing.Point(12, 9);
|
||||
this.lnkLblText.Name = "lnkLblText";
|
||||
this.lnkLblText.Size = new System.Drawing.Size(55, 13);
|
||||
this.lnkLblText.TabIndex = 3;
|
||||
this.lnkLblText.TabStop = true;
|
||||
this.lnkLblText.Text = "linkLabel1";
|
||||
this.lnkLblText.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblText_LinkClicked);
|
||||
//
|
||||
// lblText
|
||||
//
|
||||
this.lblText.AutoSize = true;
|
||||
this.lblText.Location = new System.Drawing.Point(12, 9);
|
||||
this.lblText.Name = "lblText";
|
||||
this.lblText.Size = new System.Drawing.Size(35, 13);
|
||||
this.lblText.TabIndex = 4;
|
||||
this.lblText.Text = "label1";
|
||||
//
|
||||
// NetflixQCResult
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(296, 99);
|
||||
this.Controls.Add(this.lblText);
|
||||
this.Controls.Add(this.lnkLblText);
|
||||
this.Controls.Add(this.btnOpen);
|
||||
this.Controls.Add(this.btnOk);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Name = "NetflixQCResult";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Netflix quality check";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnOk;
|
||||
private System.Windows.Forms.Button btnOpen;
|
||||
private System.Windows.Forms.LinkLabel lnkLblText;
|
||||
private System.Windows.Forms.Label lblText;
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
using Nikse.SubtitleEdit.Logic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Nikse.SubtitleEdit.Core;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
public sealed partial class NetflixQCResult : Form
|
||||
{
|
||||
private string Message { get; }
|
||||
private List<string> FilesToLocate { get; }
|
||||
|
||||
public NetflixQCResult(string message, List<string> filesToLocate)
|
||||
{
|
||||
UiUtil.PreInitialize(this);
|
||||
InitializeComponent();
|
||||
UiUtil.FixFonts(this);
|
||||
|
||||
Message = message;
|
||||
FilesToLocate = filesToLocate;
|
||||
btnOk.Text = Configuration.Settings.Language.General.Ok;
|
||||
Text = Configuration.Settings.Language.Main.Menu.ToolBar.NetflixQualityCheck;
|
||||
btnOpen.Text = Configuration.Settings.Language.Main.Menu.ToolBar.Open;
|
||||
InitUi();
|
||||
}
|
||||
|
||||
private void InitUi()
|
||||
{
|
||||
bool isAnyLinks = FilesToLocate.Count != 0;
|
||||
Label usedLabel;
|
||||
|
||||
if (isAnyLinks)
|
||||
{
|
||||
lblText.Visible = false;
|
||||
lnkLblText.Text = Message;
|
||||
usedLabel = lnkLblText;
|
||||
|
||||
FilesToLocate
|
||||
.Where(Message.Contains)
|
||||
.ToList()
|
||||
.ForEach(s => lnkLblText.Links.Add(Message.IndexOf(s, StringComparison.Ordinal), s.Length, s));
|
||||
}
|
||||
else
|
||||
{
|
||||
lnkLblText.Visible = false;
|
||||
lblText.Text = Message;
|
||||
usedLabel = lblText;
|
||||
}
|
||||
|
||||
Width = Math.Max(usedLabel.Width + usedLabel.Left * 3, 300);
|
||||
|
||||
btnOpen.Visible = isAnyLinks;
|
||||
int buttonsPosMid;
|
||||
|
||||
if (isAnyLinks)
|
||||
{
|
||||
buttonsPosMid = btnOpen.Left + (btnOk.Left + btnOk.Width - btnOpen.Left) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonsPosMid = btnOk.Left + btnOk.Width / 2;
|
||||
}
|
||||
|
||||
btnOpen.Left = btnOpen.Left - buttonsPosMid + Width / 2;
|
||||
btnOk.Left = btnOk.Left - buttonsPosMid + Width / 2;
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
if (keyData == Keys.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
private void btnOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void btnOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileLocation(FilesToLocate[0]);
|
||||
Close();
|
||||
}
|
||||
|
||||
private void lblText_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
UiUtil.OpenURL((string)e.Link.LinkData);
|
||||
}
|
||||
|
||||
private void OpenFileLocation(string filePath)
|
||||
{
|
||||
if (Configuration.IsRunningOnWindows)
|
||||
{
|
||||
Process.Start("explorer.exe", $@"/select,""{filePath}"" ");
|
||||
}
|
||||
else
|
||||
{
|
||||
UiUtil.OpenFolder(System.IO.Path.GetDirectoryName(filePath));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -438,12 +438,6 @@
|
||||
<Compile Include="Forms\MultipleReplaceNewGroup.Designer.cs">
|
||||
<DependentUpon>MultipleReplaceNewGroup.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NetflixQCResult.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NetflixQCResult.Designer.cs">
|
||||
<DependentUpon>NetflixQCResult.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\NuendoProperties.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -1302,9 +1296,6 @@
|
||||
<EmbeddedResource Include="Forms\MultipleReplaceNewGroup.resx">
|
||||
<DependentUpon>MultipleReplaceNewGroup.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\NetflixQCResult.resx">
|
||||
<DependentUpon>NetflixQCResult.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\NuendoProperties.resx">
|
||||
<DependentUpon>NuendoProperties.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
Loading…
Reference in New Issue
Block a user