ホテル管理システム
ogi
yesterday 1a1c8e71fcd14858f595029f089b2d4a00202b32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HotelPms.Share.Data;
using HotelPms.Share.Util;
using HotelPms.Share.Windows.Util;
 
namespace HotelPms.Share.Windows.Tool
{
    public partial class DebugMonitor : Form
    {
        public DebugMonitor()
        {
            InitializeComponent();
            GeneralSub.SetDoubleBuffered(listBox1);
        }
 
        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                Clipboard.SetDataObject(listBox1.SelectedItem, true);
            }
            catch { }
        }
 
        public void WriteLog(string msg)
        {
            try
            {
                //textBox2.Text = MsSqlNet.ConnectCount.ToString();
 
                if (cbFillter.Checked)
                {
                    cbFillter.Tag = false;
                    foreach (string sp in this.textBox3.Text.Split(new char[] { ',' }))
                    {
                        if (msg.Contains(sp)) { cbFillter.Tag = true; break; }
                    }
                    if (cbFillter.Tag.Equals(false)) return;
                }
 
                string newMsg = string.Format("y{0}z ", DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss fff")) + msg;
                if (listBox1.Items.Count == int.MaxValue) { listBox1.Items.RemoveAt(0); }
                listBox1.Items.Add(newMsg);
                listBox1.SelectedIndex = listBox1.Items.Count - 1;
                listBox1.Refresh();
            }
            catch { }
        }
 
        private void DebugMonitor_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                this.Visible = false;
                e.Cancel = true;
            }
        }
 
        private void btnClear_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
        }
 
        private void DebugMonitor_Load(object sender, EventArgs e)
        {
            this.Location = new Point(0, 0);
        }
 
        private void cbTopMost_CheckedChanged(object sender, EventArgs e)
        {
            this.TopMost = cbTopMost.Checked;
        }
 
        private void label1_Click(object sender, EventArgs e)
        {
            //textBox2.Text = MsSqlNet.ConnectCount.ToString();
        }
    }
}