mirror of
https://github.com/imrayya/SRTto3Dsubtitles.git
synced 2026-09-21 10:17:27 +02:00
feat: modernize to .NET 8, split into Core/Cli/Gui (#3)
* feat: modernize to .NET 8, split into Core/Cli/Gui projects Core: shared converter library (cross-platform) Cli: console app with CLI args (cross-platform) Gui: WinForms app (Windows only, uses Core library) - Split into 3 projects sharing ConvertSRTto3DASS.Core - Rewrite SrtConverter with clean public API - Add CLI entry point with stdlib argument parsing - Redesign GUI with GroupBox layout, flat buttons, modern fonts - Update README with publish commands * feat: add drag-and-drop to GUI * refactor: rename GUI controls to proper PascalCase identifiers --------- Co-authored-by: imrayya <imrayya@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Company>imrayya</Company>
|
||||
<Copyright>Copyright © imrayya 2021-2026</Copyright>
|
||||
<AssemblyName>ConvertSRTto3DASS</AssemblyName>
|
||||
<RootNamespace>ConvertSRTto3DASS</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ConvertSRTto3DASS.Core\ConvertSRTto3DASS.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Generated
+197
@@ -0,0 +1,197 @@
|
||||
namespace ConvertSRTto3DASS;
|
||||
|
||||
partial class Form1
|
||||
{
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
private Label label_Title;
|
||||
private GroupBox groupBox_File;
|
||||
private Label label_InputFile;
|
||||
private TextBox textBox_InputFile;
|
||||
private Button button_BrowseInput;
|
||||
private Label label_OutputFile;
|
||||
private TextBox textBox_OutputFile;
|
||||
private Button button_BrowseOutput;
|
||||
private GroupBox groupBox_Mode;
|
||||
private Label label_Mode;
|
||||
private ComboBox comboBox_Mode;
|
||||
private GroupBox groupBox_Resolution;
|
||||
private Label label_ResX;
|
||||
private NumericUpDown numericUpDown_ResX;
|
||||
private Label label_ResY;
|
||||
private NumericUpDown numericUpDown_ResY;
|
||||
private Label label_BaseResX;
|
||||
private NumericUpDown numericUpDown_BaseResX;
|
||||
private Label label_BaseResY;
|
||||
private NumericUpDown numericUpDown_BaseResY;
|
||||
private GroupBox groupBox_Settings;
|
||||
private Label label_FontSize;
|
||||
private NumericUpDown numericUpDown_FontSize;
|
||||
private Label label_OffsetX;
|
||||
private NumericUpDown numericUpDown_OffsetX;
|
||||
private Label label_BottomOffset;
|
||||
private NumericUpDown numericUpDown_BottomOffset;
|
||||
private Label label_SbsSideMargin;
|
||||
private NumericUpDown numericUpDown_SbsSideMargin;
|
||||
private Label label_OuTopMargin;
|
||||
private NumericUpDown numericUpDown_OuTopMargin;
|
||||
private Label label_VerticalMargin;
|
||||
private NumericUpDown numericUpDown_VerticalMargin;
|
||||
private Button button_Convert;
|
||||
private TextBox textBox_Status;
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && components != null)
|
||||
components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
var segoe = new Font("Segoe UI", 9f);
|
||||
|
||||
SuspendLayout();
|
||||
|
||||
// ---- Title ----
|
||||
label_Title = new Label
|
||||
{
|
||||
Text = "SRT to 3D Subtitles",
|
||||
Font = new Font("Segoe UI", 14f, FontStyle.Bold),
|
||||
ForeColor = Color.FromArgb(30, 30, 30),
|
||||
Location = new Point(20, 15),
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
// ---- File section ----
|
||||
groupBox_File = new GroupBox
|
||||
{
|
||||
Text = "Files",
|
||||
Font = segoe,
|
||||
Location = new Point(20, 60),
|
||||
Size = new Size(1040, 80)
|
||||
};
|
||||
label_InputFile = new Label { Text = "Input SRT:", Font = segoe, Location = new Point(15, 25), AutoSize = true };
|
||||
textBox_InputFile = new TextBox { Location = new Point(100, 22), Size = new Size(780, 23), ReadOnly = true };
|
||||
button_BrowseInput = new Button { Text = "Browse...", Location = new Point(890, 20), Size = new Size(90, 25), Font = segoe, FlatStyle = FlatStyle.Flat };
|
||||
label_OutputFile = new Label { Text = "Output ASS:", Font = segoe, Location = new Point(15, 55), AutoSize = true };
|
||||
textBox_OutputFile = new TextBox { Location = new Point(100, 52), Size = new Size(780, 23), ReadOnly = true };
|
||||
button_BrowseOutput = new Button { Text = "Browse...", Location = new Point(890, 50), Size = new Size(90, 25), Font = segoe, FlatStyle = FlatStyle.Flat };
|
||||
groupBox_File.Controls.AddRange([label_InputFile, textBox_InputFile, button_BrowseInput, label_OutputFile, textBox_OutputFile, button_BrowseOutput]);
|
||||
|
||||
// ---- Mode section ----
|
||||
groupBox_Mode = new GroupBox
|
||||
{
|
||||
Text = "3D Mode",
|
||||
Font = segoe,
|
||||
Location = new Point(20, 150),
|
||||
Size = new Size(320, 60)
|
||||
};
|
||||
label_Mode = new Label { Text = "Format:", Font = segoe, Location = new Point(15, 22), AutoSize = true };
|
||||
comboBox_Mode = new ComboBox
|
||||
{
|
||||
Location = new Point(85, 19),
|
||||
Size = new Size(210, 25),
|
||||
Font = segoe,
|
||||
DropDownStyle = ComboBoxStyle.DropDownList
|
||||
};
|
||||
comboBox_Mode.Items.AddRange(["SBS (Side-by-Side)", "OU (Over-Under)", "RG (Red-Green)"]);
|
||||
groupBox_Mode.Controls.AddRange([label_Mode, comboBox_Mode]);
|
||||
|
||||
// ---- Resolution section ----
|
||||
groupBox_Resolution = new GroupBox
|
||||
{
|
||||
Text = "Resolution",
|
||||
Font = segoe,
|
||||
Location = new Point(355, 150),
|
||||
Size = new Size(320, 60)
|
||||
};
|
||||
label_ResX = new Label { Text = "Output:", Font = segoe, Location = new Point(15, 22), AutoSize = true };
|
||||
numericUpDown_ResX = new NumericUpDown { Location = new Point(65, 20), Size = new Size(80, 23), Minimum = 1, Maximum = 10000, Value = 1280 };
|
||||
label_ResY = new Label { Text = "x", Font = segoe, Location = new Point(150, 22), AutoSize = true };
|
||||
numericUpDown_ResY = new NumericUpDown { Location = new Point(165, 20), Size = new Size(80, 23), Minimum = 1, Maximum = 10000, Value = 720 };
|
||||
label_BaseResX = new Label { Text = "Base:", Font = segoe, Location = new Point(255, 22), AutoSize = true };
|
||||
numericUpDown_BaseResX = new NumericUpDown { Location = new Point(290, 20), Size = new Size(80, 23), Minimum = 1, Maximum = 10000, Value = 1280 };
|
||||
label_BaseResY = new Label { Text = "x", Font = segoe, Location = new Point(375, 22), AutoSize = true };
|
||||
numericUpDown_BaseResY = new NumericUpDown { Location = new Point(390, 20), Size = new Size(80, 23), Minimum = 1, Maximum = 10000, Value = 720 };
|
||||
groupBox_Resolution.Controls.AddRange([label_ResX, numericUpDown_ResX, label_ResY, numericUpDown_ResY, label_BaseResX, numericUpDown_BaseResX, label_BaseResY, numericUpDown_BaseResY]);
|
||||
|
||||
// ---- Settings section ----
|
||||
groupBox_Settings = new GroupBox
|
||||
{
|
||||
Text = "Settings",
|
||||
Font = segoe,
|
||||
Location = new Point(20, 220),
|
||||
Size = new Size(1040, 120)
|
||||
};
|
||||
|
||||
var col1 = 15;
|
||||
var col2 = 160;
|
||||
var col3 = 310;
|
||||
var col4 = 460;
|
||||
var col5 = 610;
|
||||
var col6 = 760;
|
||||
var row = 25;
|
||||
var rowStep = 30;
|
||||
|
||||
label_FontSize = new Label { Text = "Font Size:", Font = segoe, Location = new Point(col1, row), AutoSize = true };
|
||||
numericUpDown_FontSize = new NumericUpDown { Location = new Point(col2, row - 2), Size = new Size(80, 23), Minimum = 1, Maximum = 200, Value = 16 };
|
||||
label_OffsetX = new Label { Text = "Offset X:", Font = segoe, Location = new Point(col3, row), AutoSize = true };
|
||||
numericUpDown_OffsetX = new NumericUpDown { Location = new Point(col4, row - 2), Size = new Size(80, 23), Minimum = 0, Maximum = 1000, Value = 4 };
|
||||
label_BottomOffset = new Label { Text = "Bottom Offset:", Font = segoe, Location = new Point(col5, row), AutoSize = true };
|
||||
numericUpDown_BottomOffset = new NumericUpDown { Location = new Point(col6, row - 2), Size = new Size(80, 23), Minimum = 0, Maximum = 1000, Value = 18 };
|
||||
row += rowStep;
|
||||
|
||||
label_SbsSideMargin = new Label { Text = "SBS Margin:", Font = segoe, Location = new Point(col1, row), AutoSize = true };
|
||||
numericUpDown_SbsSideMargin = new NumericUpDown { Location = new Point(col2, row - 2), Size = new Size(80, 23), Minimum = 0, Maximum = 5000, Value = 640 };
|
||||
label_OuTopMargin = new Label { Text = "OU Margin:", Font = segoe, Location = new Point(col3, row), AutoSize = true };
|
||||
numericUpDown_OuTopMargin = new NumericUpDown { Location = new Point(col4, row - 2), Size = new Size(80, 23), Minimum = 0, Maximum = 5000, Value = 385 };
|
||||
label_VerticalMargin = new Label { Text = "V Margin:", Font = segoe, Location = new Point(col5, row), AutoSize = true };
|
||||
numericUpDown_VerticalMargin = new NumericUpDown { Location = new Point(col6, row - 2), Size = new Size(80, 23), Minimum = 0, Maximum = 5000, Value = 25 };
|
||||
|
||||
groupBox_Settings.Controls.AddRange([
|
||||
label_FontSize, numericUpDown_FontSize, label_OffsetX, numericUpDown_OffsetX, label_BottomOffset, numericUpDown_BottomOffset,
|
||||
label_SbsSideMargin, numericUpDown_SbsSideMargin, label_OuTopMargin, numericUpDown_OuTopMargin, label_VerticalMargin, numericUpDown_VerticalMargin
|
||||
]);
|
||||
|
||||
// ---- Convert button ----
|
||||
button_Convert = new Button
|
||||
{
|
||||
Text = "Convert",
|
||||
Font = new Font("Segoe UI", 10f, FontStyle.Bold),
|
||||
Location = new Point(20, 355),
|
||||
Size = new Size(140, 36),
|
||||
FlatStyle = FlatStyle.Flat,
|
||||
BackColor = Color.FromArgb(0, 120, 215),
|
||||
ForeColor = Color.White,
|
||||
FlatAppearance = { BorderSize = 0 }
|
||||
};
|
||||
|
||||
// ---- Status ----
|
||||
textBox_Status = new TextBox
|
||||
{
|
||||
Location = new Point(20, 405),
|
||||
Size = new Size(1040, 180),
|
||||
Multiline = true,
|
||||
ReadOnly = true,
|
||||
ScrollBars = ScrollBars.Vertical,
|
||||
Font = new Font("Consolas", 8.5f),
|
||||
BackColor = Color.FromArgb(245, 245, 245)
|
||||
};
|
||||
|
||||
// ---- Form ----
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1080, 610);
|
||||
MinimumSize = new Size(1100, 650);
|
||||
FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
MaximizeBox = false;
|
||||
AllowDrop = true;
|
||||
Text = "SRT to 3D Subtitles";
|
||||
Font = segoe;
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
|
||||
Controls.AddRange([label_Title, groupBox_File, groupBox_Mode, groupBox_Resolution, groupBox_Settings, button_Convert, textBox_Status]);
|
||||
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
using System.IO;
|
||||
|
||||
namespace ConvertSRTto3DASS;
|
||||
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
comboBox_Mode.SelectedIndex = 0;
|
||||
UpdateModeUI();
|
||||
|
||||
// Drag-and-drop
|
||||
DragEnter += (s, e) =>
|
||||
{
|
||||
if (e.Data!.GetDataPresent(DataFormats.FileDrop))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
};
|
||||
|
||||
DragDrop += (s, e) =>
|
||||
{
|
||||
var files = (string[])e.Data!.GetData(DataFormats.FileDrop)!;
|
||||
if (files.Length > 0 && files[0].EndsWith(".srt", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
textBox_InputFile.Text = files[0];
|
||||
if (string.IsNullOrWhiteSpace(textBox_OutputFile.Text))
|
||||
textBox_OutputFile.Text = Path.ChangeExtension(files[0], ".ass");
|
||||
AppendStatus("Dropped: " + files[0]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void button_BrowseInput_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var ofd = new OpenFileDialog
|
||||
{
|
||||
Filter = "SRT files (*.srt)|*.srt|All files (*.*)|*.*",
|
||||
Title = "Select input SRT file"
|
||||
};
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
textBox_InputFile.Text = ofd.FileName;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(textBox_OutputFile.Text))
|
||||
textBox_OutputFile.Text = Path.ChangeExtension(ofd.FileName, ".ass");
|
||||
|
||||
AppendStatus("Selected input file: " + ofd.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
private void button_BrowseOutput_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var sfd = new SaveFileDialog
|
||||
{
|
||||
Filter = "ASS files (*.ass)|*.ass|All files (*.*)|*.*",
|
||||
Title = "Select output ASS file",
|
||||
DefaultExt = "ass"
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(textBox_InputFile.Text))
|
||||
{
|
||||
sfd.FileName = Path.GetFileNameWithoutExtension(textBox_InputFile.Text) + ".ass";
|
||||
sfd.InitialDirectory = Path.GetDirectoryName(textBox_InputFile.Text);
|
||||
}
|
||||
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
textBox_OutputFile.Text = sfd.FileName;
|
||||
AppendStatus("Selected output file: " + sfd.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
private void comboBox_Mode_SelectedIndexChanged(object sender, EventArgs e) => UpdateModeUI();
|
||||
|
||||
private string GetSelectedModeValue()
|
||||
{
|
||||
var selected = comboBox_Mode.SelectedItem?.ToString() ?? "sbs";
|
||||
var spaceIndex = selected.IndexOf(' ');
|
||||
return spaceIndex > 0 ? selected[..spaceIndex].Trim().ToLowerInvariant() : selected.Trim().ToLowerInvariant();
|
||||
}
|
||||
|
||||
private void button_Convert_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
textBox_Status.Clear();
|
||||
|
||||
var inputPath = textBox_InputFile.Text.Trim();
|
||||
var outputPath = textBox_OutputFile.Text.Trim();
|
||||
var mode = GetSelectedModeValue();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(inputPath))
|
||||
{
|
||||
MessageBox.Show("Please select an input SRT file.", "Missing Input", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!File.Exists(inputPath))
|
||||
{
|
||||
MessageBox.Show("The selected input file does not exist.", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(outputPath))
|
||||
{
|
||||
outputPath = Path.ChangeExtension(inputPath, ".ass");
|
||||
textBox_OutputFile.Text = outputPath;
|
||||
}
|
||||
|
||||
var options = new ConversionOptions
|
||||
{
|
||||
InputPath = inputPath,
|
||||
OutputPath = outputPath,
|
||||
Mode = mode,
|
||||
ResX = (int)numericUpDown_ResX.Value,
|
||||
ResY = (int)numericUpDown_ResY.Value,
|
||||
BaseResX = (int)numericUpDown_BaseResX.Value,
|
||||
BaseResY = (int)numericUpDown_BaseResY.Value,
|
||||
FontSize = (int)numericUpDown_FontSize.Value,
|
||||
OffsetX = (int)numericUpDown_OffsetX.Value,
|
||||
BottomOffset = (int)numericUpDown_BottomOffset.Value,
|
||||
SbsSideMargin = (int)numericUpDown_SbsSideMargin.Value,
|
||||
OuTopMargin = (int)numericUpDown_OuTopMargin.Value,
|
||||
VerticalMargin = (int)numericUpDown_VerticalMargin.Value
|
||||
};
|
||||
|
||||
AppendStatus("Starting conversion...");
|
||||
AppendStatus($"Input: {options.InputPath}");
|
||||
AppendStatus($"Output: {options.OutputPath}");
|
||||
AppendStatus($"Mode: {options.Mode}");
|
||||
AppendStatus($"Resolution: {options.ResX}x{options.ResY}");
|
||||
AppendStatus($"Base resolution: {options.BaseResX}x{options.BaseResY}");
|
||||
AppendStatus($"Font size: {options.FontSize}");
|
||||
|
||||
var result = SrtConverter.Convert(options);
|
||||
|
||||
AppendStatus($"Parsed: {result.SubtitleCount} subtitle blocks");
|
||||
AppendStatus("Conversion complete.");
|
||||
MessageBox.Show("Conversion complete.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AppendStatus($"ERROR: {ex.Message}");
|
||||
MessageBox.Show(ex.Message, "Conversion Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateModeUI()
|
||||
{
|
||||
var mode = GetSelectedModeValue();
|
||||
|
||||
numericUpDown_OffsetX.Enabled = mode == "rg";
|
||||
label_OffsetX.Enabled = mode == "rg";
|
||||
numericUpDown_BottomOffset.Enabled = mode == "rg";
|
||||
label_BottomOffset.Enabled = mode == "rg";
|
||||
numericUpDown_SbsSideMargin.Enabled = mode == "sbs";
|
||||
label_SbsSideMargin.Enabled = mode == "sbs";
|
||||
numericUpDown_OuTopMargin.Enabled = mode == "ou";
|
||||
label_OuTopMargin.Enabled = mode == "ou";
|
||||
}
|
||||
|
||||
private void AppendStatus(string message)
|
||||
{
|
||||
if (textBox_Status.TextLength > 0)
|
||||
textBox_Status.AppendText(Environment.NewLine);
|
||||
|
||||
textBox_Status.AppendText(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=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>
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace ConvertSRTto3DASS;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ConvertSRTto3DASS.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConvertSRTto3DASSGUI.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ConvertSRTto3DASS.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Reference in New Issue
Block a user