annotate FrmDebugOutput.cs @ 9:ffb49ec86df7

Closes #42 - Update translations file to use Schema (WinForms) * Update WinForms GUI translations to use namespace for schema instead of DTD
author IBBoard <dev@ibboard.co.uk>
date Tue, 19 May 2009 11:10:07 +0000
parents 8935971e307c
children 19bdbb80999c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
8935971e307c Fixes #1 - Correctly license code
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
1 // This file (FrmDebugOutput.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2009 IBBoard.
8935971e307c Fixes #1 - Correctly license code
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
2 //
8935971e307c Fixes #1 - Correctly license code
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
3 // The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
8935971e307c Fixes #1 - Correctly license code
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
4
0
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using System;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 using System.Drawing;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 using System.Collections;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 using System.ComponentModel;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 using System.Text;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 using System.Windows.Forms;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 using IBBoard.Lang;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 using IBBoard.Logging;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 using IBBoard.Windows.Forms;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 namespace IBBoard.WarFoundry
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 /// <summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 /// Summary description for FrmDebugOutput.
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 /// </summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 public class FrmDebugOutput : IBBForm
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 private System.Windows.Forms.ListBox lstDebugItems;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 private System.Windows.Forms.ComboBox cmbDebugLevel;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 private System.Windows.Forms.Label lblDebugLevel;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 /// <summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 /// Required designer variable.
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 /// </summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 private System.ComponentModel.Container components = null;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 private Logger logger;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 private System.Windows.Forms.ContextMenu contextMenu;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 private System.Windows.Forms.MenuItem miCopy;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 private System.Windows.Forms.TextBox txtDetail;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 private System.Windows.Forms.Splitter splitter1;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 private System.Windows.Forms.Panel panel1;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 private int MAX_LIST_LENGTH = 50;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 public FrmDebugOutput()
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 //this.logger = logger;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 //logger.LogUpdatedEvent+=new IBBoard.Logging.Logger.LogUpdatedDelegate(logger_LogUpdatedEvent);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 // Required for Windows Form Designer support
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 InitializeComponent();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 /*if (LogLevels.Debug >= logger.LogLevel)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 cmbDebugLevel.Items.Add(LogLevels.Debug);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 if (LogLevels.Info >= logger.LogLevel)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 cmbDebugLevel.Items.Add(LogLevels.Info);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 if (LogLevels.Warning >= logger.LogLevel)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 cmbDebugLevel.Items.Add(LogLevels.Warning);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 if (LogLevels.Error >= logger.LogLevel)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 cmbDebugLevel.Items.Add(LogLevels.Error);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
65
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
66 if (LogLevels.Critical >= logger.LogLevel)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
67 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
68 cmbDebugLevel.Items.Add(LogLevels.Critical);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 }*/
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 this.Name = "DebugOutputForm";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73 cmbDebugLevel.SelectedItem = logger.LogLevel;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 Translation.Translate(this, true);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
76
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
77 fillDebugList();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
78 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
79
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
80 /// <summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 /// Clean up any resources being used.
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 /// </summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 protected override void Dispose( bool disposing )
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 if( disposing )
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 if(components != null)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
89 components.Dispose();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
90 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
91 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
92 base.Dispose( disposing );
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
93 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
94
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
95 #region Windows Form Designer generated code
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
96 /// <summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
97 /// Required method for Designer support - do not modify
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
98 /// the contents of this method with the code editor.
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
99 /// </summary>
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
100 private void InitializeComponent()
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
101 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
102 this.lstDebugItems = new System.Windows.Forms.ListBox();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
103 this.contextMenu = new System.Windows.Forms.ContextMenu();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
104 this.miCopy = new System.Windows.Forms.MenuItem();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
105 this.cmbDebugLevel = new System.Windows.Forms.ComboBox();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
106 this.lblDebugLevel = new System.Windows.Forms.Label();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
107 this.txtDetail = new System.Windows.Forms.TextBox();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
108 this.splitter1 = new System.Windows.Forms.Splitter();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
109 this.panel1 = new System.Windows.Forms.Panel();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
110 this.SuspendLayout();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
111 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 // lstDebugItems
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
113 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114 this.lstDebugItems.ContextMenu = this.contextMenu;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 this.lstDebugItems.Dock = System.Windows.Forms.DockStyle.Fill;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116 this.lstDebugItems.IntegralHeight = false;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
117 this.lstDebugItems.Location = new System.Drawing.Point(0, 24);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
118 this.lstDebugItems.Name = "lstDebugItems";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
119 this.lstDebugItems.ScrollAlwaysVisible = true;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
120 this.lstDebugItems.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
121 this.lstDebugItems.Size = new System.Drawing.Size(656, 144);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 this.lstDebugItems.TabIndex = 0;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
123 this.lstDebugItems.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lstDebugItems_MouseDown);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124 this.lstDebugItems.SelectedIndexChanged += new System.EventHandler(this.lstDebugItems_SelectedIndexChanged);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126 // contextMenu
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
127 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
128 this.contextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
129 this.miCopy});
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
130 this.contextMenu.Popup += new System.EventHandler(this.contextMenu_Popup);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
131 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
132 // miCopy
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
133 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
134 this.miCopy.Index = 0;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
135 this.miCopy.Text = "&Copy";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
136 this.miCopy.Click += new System.EventHandler(this.miCopy_Click);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
137 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
138 // cmbDebugLevel
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
139 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
140 this.cmbDebugLevel.Location = new System.Drawing.Point(190, 2);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 this.cmbDebugLevel.Name = "cmbDebugLevel";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142 this.cmbDebugLevel.Size = new System.Drawing.Size(464, 21);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
143 this.cmbDebugLevel.TabIndex = 1;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
144 this.cmbDebugLevel.SelectedIndexChanged += new System.EventHandler(this.cmbDebugLevel_SelectedIndexChanged);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
146 // lblDebugLevel
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
148 this.lblDebugLevel.Location = new System.Drawing.Point(16, 0);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
149 this.lblDebugLevel.Name = "lblDebugLevel";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
150 this.lblDebugLevel.Size = new System.Drawing.Size(168, 21);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
151 this.lblDebugLevel.TabIndex = 2;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
152 this.lblDebugLevel.Text = "debug level:";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
153 this.lblDebugLevel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
154 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155 // txtDetail
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
156 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
157 this.txtDetail.Dock = System.Windows.Forms.DockStyle.Bottom;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
158 this.txtDetail.Location = new System.Drawing.Point(0, 172);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
159 this.txtDetail.Multiline = true;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
160 this.txtDetail.Name = "txtDetail";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
161 this.txtDetail.ReadOnly = true;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
162 this.txtDetail.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
163 this.txtDetail.Size = new System.Drawing.Size(656, 64);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
164 this.txtDetail.TabIndex = 3;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
165 this.txtDetail.TabStop = false;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
166 this.txtDetail.Text = "";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
167 this.txtDetail.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDetail_KeyDown);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
168 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
169 // splitter1
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
170 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
171 this.splitter1.Cursor = System.Windows.Forms.Cursors.HSplit;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
172 this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
173 this.splitter1.Location = new System.Drawing.Point(0, 168);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
174 this.splitter1.MinExtra = 50;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
175 this.splitter1.MinSize = 50;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
176 this.splitter1.Name = "splitter1";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
177 this.splitter1.Size = new System.Drawing.Size(656, 4);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
178 this.splitter1.TabIndex = 4;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
179 this.splitter1.TabStop = false;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
180 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
181 // panel1
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
182 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
183 this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
184 this.panel1.Location = new System.Drawing.Point(0, 0);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
185 this.panel1.Name = "panel1";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
186 this.panel1.Size = new System.Drawing.Size(656, 24);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
187 this.panel1.TabIndex = 5;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
188 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
189 // FrmDebugOutput
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
190 //
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
191 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
192 this.ClientSize = new System.Drawing.Size(656, 236);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
193 this.Controls.Add(this.lblDebugLevel);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
194 this.Controls.Add(this.cmbDebugLevel);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
195 this.Controls.Add(this.lstDebugItems);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
196 this.Controls.Add(this.splitter1);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
197 this.Controls.Add(this.panel1);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
198 this.Controls.Add(this.txtDetail);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
199 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
200 this.Name = "FrmDebugOutput";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
201 this.ShowInTaskbar = false;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
202 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
203 this.Text = "FrmDebugOutput";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
204 this.ResumeLayout(false);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
205
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
206 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
207 #endregion
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
208
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
209 private void cmbDebugLevel_SelectedIndexChanged(object sender, System.EventArgs e)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
210 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
211 fillDebugList();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
212 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
213
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
214 private void fillDebugList()
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
215 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
216 lstDebugItems.Items.Clear();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
217 /*LogItem[] items = logger.GetLogItems((LogLevels)cmbDebugLevel.SelectedItem);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
218 int last = items.Length - 1;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
219 int stop = last - MAX_LIST_LENGTH;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
220
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
221 if (stop < 0)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
222 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
223 stop = 0;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
224 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
225
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
226 //reverse fill the list so that we can have newest items at the top
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
227 for (int i = last; i >= stop; i--)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
228 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
229 lstDebugItems.Items.Add(items[i]);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
230 }*/
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
231 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
232
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
233 private void logger_LogUpdatedEvent(LogItem item)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
234 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
235 /*if (item.Level >= (LogLevels)cmbDebugLevel.SelectedItem)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
236 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
237 lock (lstDebugItems)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
238 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
239 lstDebugItems.Items.Insert(0, item);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
240
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
241 if (lstDebugItems.Items.Count > MAX_LIST_LENGTH)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
242 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
243 lstDebugItems.Items.RemoveAt(lstDebugItems.Items.Count - 1);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
244 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
245 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
246 }*/
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
247 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
248
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
249 private void miCopy_Click(object sender, System.EventArgs e)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
250 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
251 if (lstDebugItems.SelectedIndices.Count==1)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
252 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
253 Clipboard.SetDataObject(lstDebugItems.SelectedItem.ToString());
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
254 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
255 else if (lstDebugItems.SelectedIndices.Count > 1)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
256 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
257 StringBuilder sb = new StringBuilder();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
258
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
259 foreach (int idx in lstDebugItems.SelectedIndices)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
260 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
261 sb.Append(lstDebugItems.Items[idx].ToString()+Environment.NewLine);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
262 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
263
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
264 Clipboard.SetDataObject(sb.ToString().Trim());
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
265 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
266 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
267
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
268 private void contextMenu_Popup(object sender, System.EventArgs e)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
269 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
270 foreach (MenuItem mi in contextMenu.MenuItems)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
271 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
272 mi.Visible = lstDebugItems.SelectedIndex > -1;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
273 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
274 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
275
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
276 private void lstDebugItems_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
277 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
278 if (e.Button == MouseButtons.Right)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
279 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
280 int idx = lstDebugItems.IndexFromPoint(e.X, e.Y);
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
281
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
282 if (lstDebugItems.SelectedIndices.Contains(idx))
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
283 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
284 lstDebugItems.SelectedIndex = idx;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
285 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
286 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
287 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
288
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
289 private void lstDebugItems_SelectedIndexChanged(object sender, System.EventArgs e)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
290 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
291 if (lstDebugItems.SelectedIndex > -1)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
292 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
293 LogItem item = (LogItem)lstDebugItems.SelectedItem;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
294 txtDetail.Text = item.ToString() + Environment.NewLine + Environment.NewLine + "Stack Trace: "+ item.StackTrace;
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
295 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
296 else
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
297 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
298 txtDetail.Text = "";
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
299 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
300 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
301
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
302 private void txtDetail_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
303 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
304 if(e.KeyData == (Keys.Control|Keys.A) && e.Control)
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
305 {
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
306 txtDetail.SelectAll();
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
307 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
308 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
309 }
7dd160dacb60 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
310 }