48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.ComponentModel;
 | |
| using System.Data;
 | |
| using System.Drawing;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Windows.Forms;
 | |
| 
 | |
| namespace Project
 | |
| {
 | |
|     public partial class fLog : Form
 | |
|     {
 | |
|         public fLog()
 | |
|         {
 | |
|             InitializeComponent();
 | |
|             Pub.log.RaiseMsg += Log_RaiseMsg;
 | |
|             this.FormClosed += FLog_FormClosed;
 | |
|             this.KeyDown += (s1, e1) => {
 | |
|                 if (e1.KeyCode == Keys.Escape) this.Close();
 | |
|             };
 | |
|         }
 | |
| 
 | |
|         private void FLog_FormClosed(object sender, FormClosedEventArgs e)
 | |
|         {
 | |
|             Pub.log.RaiseMsg -= Log_RaiseMsg;
 | |
|         }
 | |
| 
 | |
| 
 | |
|         private void __Load(object sender, EventArgs e)
 | |
|         {
 | |
| 
 | |
|         }
 | |
| 
 | |
| 
 | |
|         private void Log_RaiseMsg(DateTime LogTime, string TypeStr, string Message)
 | |
|         {
 | |
|             this.logTextBox1.AddMsg(TypeStr, Message);
 | |
|         }
 | |
| 
 | |
|         private void button1_Click(object sender, EventArgs e)
 | |
|         {
 | |
|             this.logTextBox1.LoadFile(Pub.log.FileName, RichTextBoxStreamType.PlainText);
 | |
|             this.logTextBox1.ForeColor = Color.White;
 | |
|         }
 | |
|     }
 | |
| }
 | 
