129,8 → 129,9 |
this.saveButtonImageList = new System.Windows.Forms.ImageList(this.components); |
this.closeConnectionMenuItem = new System.Windows.Forms.MenuItem(); |
this.viewContextMenu = new System.Windows.Forms.ContextMenu(); |
this.autoExpandMenuItem=new System.Windows.Forms.MenuItem(); |
this.saveLogDialog = new System.Windows.Forms.SaveFileDialog(); |
this.mainMenu = new System.Windows.Forms.MainMenu(); |
this.mainMenu=new System.Windows.Forms.MainMenu(this.components); |
this.fileMenu = new System.Windows.Forms.MenuItem(); |
this.startMenuItem = new System.Windows.Forms.MenuItem(); |
this.stopMenuItem = new System.Windows.Forms.MenuItem(); |
169,7 → 170,6 |
this.messageView = new System.Windows.Forms.TreeView(); |
this.saveBinLogDialog = new System.Windows.Forms.SaveFileDialog(); |
this.loadBinLogDialog = new System.Windows.Forms.OpenFileDialog(); |
this.autoExpandMenuItem = new System.Windows.Forms.MenuItem(); |
this.messagesBox = new TCPproxy.ViewControl(); |
((System.ComponentModel.ISupportInitialize)(this.connectionStatusBar)).BeginInit(); |
this.panel1.SuspendLayout(); |
187,6 → 187,9 |
// |
this.treeImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("treeImageList.ImageStream"))); |
this.treeImageList.TransparentColor = System.Drawing.Color.Magenta; |
this.treeImageList.Images.SetKeyName(0, ""); |
this.treeImageList.Images.SetKeyName(1, ""); |
this.treeImageList.Images.SetKeyName(2, ""); |
// |
// messagesContextMenu |
// |
211,7 → 214,7 |
// |
// statusBar |
// |
this.statusBar.Location = new System.Drawing.Point(0, 339); |
this.statusBar.Location=new System.Drawing.Point(0, 279); |
this.statusBar.Name = "statusBar"; |
this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { |
this.connectionStatusBar}); |
222,6 → 225,7 |
// connectionStatusBar |
// |
this.connectionStatusBar.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring; |
this.connectionStatusBar.Name="connectionStatusBar"; |
this.connectionStatusBar.Width = 764; |
// |
// saveButtonImageList |
228,6 → 232,7 |
// |
this.saveButtonImageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("saveButtonImageList.ImageStream"))); |
this.saveButtonImageList.TransparentColor = System.Drawing.Color.Magenta; |
this.saveButtonImageList.Images.SetKeyName(0, ""); |
// |
// closeConnectionMenuItem |
// |
241,6 → 246,12 |
this.closeConnectionMenuItem, |
this.autoExpandMenuItem}); |
// |
// autoExpandMenuItem |
// |
this.autoExpandMenuItem.Index=1; |
this.autoExpandMenuItem.Text="Auto E&xpand"; |
this.autoExpandMenuItem.Click+=new System.EventHandler(this.autoExpandMenuItem_Click); |
// |
// saveLogDialog |
// |
this.saveLogDialog.DefaultExt = "txt"; |
457,7 → 468,7 |
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; |
this.panel1.Location = new System.Drawing.Point(0, 0); |
this.panel1.Name = "panel1"; |
this.panel1.Size = new System.Drawing.Size(780, 339); |
this.panel1.Size=new System.Drawing.Size(780, 279); |
this.panel1.TabIndex = 11; |
// |
// panel3 |
468,7 → 479,7 |
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; |
this.panel3.Location = new System.Drawing.Point(0, 0); |
this.panel3.Name = "panel3"; |
this.panel3.Size = new System.Drawing.Size(780, 339); |
this.panel3.Size=new System.Drawing.Size(780, 279); |
this.panel3.TabIndex = 5; |
// |
// panel4 |
479,13 → 490,13 |
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; |
this.panel4.Location = new System.Drawing.Point(163, 0); |
this.panel4.Name = "panel4"; |
this.panel4.Size = new System.Drawing.Size(617, 339); |
this.panel4.Size=new System.Drawing.Size(617, 279); |
this.panel4.TabIndex = 13; |
// |
// splitter2 |
// |
this.splitter2.Dock = System.Windows.Forms.DockStyle.Bottom; |
this.splitter2.Location = new System.Drawing.Point(0, 268); |
this.splitter2.Location=new System.Drawing.Point(0, 208); |
this.splitter2.Name = "splitter2"; |
this.splitter2.Size = new System.Drawing.Size(617, 3); |
this.splitter2.TabIndex = 9; |
497,7 → 508,7 |
this.logBox.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
this.logBox.HorizontalScrollbar = true; |
this.logBox.ItemHeight = 16; |
this.logBox.Location = new System.Drawing.Point(0, 271); |
this.logBox.Location=new System.Drawing.Point(0, 211); |
this.logBox.Name = "logBox"; |
this.logBox.ScrollAlwaysVisible = true; |
this.logBox.Size = new System.Drawing.Size(617, 68); |
507,7 → 518,7 |
// |
this.splitter1.Location = new System.Drawing.Point(160, 0); |
this.splitter1.Name = "splitter1"; |
this.splitter1.Size = new System.Drawing.Size(3, 339); |
this.splitter1.Size=new System.Drawing.Size(3, 279); |
this.splitter1.TabIndex = 12; |
this.splitter1.TabStop = false; |
// |
521,9 → 532,10 |
this.messageView.Location = new System.Drawing.Point(0, 0); |
this.messageView.Name = "messageView"; |
this.messageView.SelectedImageIndex = 0; |
this.messageView.Size = new System.Drawing.Size(160, 339); |
this.messageView.Size=new System.Drawing.Size(160, 279); |
this.messageView.TabIndex = 11; |
this.messageView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.messageView_AfterSelect); |
this.messageView.MouseDown+=new System.Windows.Forms.MouseEventHandler(this.messageView_MouseDown); |
this.messageView.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.messageView_BeforeSelect); |
// |
// saveBinLogDialog |
538,12 → 550,6 |
this.loadBinLogDialog.Filter = "TCP Logs (*.bin)|*.bin|All Files|*.*"; |
this.loadBinLogDialog.Title = "Load Binary Log"; |
// |
// autoExpandMenuItem |
// |
this.autoExpandMenuItem.Index = 1; |
this.autoExpandMenuItem.Text = "Auto E&xpand"; |
this.autoExpandMenuItem.Click += new System.EventHandler(this.autoExpandMenuItem_Click); |
// |
// messagesBox |
// |
this.messagesBox.ContextMenu = this.messagesContextMenu; |
551,7 → 557,7 |
this.messagesBox.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
this.messagesBox.Location = new System.Drawing.Point(0, 0); |
this.messagesBox.Name = "messagesBox"; |
this.messagesBox.Size = new System.Drawing.Size(617, 268); |
this.messagesBox.Size=new System.Drawing.Size(617, 208); |
this.messagesBox.TabIndex = 7; |
this.messagesBox.WordWrap = true; |
// |
558,7 → 564,7 |
// MainForm |
// |
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); |
this.ClientSize = new System.Drawing.Size(780, 361); |
this.ClientSize=new System.Drawing.Size(780, 301); |
this.Controls.Add(this.panel1); |
this.Controls.Add(this.statusBar); |
this.Menu = this.mainMenu; |
690,6 → 696,8 |
|
private void messageView_BeforeSelect(object sender, TreeViewCancelEventArgs e) |
{ |
messageView.Tag = null; // clear the right-click item |
|
if(messageView.SelectedNode == null) return; |
|
object tag = messageView.SelectedNode.Tag; |
714,17 → 722,33 |
|
private void closeConnectionMenuItem_Click(object sender, System.EventArgs e) |
{ |
if(messageView.SelectedNode == null) return; |
TreeNode node; |
if(messageView.Tag != null) { |
node = messageView.GetNodeAt((Point)messageView.Tag); |
} |
else { |
node = messageView.SelectedNode; |
} |
|
object tag = messageView.SelectedNode.Tag; |
if(node != null) |
{ |
object tag = node.Tag; |
if(tag is TcpNodeData) |
CloseTcpConnection(((TcpNodeData)tag).Tcp); |
else if(tag is TcpNodeData) |
CloseTcpConnection(((TcpNodeData)messageView.SelectedNode.Parent.Tag).Tcp); |
CloseTcpConnection(((TcpNodeData)node.Parent.Tag).Tcp); |
else if(tag is XmlNodeData) |
CloseTcpConnection(((TcpNodeData)messageView.SelectedNode.Parent.Parent.Tag).Tcp); |
CloseTcpConnection(((TcpNodeData)node.Parent.Parent.Tag).Tcp); |
} |
} |
|
private void messageView_MouseDown(object sender, MouseEventArgs e) |
{ |
if(e.Button == MouseButtons.Right) { |
messageView.Tag = new Point(e.X, e.Y); // save mouse click coord |
} |
} |
|
private void tcpShowByDirectionMenuItem_Click(object sender, System.EventArgs e) |
{ |
tcpShowMode = TcpShowMode.ByDirection; |
731,12 → 755,21 |
tcpShowByDirectionMenuItem.Checked = true; |
tcpShowByTimeMenuItem.Checked = false; |
|
if(messageView.SelectedNode == null) return; |
TreeNode node; |
if(messageView.Tag != null) { |
node = messageView.GetNodeAt((Point)messageView.Tag); |
} |
else { |
node = messageView.SelectedNode; |
} |
|
object tag = messageView.SelectedNode.Tag; |
if(node != null) |
{ |
object tag = node.Tag; |
if(tag is TcpNodeData) |
UpdateTcpNodeInternal(((TcpNodeData)tag).Tcp); |
} |
} |
|
private void tcpShowByTimeMenuItem_Click(object sender, System.EventArgs e) |
{ |
746,10 → 779,21 |
|
if(messageView.SelectedNode == null) return; |
|
object tag = messageView.SelectedNode.Tag; |
TreeNode node; |
if(messageView.Tag != null) { |
node = messageView.GetNodeAt((Point)messageView.Tag); |
} |
else { |
node = messageView.SelectedNode; |
} |
|
if(node != null) |
{ |
object tag = node.Tag; |
if(tag is TcpNodeData) |
UpdateTcpNodeInternal(((TcpNodeData)tag).Tcp); |
} |
} |
|
private void saveLogMenuItem_Click(object sender, System.EventArgs e) |
{ |
2612,6 → 2656,7 |
} |
} |
#endregion other classes |
|
} |
|
public class LogMessages |