129,9 → 129,8 |
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.components); |
this.mainMenu = new System.Windows.Forms.MainMenu(); |
this.fileMenu=new System.Windows.Forms.MenuItem(); |
this.startMenuItem=new System.Windows.Forms.MenuItem(); |
this.stopMenuItem=new System.Windows.Forms.MenuItem(); |
170,6 → 169,7 |
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,9 → 187,6 |
// |
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 |
// |
214,7 → 211,7 |
// |
// statusBar |
// |
this.statusBar.Location=new System.Drawing.Point(0, 279); |
this.statusBar.Location = new System.Drawing.Point(0, 339); |
this.statusBar.Name="statusBar"; |
this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { |
this.connectionStatusBar}); |
225,7 → 222,6 |
// connectionStatusBar |
// |
this.connectionStatusBar.AutoSize=System.Windows.Forms.StatusBarPanelAutoSize.Spring; |
this.connectionStatusBar.Name="connectionStatusBar"; |
this.connectionStatusBar.Width=764; |
// |
// saveButtonImageList |
232,7 → 228,6 |
// |
this.saveButtonImageList.ImageStream=((System.Windows.Forms.ImageListStreamer)(resources.GetObject("saveButtonImageList.ImageStream"))); |
this.saveButtonImageList.TransparentColor=System.Drawing.Color.Magenta; |
this.saveButtonImageList.Images.SetKeyName(0, ""); |
// |
// closeConnectionMenuItem |
// |
246,12 → 241,6 |
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"; |
468,7 → 457,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, 279); |
this.panel1.Size = new System.Drawing.Size(780, 339); |
this.panel1.TabIndex=11; |
// |
// panel3 |
479,7 → 468,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, 279); |
this.panel3.Size = new System.Drawing.Size(780, 339); |
this.panel3.TabIndex=5; |
// |
// panel4 |
490,13 → 479,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, 279); |
this.panel4.Size = new System.Drawing.Size(617, 339); |
this.panel4.TabIndex=13; |
// |
// splitter2 |
// |
this.splitter2.Dock=System.Windows.Forms.DockStyle.Bottom; |
this.splitter2.Location=new System.Drawing.Point(0, 208); |
this.splitter2.Location = new System.Drawing.Point(0, 268); |
this.splitter2.Name="splitter2"; |
this.splitter2.Size=new System.Drawing.Size(617, 3); |
this.splitter2.TabIndex=9; |
508,7 → 497,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, 211); |
this.logBox.Location = new System.Drawing.Point(0, 271); |
this.logBox.Name="logBox"; |
this.logBox.ScrollAlwaysVisible=true; |
this.logBox.Size=new System.Drawing.Size(617, 68); |
518,7 → 507,7 |
// |
this.splitter1.Location=new System.Drawing.Point(160, 0); |
this.splitter1.Name="splitter1"; |
this.splitter1.Size=new System.Drawing.Size(3, 279); |
this.splitter1.Size = new System.Drawing.Size(3, 339); |
this.splitter1.TabIndex=12; |
this.splitter1.TabStop=false; |
// |
532,10 → 521,9 |
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, 279); |
this.messageView.Size = new System.Drawing.Size(160, 339); |
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 |
550,6 → 538,12 |
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; |
557,7 → 551,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, 208); |
this.messagesBox.Size = new System.Drawing.Size(617, 268); |
this.messagesBox.TabIndex=7; |
this.messagesBox.WordWrap=true; |
// |
564,7 → 558,7 |
// MainForm |
// |
this.AutoScaleBaseSize=new System.Drawing.Size(5, 13); |
this.ClientSize=new System.Drawing.Size(780, 301); |
this.ClientSize = new System.Drawing.Size(780, 361); |
this.Controls.Add(this.panel1); |
this.Controls.Add(this.statusBar); |
this.Menu=this.mainMenu; |
696,8 → 690,6 |
|
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; |
722,33 → 714,17 |
|
private void closeConnectionMenuItem_Click(object sender, System.EventArgs e) |
{ |
TreeNode node; |
if(messageView.Tag != null) { |
node = messageView.GetNodeAt((Point)messageView.Tag); |
} |
else { |
node = messageView.SelectedNode; |
} |
if(messageView.SelectedNode == null) return; |
|
if(node != null) |
{ |
object tag = node.Tag; |
object tag = messageView.SelectedNode.Tag; |
if(tag is TcpNodeData) |
CloseTcpConnection(((TcpNodeData)tag).Tcp); |
else if(tag is TcpNodeData) |
CloseTcpConnection(((TcpNodeData)node.Parent.Tag).Tcp); |
CloseTcpConnection(((TcpNodeData)messageView.SelectedNode.Parent.Tag).Tcp); |
else if(tag is XmlNodeData) |
CloseTcpConnection(((TcpNodeData)node.Parent.Parent.Tag).Tcp); |
CloseTcpConnection(((TcpNodeData)messageView.SelectedNode.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; |
755,21 → 731,12 |
tcpShowByDirectionMenuItem.Checked = true; |
tcpShowByTimeMenuItem.Checked = false; |
|
TreeNode node; |
if(messageView.Tag != null) { |
node = messageView.GetNodeAt((Point)messageView.Tag); |
} |
else { |
node = messageView.SelectedNode; |
} |
if(messageView.SelectedNode == null) return; |
|
if(node != null) |
{ |
object tag = node.Tag; |
object tag = messageView.SelectedNode.Tag; |
if(tag is TcpNodeData) |
UpdateTcpNodeInternal(((TcpNodeData)tag).Tcp); |
} |
} |
|
private void tcpShowByTimeMenuItem_Click(object sender, System.EventArgs e) |
{ |
779,21 → 746,10 |
|
if(messageView.SelectedNode == null) return; |
|
TreeNode node; |
if(messageView.Tag != null) { |
node = messageView.GetNodeAt((Point)messageView.Tag); |
} |
else { |
node = messageView.SelectedNode; |
} |
|
if(node != null) |
{ |
object tag = node.Tag; |
object tag = messageView.SelectedNode.Tag; |
if(tag is TcpNodeData) |
UpdateTcpNodeInternal(((TcpNodeData)tag).Tcp); |
} |
} |
|
private void saveLogMenuItem_Click(object sender, System.EventArgs e) |
{ |
2656,7 → 2612,6 |
} |
} |
#endregion other classes |
|
} |
|
public class LogMessages |