177 lines
5.3 KiB
C#
177 lines
5.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SL200_RTLogViewer.subForm
|
|
{
|
|
// Token: 0x0200001E RID: 30
|
|
public class TermsDefinitionForm : Form
|
|
{
|
|
// Token: 0x06000129 RID: 297 RVA: 0x00023A71 File Offset: 0x00021C71
|
|
public TermsDefinitionForm()
|
|
{
|
|
this.InitializeComponent();
|
|
this.GetTerms();
|
|
this.InitDataTable();
|
|
}
|
|
|
|
// Token: 0x0600012A RID: 298 RVA: 0x00023AA4 File Offset: 0x00021CA4
|
|
private void InitDataTable()
|
|
{
|
|
foreach (Term term in this.terms)
|
|
{
|
|
this.dataGridView1.Rows.Add(new object[]
|
|
{
|
|
term.Name,
|
|
term.FullName,
|
|
term.Han,
|
|
term.Description
|
|
});
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600012B RID: 299 RVA: 0x00023B30 File Offset: 0x00021D30
|
|
private void GetTerms()
|
|
{
|
|
try
|
|
{
|
|
using (FileStream fileStream = new FileStream(Application.StartupPath + "\\약어해설.txt", FileMode.Open, FileAccess.Read))
|
|
{
|
|
StreamReader streamReader = new StreamReader(fileStream, Encoding.Default);
|
|
string text = streamReader.ReadToEnd().Replace("\r\n", "");
|
|
streamReader.Close();
|
|
string[] array = text.Split(new char[]
|
|
{
|
|
';'
|
|
});
|
|
foreach (string text2 in array)
|
|
{
|
|
string[] array3 = text2.Split(new char[]
|
|
{
|
|
'|'
|
|
}, StringSplitOptions.None);
|
|
bool flag = array3.Length == 4;
|
|
if (flag)
|
|
{
|
|
Term item = new Term(array3[0], array3[1], array3[2], array3[3]);
|
|
this.terms.Add(item);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
}
|
|
this.terms.Sort((Term a, Term b) => a.Name.CompareTo(b.Name));
|
|
}
|
|
|
|
// Token: 0x0600012C RID: 300 RVA: 0x00023C5C File Offset: 0x00021E5C
|
|
private void TermsDefinitionForm_FormClosing(object sender, FormClosingEventArgs e)
|
|
{
|
|
bool flag = e.CloseReason == CloseReason.UserClosing;
|
|
if (flag)
|
|
{
|
|
e.Cancel = true;
|
|
base.Hide();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600012D RID: 301 RVA: 0x00023C88 File Offset: 0x00021E88
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
bool flag = disposing && this.components != null;
|
|
if (flag)
|
|
{
|
|
this.components.Dispose();
|
|
}
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
// Token: 0x0600012E RID: 302 RVA: 0x00023CC0 File Offset: 0x00021EC0
|
|
private void InitializeComponent()
|
|
{
|
|
this.dataGridView1 = new DataGridView();
|
|
this.Column1 = new DataGridViewTextBoxColumn();
|
|
this.Column2 = new DataGridViewTextBoxColumn();
|
|
this.Column3 = new DataGridViewTextBoxColumn();
|
|
this.Column4 = new DataGridViewTextBoxColumn();
|
|
((ISupportInitialize)this.dataGridView1).BeginInit();
|
|
base.SuspendLayout();
|
|
this.dataGridView1.AllowUserToAddRows = false;
|
|
this.dataGridView1.AllowUserToDeleteRows = false;
|
|
this.dataGridView1.AllowUserToResizeColumns = false;
|
|
this.dataGridView1.AllowUserToResizeRows = false;
|
|
this.dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
|
|
this.dataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
|
this.dataGridView1.Columns.AddRange(new DataGridViewColumn[]
|
|
{
|
|
this.Column1,
|
|
this.Column2,
|
|
this.Column3,
|
|
this.Column4
|
|
});
|
|
this.dataGridView1.Location = new Point(12, 12);
|
|
this.dataGridView1.MultiSelect = false;
|
|
this.dataGridView1.Name = "dataGridView1";
|
|
this.dataGridView1.ReadOnly = true;
|
|
this.dataGridView1.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
|
this.dataGridView1.RowTemplate.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
|
|
this.dataGridView1.RowTemplate.Height = 45;
|
|
this.dataGridView1.RowTemplate.Resizable = DataGridViewTriState.False;
|
|
this.dataGridView1.ScrollBars = ScrollBars.Vertical;
|
|
this.dataGridView1.Size = new Size(960, 638);
|
|
this.dataGridView1.TabIndex = 0;
|
|
this.Column1.HeaderText = "약어";
|
|
this.Column1.Name = "Column1";
|
|
this.Column1.ReadOnly = true;
|
|
this.Column2.HeaderText = "원어";
|
|
this.Column2.Name = "Column2";
|
|
this.Column2.ReadOnly = true;
|
|
this.Column2.Width = 200;
|
|
this.Column3.HeaderText = "한글명";
|
|
this.Column3.Name = "Column3";
|
|
this.Column3.ReadOnly = true;
|
|
this.Column3.Width = 307;
|
|
this.Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
|
this.Column4.HeaderText = "설명";
|
|
this.Column4.Name = "Column4";
|
|
this.Column4.ReadOnly = true;
|
|
base.AutoScaleMode = AutoScaleMode.Inherit;
|
|
base.ClientSize = new Size(984, 662);
|
|
base.Controls.Add(this.dataGridView1);
|
|
this.Font = new Font("맑은 고딕", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 129);
|
|
base.Name = "TermsDefinitionForm";
|
|
base.ShowInTaskbar = false;
|
|
this.Text = "약어 해설";
|
|
base.FormClosing += this.TermsDefinitionForm_FormClosing;
|
|
((ISupportInitialize)this.dataGridView1).EndInit();
|
|
base.ResumeLayout(false);
|
|
}
|
|
|
|
// Token: 0x04000208 RID: 520
|
|
private List<Term> terms = new List<Term>();
|
|
|
|
// Token: 0x04000209 RID: 521
|
|
private IContainer components = null;
|
|
|
|
// Token: 0x0400020A RID: 522
|
|
private DataGridView dataGridView1;
|
|
|
|
// Token: 0x0400020B RID: 523
|
|
private DataGridViewTextBoxColumn Column1;
|
|
|
|
// Token: 0x0400020C RID: 524
|
|
private DataGridViewTextBoxColumn Column2;
|
|
|
|
// Token: 0x0400020D RID: 525
|
|
private DataGridViewTextBoxColumn Column3;
|
|
|
|
// Token: 0x0400020E RID: 526
|
|
private DataGridViewTextBoxColumn Column4;
|
|
}
|
|
}
|