초기 커밋.

This commit is contained in:
2025-02-03 11:02:48 +09:00
parent a7d46f415f
commit fe9aa0799f
2334 changed files with 674826 additions and 0 deletions

View File

@@ -0,0 +1,238 @@
namespace DDUtilityApp.ETC
{
partial class FrmTIbcoConfig
{
/// <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.panel1 = new System.Windows.Forms.Panel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tboxFilename = new System.Windows.Forms.TextBox();
this.btnSave = new System.Windows.Forms.Button();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.panel2 = new System.Windows.Forms.Panel();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.splitContainer1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(800, 450);
this.panel1.TabIndex = 0;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tboxFilename);
this.splitContainer1.Panel1.Controls.Add(this.btnSave);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 51;
this.splitContainer1.TabIndex = 0;
//
// tboxFilename
//
this.tboxFilename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tboxFilename.Location = new System.Drawing.Point(129, 14);
this.tboxFilename.Name = "tboxFilename";
this.tboxFilename.Size = new System.Drawing.Size(659, 21);
this.tboxFilename.TabIndex = 1;
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(12, 12);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(111, 23);
this.btnSave.TabIndex = 0;
this.btnSave.Text = "Save";
this.btnSave.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.panel2);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(3);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.panel3);
this.splitContainer2.Size = new System.Drawing.Size(800, 395);
this.splitContainer2.SplitterDistance = 411;
this.splitContainer2.TabIndex = 0;
//
// panel2
//
this.panel2.Controls.Add(this.textBox1);
this.panel2.Controls.Add(this.label1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(3, 3);
this.panel2.Name = "panel2";
this.panel2.Padding = new System.Windows.Forms.Padding(1);
this.panel2.Size = new System.Drawing.Size(405, 389);
this.panel2.TabIndex = 1;
//
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(1, 27);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(403, 361);
this.textBox1.TabIndex = 1;
//
// label1
//
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.label1.Location = new System.Drawing.Point(1, 1);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(2);
this.label1.Size = new System.Drawing.Size(403, 26);
this.label1.TabIndex = 0;
this.label1.Text = "Original";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// panel3
//
this.panel3.Controls.Add(this.panel4);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Padding = new System.Windows.Forms.Padding(3);
this.panel3.Size = new System.Drawing.Size(385, 395);
this.panel3.TabIndex = 2;
//
// panel4
//
this.panel4.Controls.Add(this.textBox2);
this.panel4.Controls.Add(this.label2);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 3);
this.panel4.Name = "panel4";
this.panel4.Padding = new System.Windows.Forms.Padding(1);
this.panel4.Size = new System.Drawing.Size(379, 389);
this.panel4.TabIndex = 2;
//
// textBox2
//
this.textBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox2.Location = new System.Drawing.Point(1, 27);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(377, 361);
this.textBox2.TabIndex = 1;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.label2.Location = new System.Drawing.Point(1, 1);
this.label2.Name = "label2";
this.label2.Padding = new System.Windows.Forms.Padding(2);
this.label2.Size = new System.Drawing.Size(377, 26);
this.label2.TabIndex = 0;
this.label2.Text = "Sort";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// FrmTIbcoConfig
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.panel1);
this.Name = "FrmTIbcoConfig";
this.Text = "FrmTIbcoConfig";
this.panel1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.TextBox tboxFilename;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
}
}

View File

@@ -0,0 +1,164 @@
using JWH;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
namespace DDUtilityApp.ETC
{
public partial class FrmTIbcoConfig : Form
{
public FrmTIbcoConfig()
{
InitializeComponent();
this.SetLayout();
this.SetEventHandler();
}
private void SetLayout()
{
this.textBox1.Font = new Font("돋움체", 9.0F);
this.textBox1.ScrollBars = ScrollBars.Both;
this.textBox2.Font = new Font("돋움체", 9.0F);
this.textBox2.ScrollBars = ScrollBars.Both;
}
private void SetEventHandler()
{
// DragDrop
this.textBox1.AllowDrop = true;
this.textBox1.DragDrop += Control_DragDrop;
this.textBox1.DragEnter += Control_DragEnter;
this.textBox2.AllowDrop = true;
this.textBox2.DragDrop += Control_DragDrop;
this.textBox2.DragEnter += Control_DragEnter;
this.btnSave.Click += Button1_Click;
}
private void Control_DragDrop(object sender, DragEventArgs e)
{
XLogger.Instance.Info(e);
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
if (files == null || files.Length < 1) return;
string fileName = files[0];
this.SetText(this.textBox1, fileName);
this.SetTextSort(this.textBox2, fileName);
}
private void Control_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}
private void Button1_Click(object sender, EventArgs e)
{
this.SaveDocument(this.textBox2, this.tboxFilename.Text);
}
private void SetText(object sender, string fileName)
{
TextBox textBox = sender as TextBox;
if (textBox == null) return;
textBox.Clear();
this.tboxFilename.Text = fileName;
XmlDocument document = new XmlDocument();
document.Load(fileName);
using (MemoryStream stream = new MemoryStream())
{
XmlWriterSettings settings = new XmlWriterSettings
{
Encoding = new UTF8Encoding(false),
Indent = true,
IndentChars = " ",
NewLineChars = Environment.NewLine,
NewLineHandling = NewLineHandling.Replace
};
using (XmlWriter writer = XmlWriter.Create(stream, settings))
{
document.Save(writer);
}
textBox.Text = Encoding.UTF8.GetString(stream.ToArray());
}
}
private void SetTextSort(object sender, string fileName)
{
TextBox textBox = sender as TextBox;
if (textBox == null) return;
this.tboxFilename.Text = fileName;
XmlDocument document = new XmlDocument();
document.Load(fileName);
XmlNodeList messageNameList = document.GetElementsByTagName("messageNameList");
List<XmlNode> list = new List<XmlNode>();
foreach (XmlNode nodeList in messageNameList)
{
foreach (XmlNode node in nodeList.ChildNodes)
list.Add(node);
nodeList.RemoveAll();
foreach (XmlNode node in list.OrderBy(e => e.Name))
nodeList.AppendChild(node);
}
using (MemoryStream stream = new MemoryStream())
{
XmlWriterSettings settings = new XmlWriterSettings
{
Encoding = new UTF8Encoding(false),
Indent = true,
IndentChars = " ",
NewLineChars = Environment.NewLine,
NewLineHandling = NewLineHandling.Replace
};
using (XmlWriter writer = XmlWriter.Create(stream, settings))
{
document.Save(writer);
}
textBox.Text = Encoding.UTF8.GetString(stream.ToArray());
}
}
private void SetText1(object sender, string fileName)
{
TextBox textBox = sender as TextBox;
if (textBox == null) return;
this.tboxFilename.Text = fileName;
XmlDocument document = new XmlDocument();
document.Load(fileName);
textBox.Text = document.GetBeautify();
}
private void SaveDocument(object sender, string filename)
{
TextBox textBox = sender as TextBox;
if (textBox == null) return;
using (StreamWriter writer = new StreamWriter(filename))
{
writer.Write(textBox.Text);
}
MessageBox.Show($"저장하였습니다.");
}
}
}

View File

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