--User changes

-Add new variations waves22, waves23, waves42, waves3 and waves4 from user tatasz.
 -Add new stylesheet called lightdark.qss which gives a more modern look to the dark theme. Started by Michel Mastriani (triptychaos).
 --Included in the qmake and Wix installers.

--Code changes
 -Add a new C# project that attempts to convert Apophysis plugins to Fractorium style Variation classes. It's not entirely perfect, but gets most of the job done much more quickly than doing so manually.
 -Remove unused OpenCL functions from variations: elliptic, poincare, mask, bMod, bSwirl, bTransform, bCollide, farblur, popcorn2_3D, falloff, falloff2, falloff3, crackle2, waves2b, hypercrop, depth_gaussian2, depth_sine, depth_sine2, dust, asteria, vibration, vibration2, arctanh, smartshape, squares, starblur2, Truchet,.
 -Add code in EmberTester to automatically detect such unused functions.
This commit is contained in:
Person
2019-05-06 19:29:27 -07:00
parent 5faa8aa5bd
commit b4ba6d6a82
35 changed files with 2738 additions and 207 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
</startup>
</configuration>

122
Source/apoconv/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,122 @@
namespace apoconv
{
partial class Form1
{
/// <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.components = new System.ComponentModel.Container();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.AllowDrop = true;
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.textBox1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.textBox2);
this.splitContainer1.Size = new System.Drawing.Size(2871, 1225);
this.splitContainer1.SplitterDistance = 1389;
this.splitContainer1.TabIndex = 0;
//
// textBox1
//
this.textBox1.AllowDrop = true;
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.Location = new System.Drawing.Point(0, 0);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox1.Size = new System.Drawing.Size(1389, 1225);
this.textBox1.TabIndex = 0;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
this.textBox1.DragDrop += new System.Windows.Forms.DragEventHandler(this.textBox1_DragDrop);
this.textBox1.DragEnter += new System.Windows.Forms.DragEventHandler(this.textBox1_DragEnter);
//
// textBox2
//
this.textBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox2.Font = new System.Drawing.Font("Consolas", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox2.Location = new System.Drawing.Point(0, 0);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBox2.Size = new System.Drawing.Size(1478, 1225);
this.textBox2.TabIndex = 1;
//
// contextMenuStrip1
//
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(28, 28);
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
//
// Form1
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(2871, 1225);
this.Controls.Add(this.splitContainer1);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Apophysis to Fractorium Plugin Converter";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
}
}

597
Source/apoconv/Form1.cs Normal file
View File

@ -0,0 +1,597 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace apoconv
{
public partial class Form1 : Form
{
private List<ParamInfo> m_Params = new List<ParamInfo>();
private List<PrecalcParamInfo> m_StructParams = new List<PrecalcParamInfo>();
private List<string> m_PrecalcFuncLines = new List<string>();
private List<string> m_CalcFuncLines = new List<string>();
private List<string> m_FinalCalcFuncLines = new List<string>();
private readonly SortedDictionary<string, string> replacements = new SortedDictionary<string, string>()
{
{ "(double)", "" },
{ "(float)", "" },
{ "double", "T" },
{ "float", "T" },
//{ "0.0", "0" },
{ "0.5", "T(0.5)" },
{ "1.0", "T(1.0)" },
{ "0.1", "T(0.1)" },
{ "0.01", "T(0.01)" },
{ "0.001", "T(0.001)" },
{ "12.9898", "T(12.9898)" },
{ "78.233", "T(78.233)" },
{ "43758.5453", "T(43758.5453)" },
{ "FTx", "helper.In.x" },
{ "FTy", "helper.In.y" },
{ "FTz", "helper.In.z" },
{ "FPx", "helper.Out.x" },
{ "FPy", "helper.Out.y" },
{ "FPz", "helper.Out.z" },
{ "VVAR", "m_Weight" },
{ "floor(", "Floor<T>(" },
{ "cel(", "std::ceil(" },
{ "sin(", "std::sin(" },
{ "sinh(", "std::sinh(" },
{ "asin(", "std::asin(" },
{ "asinh(", "std::asinh(" },
{ "cos(", "std::cos(" },
{ "cosh(", "std::cosh(" },
{ "acos(", "std::acos(" },
{ "acosh(", "std::acosh(" },
{ "tan(", "std::tan(" },
{ "tanh(", "std::tanh(" },
{ "atan(", "std::atan(" },
{ "atan2(", "std::atan2(" },
{ "atanh(", "std::atanh(" },
{ "sqrt(", "std::sqrt(" },
{ "pow(", "std::pow(" },
{ "fabs(", "std::abs(" },
{ "sqr(", "Sqr(" },
{ "M_E", "T(M_E)" },
{ "M_LOG2E", "T(M_LOG2E)" },
{ "M_LOG10E", "T(M_LOG10E)" },
{ "M_LN2", "T(M_LN2)" },
{ "M_LN10", "T(M_LN10)" },
{ "M_PI", "T(M_PI)" },
{ "M_PI_2", "T(M_PI_2)" },
{ "M_PI_4", "T(M_PI_4)" },
{ "M_1_PI", "T(M_1_PI)" },
{ "M_2_PI", "T(M_2_PI)" },
{ "M_2_SQRTPI", "T(M_2_SQRTPI)" },
{ "M_SQRT2", "T(M_SQRT2)" },
{ "M_SQRT1_2", "T(M_SQRT1_2)" },
};
public Form1()
{
InitializeComponent();
//var lines = File.ReadAllLines("./waves4.cpp");
//textBox1.Lines = lines;
}
string Apo2Fractorium(string[] lines, bool doexport)
{
if (lines.Length == 0)
return "";
//doexport = false;
bool isparvar = false;
string pluginname = "";
string varclassname = "";
m_Params.Clear();
m_StructParams.Clear();
m_PrecalcFuncLines.Clear();
m_CalcFuncLines.Clear();
m_FinalCalcFuncLines.Clear();
bool structstart = false;
foreach (var line in lines)
{
if (line.Contains("APO_PLUGIN"))
{
var splits = line.Split(new char[] { '\"' });
if (splits.Length >= 1)
{
pluginname = splits[1];
varclassname = pluginname.FirstCharToUpper() + "Variation";
}
}
}
foreach (var line in lines)
{
if (line.Contains("typedef struct"))
{
structstart = true;
continue;
}
if (structstart)
{
if (line.Contains("{"))
continue;
if (line.Contains("}"))
break;
var splits = line.Trim().Split(new string[] { " ", ",", ";", "(", ")", "double", "float", "int", "unsigned", "long", "short", "char" }, StringSplitOptions.RemoveEmptyEntries);
foreach (var split in splits)
{
m_StructParams.Add(new PrecalcParamInfo
{
OrigName = split.Trim(),
Name = split.Trim(),
MemberName = "m_" + split.RemoveFirst(pluginname + "_").FirstCharToUpper().Replace("_", "").Trim(),
});
isparvar = true;
}
}
}
bool paramsstart = false;
foreach (var line in lines)
{
if (line.Contains("APO_VARIABLES("))
{
paramsstart = true;
continue;
}
if (paramsstart)
{
if (line.Contains(");"))
break;
var splits = line.Split(new char[] { '(', ')', ',' });
if (splits.Length > 2)
{
var pt = "";
var l = "";
var u = "";
var def = "";
if (line.Contains("VAR_INTEGER_RANGE"))
{
pt = "eParamType::INTEGER";
if (splits.Length >= 5)
{
l = splits[2].Trim();
u = splits[3].Trim();
def = splits[4].Trim();
}
}
else if (line.Contains("VAR_REAL_RANGE"))
{
pt = "eParamType::REAL";
if (splits.Length >= 5)
{
l = splits[2].Trim();
u = splits[3].Trim();
def = splits[4].Trim();
}
}
else if (line.Contains("VAR_REAL_CYCLE"))
{
pt = "eParamType::REAL_CYCLIC";
if (splits.Length >= 5)
{
l = splits[2].Trim();
u = splits[3].Trim();
def = splits[4].Trim();
}
}
else if (line.Contains("VAR_INTEGER_NONZERO"))
{
pt = "eParamType::INTEGER_NONZERO";
def = splits[2].Trim();
}
else if (line.Contains("INTEGER("))
{
pt = "eParamType::INTEGER";
def = splits[2].Trim();
}
else
def = splits[2].Trim();
m_Params.Add(new ParamInfo
{
Name = splits[1].Trim(),
MemberName = "m_" + splits[1].RemoveFirst(pluginname + "_").FirstCharToUpper().Replace("_", "").Trim(),
Default = def,
Lower = l,
Upper = u,
ParamType = pt
});
isparvar = true;
}
}
}
foreach (var param in m_Params)
{
if (m_StructParams.Any(pi => pi.Name == param.Name))
m_StructParams.RemoveAll(pi => pi.Name == param.Name);
}
foreach (var param in m_StructParams)
{
if (!param.Name.StartsWith(pluginname + "_"))
param.Name = pluginname + "_" + param.Name;
if (!param.Name.EndsWith("_precalc"))
param.Name = param.Name + "_precalc";
if (!param.MemberName.EndsWith("Precalc"))
param.MemberName += "Precalc";
}
bool calcstart = false;
int bracketcount = 0;
foreach (var line in lines)
{
if (line.Contains("PluginVarCalc"))
{
calcstart = true;
continue;
}
if (calcstart)
{
if (line.Contains("{"))
bracketcount++;
if (line.Contains("}"))
bracketcount--;
if (bracketcount <= 0)
break;
if (line != "{" && !line.Contains("return"))
{
var templine = line;
if (line.Contains("FPx") || line.Contains("FPy") || line.Contains("FPz"))
{
templine = templine.Replace("+=", "=");
templine = templine.Replace("-=", "= -(");//Will cause an error, forcing manual inspection
}
m_CalcFuncLines.Add(templine.Trim());
}
}
}
bool precalcstart = false;
bracketcount = 0;
foreach (var line in lines)
{
if (line.Contains("PluginVarPrepare"))
{
precalcstart = true;
continue;
}
if (precalcstart)
{
if (line.Contains("{"))
bracketcount++;
if (line.Contains("}"))
bracketcount--;
if (bracketcount <= 0)
break;
if (line != "{" && !line.Contains("return"))
{
var templine = line;
foreach (var rep in replacements)
templine = templine.Replace(rep.Key, rep.Value);
m_PrecalcFuncLines.Add(templine.Trim());
}
}
}
string final = "/// <summary>\r\n";
final += "/// " + pluginname + ".\r\n";
final += "/// </summary>\r\n";
final += "template <typename T>\r\n";
if (isparvar)
final += "class " + varclassname + " : public ParametricVariation<T>\r\n";
else
final += "class " + varclassname + " : public Variation<T>\r\n";
final += "{\r\n";
final += "public:\r\n";
if (isparvar)
final += "\t" + varclassname + "(T weight = 1.0) : ParametricVariation<T>(\"" + pluginname + "\", eVariationId::VAR_" + pluginname.ToUpper() + ", weight)\r\n";
else
final += "\t" + varclassname + "(T weight = 1.0) : Variation<T>(\"" + pluginname + "\", eVariationId::VAR_" + pluginname.ToUpper() + ", weight)\r\n";
final += "\t{\r\n";
if (isparvar)
final += "\t Init();\r\n";
final += "\t}\r\n\r\n";
if (isparvar)
final += "\tPARVARCOPY(" + varclassname + ")\r\n";
else
final += "\tVARCOPY(" + varclassname + ")\r\n";
final += "\r\n\tvirtual void Func(IteratorHelper<T>& helper, Point<T>& outPoint, QTIsaac<ISAAC_SIZE, ISAAC_INT>& rand) override\r\n";
final += "\t{\r\n";
foreach (var line in m_CalcFuncLines)
{
var templine = "\t\t" + line;
foreach (var rep in replacements)
templine = templine.Replace(rep.Key, rep.Value);
templine += "\r\n";
foreach (var param in m_Params)
templine = templine.Replace("VAR(" + param.Name + ")", param.MemberName);
foreach (var param in m_StructParams)
templine = templine.Replace("VAR(" + param.OrigName + ")", param.MemberName);
m_FinalCalcFuncLines.Add(templine.Trim());
final += templine;
}
final += "\t\thelper.Out.z = DefaultZ(helper);\r\n";
final += "\t}\r\n";
final += "\r\n\tvirtual string OpenCLString() const override\r\n";
final += "\t{\r\n";
final += "\t ostringstream ss, ss2;\r\n";
final += "\t intmax_t i = 0, varIndex = IndexInXform();\r\n";
final += "\t ss2 << \"_\" << XformIndexInEmber() << \"]\";\r\n";
final += "\t string index = ss2.str();\r\n";
final += "\t string weight = WeightDefineString();\r\n";
foreach (var param in m_Params)
{
final += "\t\tstring " + param.MemberName.Replace("m_", "").ToLower() + " = \"parVars[\" + ToUpper(m_Params[i++].Name()) + index;\r\n";
}
final += "\t\tss << \"\\t{\\n\"\r\n";
foreach (var line in m_FinalCalcFuncLines)
{
string templine;
if (line != "")
templine = "\t\t<< \"\\t\\t" + line + "\\n\"\r\n";
else
templine = "\t\t<< \"\\n\"\r\n";
templine = templine.Replace("\\tT ", "\\treal_t ").
Replace("helper.In.x", "vIn.x").
Replace("helper.In.y", "vIn.y").
Replace("helper.In.z", "vIn.z").
Replace("helper.Out.x", "vOut.x").
Replace("helper.Out.y", "vOut.y").
Replace("helper.Out.z", "vOut.z").
Replace("Floor<T>", "floor").
Replace("std::abs", "fabs").
Replace("m_Weight", "\" << weight << \"").
Replace("std::", "").
Replace("T(", "(real_t)(")
;
foreach (var param in m_Params)
{
if (templine.Contains(param.MemberName))
templine = templine.Replace(param.MemberName, "\" << " + param.MemberName.Substring(2).ToLower() + " << \"");
}
foreach (var param in m_StructParams)
{
if (templine.Contains(param.MemberName))
templine = templine.Replace(param.MemberName, "\" << " + param.MemberName.Substring(2).ToLower() + " << \"");
}
final += templine;
}
final += "\t\t<< \"\\t\\tvOut.z = \" << DefaultZCl()\r\n";
final += "\t\t<< \"\\t}\\n\";\r\n";
final += "\t\treturn ss.str();\r\n";
final += "\t}\r\n";
if (isparvar)
{
final += "\r\n\tvirtual void Precalc() override\r\n";
final += "\t{\r\n";
foreach (var line in m_PrecalcFuncLines)
{
var templine = line;
foreach (var param in m_Params)
templine = templine.Replace("VAR(" + param.Name + ")", param.MemberName);
foreach (var param in m_StructParams)
templine = templine.Replace("VAR(" + param.OrigName + ")", param.MemberName);
final += "\t\t" + templine + "\r\n";
}
final += "\t}\r\n";
}
final += "\r\n\tvirtual vector<string> OpenCLGlobalFuncNames() const override\r\n";
final += "\t{\r\n";
final += "\t return vector<string> { \"Zeps\" };\r\n";
final += "\t}\r\n";
bool saidprecalc = false;
if (isparvar)
{
final += "\r\nprotected:\r\n";
final += "\tvoid Init()\r\n";
final += "\t{\r\n";
final += "\t\tstring prefix = Prefix();\r\n";
final += "\t\tm_Params.clear();\r\n";
foreach (var param in m_Params)
final += "\t\tm_Params.push_back(ParamWithName<T>(&" + param.MemberName
+ ", prefix + \""
+ param.Name
+ (param.Default != "0" && param.Default != "0.0" && param.Default != "" || param.ParamType != "" ?
"\", T(" + param.Default + ")"
:
"\"")
+ (param.ParamType != "" ? ", " + param.ParamType : "")
+ (param.Lower != "" ? ", T(" + param.Lower + ")" : "")
+ (param.Upper != "" ? ", T(" + param.Upper + ")" : "")
+ "));\r\n";
foreach (var param in m_StructParams)
{
final += "\t\tm_Params.push_back(ParamWithName<T>(true, &" + param.MemberName
+ ", prefix + \""
+ param.Name + "\"));" + (!saidprecalc ? "//Precalc." : "") + "\r\n";
saidprecalc = true;
}
final += "\t}\r\n";
final += "\r\nprivate:\r\n";
foreach (var param in m_Params)
final += "\tT " + param.MemberName + ";\r\n";
saidprecalc = false;
foreach (var param in m_StructParams)
{
final += "\tT " + param.MemberName + ";" + (!saidprecalc ? "//Precalc." : "") + "\r\n";
saidprecalc = true;
}
}
final += "};\r\n\r\n";
if (doexport)
{
if (isparvar)
final += "MAKEPREPOSTPARVAR(" + pluginname.FirstCharToUpper() + ", " + pluginname + ", " + pluginname.ToUpper() + ")\r\n";
else
final += "MAKEPREPOSTVAR(" + pluginname.FirstCharToUpper() + ", " + pluginname + ", " + pluginname.ToUpper() + ")\r\n";
final += "EXPORTPREPOSTREGVAR(" + pluginname.FirstCharToUpper() + ", T) \\\r\n";
final += "ADDPREPOSTREGVAR(" + pluginname.FirstCharToUpper() + ")\r\n\r\n";
}
return final;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
textBox2.Text = Apo2Fractorium(textBox1.Lines, true);
}
private void textBox1_DragDrop(object sender, DragEventArgs e)
{
textBox1.TextChanged -= textBox1_TextChanged;
string final = "";
List<string> tb1lines = new List<string>();
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (var file in files)
{
var lines = File.ReadAllLines(file);
tb1lines.AddRange(lines.ToList());
final += Apo2Fractorium(lines, true);
}
textBox1.Lines = tb1lines.ToArray();
textBox2.Text = final;
}
textBox1.TextChanged += textBox1_TextChanged;
}
private void textBox1_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Copy;
}
}
public class ParamInfo
{
public string Name = "";
public string MemberName = "";
public string Default = "";
public string Lower = "";
public string Upper = "";
public string ParamType = "";
}
public class PrecalcParamInfo : ParamInfo
{
public string OrigName = "";
}
public static class StringExtensions
{
public static string FirstCharToUpper(this string input)
{
switch (input)
{
case null: throw new ArgumentNullException(nameof(input));
case "": throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input));
default: return input.First().ToString().ToUpper() + input.Substring(1);
}
}
public static string RemoveFirst(this string input, string removeString)
{
int index = input.IndexOf(removeString);
return (index < 0)
? input
: input.Remove(index, removeString.Length);
}
}
}

123
Source/apoconv/Form1.resx Normal file
View File

@ -0,0 +1,123 @@
<?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>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

22
Source/apoconv/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace apoconv
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("apoconv")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("apoconv")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4f78c421-8985-4411-8ffd-b0f323f857be")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -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 apoconv.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("apoconv.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;
}
}
}
}

View File

@ -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>

View File

@ -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 apoconv.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;
}
}
}
}

View File

@ -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>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4F78C421-8985-4411-8FFD-B0F323F857BE}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>apoconv</RootNamespace>
<AssemblyName>apoconv</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>