302 lines
9.8 KiB
C#
302 lines
9.8 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
using Microsoft.Win32;
|
|
using SL200_RealtimeLogViewer.RealtimeLog;
|
|
using SL200_RTLogViewer.Properties;
|
|
using SL200_RTLogViewer.subForm;
|
|
|
|
namespace SL200_RTLogViewer
|
|
{
|
|
// Token: 0x02000003 RID: 3
|
|
public class Form1 : Form
|
|
{
|
|
// Token: 0x06000014 RID: 20 RVA: 0x00003A80 File Offset: 0x00001C80
|
|
public Form1()
|
|
{
|
|
this.InitializeComponent();
|
|
}
|
|
|
|
// Token: 0x06000015 RID: 21 RVA: 0x00003AB0 File Offset: 0x00001CB0
|
|
private void button1_Click_1(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
RealtimelogForm realtimelogForm = new RealtimelogForm();
|
|
Form1.logOn = false;
|
|
realtimelogForm.FormBorderStyle = FormBorderStyle.None;
|
|
realtimelogForm.TopLevel = false;
|
|
realtimelogForm.TopMost = true;
|
|
this.mainpanel.Controls.Add(realtimelogForm);
|
|
realtimelogForm.Dock = DockStyle.Fill;
|
|
this.ShowChildForm(realtimelogForm);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show("실시간 뷰어 기능을 사용하려면 프로그램 폴더내에 \n WinPcap을 설치해야 합니다. ", " 알림 ");
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000016 RID: 22 RVA: 0x00003B30 File Offset: 0x00001D30
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
Form1.logOn = true;
|
|
this.savedlogForm.FormBorderStyle = FormBorderStyle.None;
|
|
this.savedlogForm.TopLevel = false;
|
|
this.savedlogForm.TopMost = true;
|
|
this.mainpanel.Controls.Add(this.savedlogForm);
|
|
this.savedlogForm.Dock = DockStyle.Fill;
|
|
this.ShowChildForm(this.savedlogForm);
|
|
}
|
|
|
|
// Token: 0x06000017 RID: 23 RVA: 0x00003B9C File Offset: 0x00001D9C
|
|
private void ShowChildForm(Form childForm)
|
|
{
|
|
bool flag = childForm.Equals(this._activeForm);
|
|
if (!flag)
|
|
{
|
|
bool flag2 = this._activeForm != null;
|
|
if (flag2)
|
|
{
|
|
this._activeForm.Hide();
|
|
}
|
|
this._activeForm = childForm;
|
|
this._activeForm.Show();
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000018 RID: 24 RVA: 0x00003BE8 File Offset: 0x00001DE8
|
|
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
|
|
{
|
|
this.savedlogForm.Close();
|
|
base.Dispose();
|
|
}
|
|
|
|
// Token: 0x06000019 RID: 25 RVA: 0x00003BFE File Offset: 0x00001DFE
|
|
private void Form1_Load(object sender, EventArgs e)
|
|
{
|
|
TrackInfo.SetInfo();
|
|
this.button2_Click(sender, e);
|
|
}
|
|
|
|
// Token: 0x0600001A RID: 26 RVA: 0x00003C10 File Offset: 0x00001E10
|
|
public void ReSetFontSize(Control.ControlCollection ctrls)
|
|
{
|
|
float num = 1f;
|
|
using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop\\WindowMetrics"))
|
|
{
|
|
bool flag = registryKey != null;
|
|
if (flag)
|
|
{
|
|
object value = registryKey.GetValue("AppliedDPI");
|
|
bool flag2 = value != null;
|
|
if (flag2)
|
|
{
|
|
int num2 = (int)value;
|
|
num = (float)num2 / 96f;
|
|
}
|
|
}
|
|
}
|
|
bool flag3 = (double)num == 1.25;
|
|
if (flag3)
|
|
{
|
|
this.SetAllControlsFontSize(base.Controls, 1.27f);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600001B RID: 27 RVA: 0x00003CB0 File Offset: 0x00001EB0
|
|
private void SetAllControlsFontSize(Control.ControlCollection ctrls, float scale)
|
|
{
|
|
foreach (object obj in ctrls)
|
|
{
|
|
Control control = (Control)obj;
|
|
bool flag = control.Controls != null;
|
|
if (flag)
|
|
{
|
|
this.SetAllControlsFontSize(control.Controls, scale);
|
|
}
|
|
bool flag2 = control != null;
|
|
if (flag2)
|
|
{
|
|
Font font = control.Font;
|
|
control.Font = new Font(font.Name, font.Size / scale);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600001C RID: 28 RVA: 0x00003D50 File Offset: 0x00001F50
|
|
private void button3_Click(object sender, EventArgs e)
|
|
{
|
|
this.mmiMsgForm.FormBorderStyle = FormBorderStyle.None;
|
|
this.mmiMsgForm.TopLevel = false;
|
|
this.mmiMsgForm.TopMost = true;
|
|
this.mainpanel.Controls.Add(this.mmiMsgForm);
|
|
this.mmiMsgForm.Dock = DockStyle.Fill;
|
|
this.ShowChildForm(this.mmiMsgForm);
|
|
}
|
|
|
|
// Token: 0x0600001D RID: 29 RVA: 0x00003DB8 File Offset: 0x00001FB8
|
|
private void button4_Click(object sender, EventArgs e)
|
|
{
|
|
TermsDefinitionForm termsDefinitionForm = new TermsDefinitionForm();
|
|
termsDefinitionForm.Show();
|
|
}
|
|
|
|
// Token: 0x0600001E RID: 30 RVA: 0x00003DD4 File Offset: 0x00001FD4
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
bool flag = disposing && this.components != null;
|
|
if (flag)
|
|
{
|
|
this.components.Dispose();
|
|
}
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
// Token: 0x0600001F RID: 31 RVA: 0x00003E0C File Offset: 0x0000200C
|
|
private void InitializeComponent()
|
|
{
|
|
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form1));
|
|
this.panel1 = new Panel();
|
|
this.button4 = new Button();
|
|
this.button3 = new Button();
|
|
this.button1 = new Button();
|
|
this.button2 = new Button();
|
|
this.mainpanel = new Panel();
|
|
this.panel1.SuspendLayout();
|
|
base.SuspendLayout();
|
|
this.panel1.AutoSize = true;
|
|
this.panel1.Controls.Add(this.button4);
|
|
this.panel1.Controls.Add(this.button3);
|
|
this.panel1.Controls.Add(this.button1);
|
|
this.panel1.Controls.Add(this.button2);
|
|
this.panel1.Dock = DockStyle.Top;
|
|
this.panel1.Location = new Point(0, 0);
|
|
this.panel1.Margin = new Padding(3, 4, 3, 4);
|
|
this.panel1.Name = "panel1";
|
|
this.panel1.Size = new Size(1530, 70);
|
|
this.panel1.TabIndex = 2;
|
|
this.button4.AutoSize = true;
|
|
this.button4.BackColor = Color.Transparent;
|
|
this.button4.Font = new Font("나눔고딕 ExtraBold", 15.75f, FontStyle.Bold, GraphicsUnit.Point, 129);
|
|
this.button4.Image = (Image)componentResourceManager.GetObject("button4.Image");
|
|
this.button4.ImageAlign = ContentAlignment.MiddleLeft;
|
|
this.button4.Location = new Point(591, 4);
|
|
this.button4.Margin = new Padding(3, 4, 3, 4);
|
|
this.button4.Name = "button4";
|
|
this.button4.Size = new Size(168, 61);
|
|
this.button4.TabIndex = 4;
|
|
this.button4.Text = "약어 설명";
|
|
this.button4.TextAlign = ContentAlignment.MiddleRight;
|
|
this.button4.UseVisualStyleBackColor = false;
|
|
this.button4.Click += this.button4_Click;
|
|
this.button3.AutoSize = true;
|
|
this.button3.BackColor = Color.Transparent;
|
|
this.button3.Font = new Font("나눔고딕 ExtraBold", 15.75f, FontStyle.Bold, GraphicsUnit.Point, 129);
|
|
this.button3.Image = (Image)componentResourceManager.GetObject("button3.Image");
|
|
this.button3.ImageAlign = ContentAlignment.MiddleLeft;
|
|
this.button3.Location = new Point(396, 4);
|
|
this.button3.Margin = new Padding(3, 4, 3, 4);
|
|
this.button3.Name = "button3";
|
|
this.button3.Size = new Size(192, 61);
|
|
this.button3.TabIndex = 3;
|
|
this.button3.Text = "메세지 뷰어";
|
|
this.button3.TextAlign = ContentAlignment.MiddleRight;
|
|
this.button3.UseVisualStyleBackColor = false;
|
|
this.button3.Click += this.button3_Click;
|
|
this.button1.AutoSize = true;
|
|
this.button1.BackColor = Color.Transparent;
|
|
this.button1.Font = new Font("맑은 고딕", 15.75f, FontStyle.Bold, GraphicsUnit.Point, 129);
|
|
this.button1.Image = Resources.realtime;
|
|
this.button1.ImageAlign = ContentAlignment.MiddleLeft;
|
|
this.button1.Location = new Point(3, 4);
|
|
this.button1.Margin = new Padding(3, 4, 3, 4);
|
|
this.button1.Name = "button1";
|
|
this.button1.Size = new Size(195, 62);
|
|
this.button1.TabIndex = 1;
|
|
this.button1.Text = "실시간 뷰어";
|
|
this.button1.TextAlign = ContentAlignment.MiddleRight;
|
|
this.button1.UseVisualStyleBackColor = false;
|
|
this.button1.Click += this.button1_Click_1;
|
|
this.button2.AutoSize = true;
|
|
this.button2.BackColor = Color.Transparent;
|
|
this.button2.Font = new Font("맑은 고딕", 15.75f, FontStyle.Bold, GraphicsUnit.Point, 129);
|
|
this.button2.Image = Resources.saved;
|
|
this.button2.ImageAlign = ContentAlignment.MiddleLeft;
|
|
this.button2.Location = new Point(201, 4);
|
|
this.button2.Margin = new Padding(3, 4, 3, 4);
|
|
this.button2.Name = "button2";
|
|
this.button2.Size = new Size(192, 61);
|
|
this.button2.TabIndex = 2;
|
|
this.button2.Text = "LOG 뷰어";
|
|
this.button2.TextAlign = ContentAlignment.MiddleRight;
|
|
this.button2.UseVisualStyleBackColor = false;
|
|
this.button2.Click += this.button2_Click;
|
|
this.mainpanel.AutoSize = true;
|
|
this.mainpanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
|
this.mainpanel.Dock = DockStyle.Fill;
|
|
this.mainpanel.Location = new Point(0, 70);
|
|
this.mainpanel.Margin = new Padding(3, 4, 3, 4);
|
|
this.mainpanel.Name = "mainpanel";
|
|
this.mainpanel.Size = new Size(1530, 852);
|
|
this.mainpanel.TabIndex = 0;
|
|
base.AutoScaleMode = AutoScaleMode.None;
|
|
this.AutoScroll = true;
|
|
base.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
|
base.ClientSize = new Size(1530, 922);
|
|
base.Controls.Add(this.mainpanel);
|
|
base.Controls.Add(this.panel1);
|
|
base.FormBorderStyle = FormBorderStyle.Fixed3D;
|
|
base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
|
|
base.Margin = new Padding(3, 4, 3, 4);
|
|
base.MaximizeBox = false;
|
|
this.MaximumSize = new Size(1550, 965);
|
|
this.MinimumSize = new Size(1550, 965);
|
|
base.Name = "Form1";
|
|
base.SizeGripStyle = SizeGripStyle.Hide;
|
|
base.StartPosition = FormStartPosition.CenterScreen;
|
|
this.Text = "SL200_LogViewer Ver 1.0.1_25.10";
|
|
base.FormClosed += this.Form1_FormClosed;
|
|
base.Load += this.Form1_Load;
|
|
this.panel1.ResumeLayout(false);
|
|
this.panel1.PerformLayout();
|
|
base.ResumeLayout(false);
|
|
base.PerformLayout();
|
|
}
|
|
|
|
// Token: 0x04000012 RID: 18
|
|
private SavedlogForm savedlogForm = new SavedlogForm();
|
|
|
|
// Token: 0x04000013 RID: 19
|
|
private mmiMsgForm mmiMsgForm = new mmiMsgForm();
|
|
|
|
// Token: 0x04000014 RID: 20
|
|
private Form _activeForm;
|
|
|
|
// Token: 0x04000015 RID: 21
|
|
public static bool logOn;
|
|
|
|
// Token: 0x04000016 RID: 22
|
|
private IContainer components = null;
|
|
|
|
// Token: 0x04000017 RID: 23
|
|
private Button button1;
|
|
|
|
// Token: 0x04000018 RID: 24
|
|
private Panel panel1;
|
|
|
|
// Token: 0x04000019 RID: 25
|
|
private Button button2;
|
|
|
|
// Token: 0x0400001A RID: 26
|
|
private Panel mainpanel;
|
|
|
|
// Token: 0x0400001B RID: 27
|
|
private Button button3;
|
|
|
|
// Token: 0x0400001C RID: 28
|
|
private Button button4;
|
|
}
|
|
}
|