⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 captureoptions.cs

📁 一个抓包工具
💻 CS
📖 第 1 页 / 共 3 页
字号:
			// LblSeconds
			// 
			this.LblSeconds.AutoSize = true;
			this.LblSeconds.Location = new System.Drawing.Point(200, 240);
			this.LblSeconds.Name = "LblSeconds";
			this.LblSeconds.Size = new System.Drawing.Size(54, 13);
			this.LblSeconds.TabIndex = 21;
			this.LblSeconds.Text = "second(s)";
			// 
			// LblKilobytes
			// 
			this.LblKilobytes.AutoSize = true;
			this.LblKilobytes.Location = new System.Drawing.Point(200, 216);
			this.LblKilobytes.Name = "LblKilobytes";
			this.LblKilobytes.Size = new System.Drawing.Size(103, 13);
			this.LblKilobytes.TabIndex = 22;
			this.LblKilobytes.Text = "kilobyte(s) captured";
			// 
			// panel3
			// 
			this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.panel3.Location = new System.Drawing.Point(8, 264);
			this.panel3.Name = "panel3";
			this.panel3.Size = new System.Drawing.Size(360, 4);
			this.panel3.TabIndex = 23;
			// 
			// ChkNameResolutionMAC
			// 
			this.ChkNameResolutionMAC.Location = new System.Drawing.Point(8, 280);
			this.ChkNameResolutionMAC.Name = "ChkNameResolutionMAC";
			this.ChkNameResolutionMAC.Size = new System.Drawing.Size(192, 16);
			this.ChkNameResolutionMAC.TabIndex = 24;
			this.ChkNameResolutionMAC.Text = "Enable MAC name resolution";
			// 
			// ChkNameResolutionNetwork
			// 
			this.ChkNameResolutionNetwork.Location = new System.Drawing.Point(8, 304);
			this.ChkNameResolutionNetwork.Name = "ChkNameResolutionNetwork";
			this.ChkNameResolutionNetwork.Size = new System.Drawing.Size(192, 16);
			this.ChkNameResolutionNetwork.TabIndex = 25;
			this.ChkNameResolutionNetwork.Text = "Enable network name resolution";
			// 
			// ChkNameResolutionTransport
			// 
			this.ChkNameResolutionTransport.Location = new System.Drawing.Point(8, 328);
			this.ChkNameResolutionTransport.Name = "ChkNameResolutionTransport";
			this.ChkNameResolutionTransport.Size = new System.Drawing.Size(192, 16);
			this.ChkNameResolutionTransport.TabIndex = 26;
			this.ChkNameResolutionTransport.Text = "Enable transport name resolution";
			// 
			// panel4
			// 
			this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.panel4.Location = new System.Drawing.Point(8, 376);
			this.panel4.Name = "panel4";
			this.panel4.Size = new System.Drawing.Size(360, 4);
			this.panel4.TabIndex = 27;
			// 
			// panel5
			// 
			this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.panel5.Location = new System.Drawing.Point(366, 106);
			this.panel5.Name = "panel5";
			this.panel5.Size = new System.Drawing.Size(4, 274);
			this.panel5.TabIndex = 28;
			// 
			// LblAdapterBufferSize
			// 
			this.LblAdapterBufferSize.AutoSize = true;
			this.LblAdapterBufferSize.Location = new System.Drawing.Point(384, 120);
			this.LblAdapterBufferSize.Name = "LblAdapterBufferSize";
			this.LblAdapterBufferSize.Size = new System.Drawing.Size(102, 13);
			this.LblAdapterBufferSize.TabIndex = 29;
			this.LblAdapterBufferSize.Text = "Adapter Buffer Size";
			// 
			// LblBufferSize
			// 
			this.LblBufferSize.AutoSize = true;
			this.LblBufferSize.Location = new System.Drawing.Point(384, 144);
			this.LblBufferSize.Name = "LblBufferSize";
			this.LblBufferSize.Size = new System.Drawing.Size(60, 13);
			this.LblBufferSize.TabIndex = 30;
			this.LblBufferSize.Text = "Buffer Size";
			// 
			// LblMinBytesToCopy
			// 
			this.LblMinBytesToCopy.AutoSize = true;
			this.LblMinBytesToCopy.Location = new System.Drawing.Point(384, 168);
			this.LblMinBytesToCopy.Name = "LblMinBytesToCopy";
			this.LblMinBytesToCopy.Size = new System.Drawing.Size(120, 13);
			this.LblMinBytesToCopy.TabIndex = 31;
			this.LblMinBytesToCopy.Text = "Minimum bytes to copy";
			// 
			// LblNumWrites
			// 
			this.LblNumWrites.AutoSize = true;
			this.LblNumWrites.Location = new System.Drawing.Point(384, 192);
			this.LblNumWrites.Name = "LblNumWrites";
			this.LblNumWrites.Size = new System.Drawing.Size(90, 13);
			this.LblNumWrites.TabIndex = 32;
			this.LblNumWrites.Text = "Number of writes";
			// 
			// LblReadTimeOut
			// 
			this.LblReadTimeOut.AutoSize = true;
			this.LblReadTimeOut.Location = new System.Drawing.Point(384, 216);
			this.LblReadTimeOut.Name = "LblReadTimeOut";
			this.LblReadTimeOut.Size = new System.Drawing.Size(106, 13);
			this.LblReadTimeOut.TabIndex = 33;
			this.LblReadTimeOut.Text = "Read time out ( ms )";
			// 
			// LblCaptureMode
			// 
			this.LblCaptureMode.AutoSize = true;
			this.LblCaptureMode.Location = new System.Drawing.Point(384, 240);
			this.LblCaptureMode.Name = "LblCaptureMode";
			this.LblCaptureMode.Size = new System.Drawing.Size(76, 13);
			this.LblCaptureMode.TabIndex = 34;
			this.LblCaptureMode.Text = "Capture Mode";
			// 
			// LblHardwareFilter
			// 
			this.LblHardwareFilter.AutoSize = true;
			this.LblHardwareFilter.Location = new System.Drawing.Point(384, 264);
			this.LblHardwareFilter.Name = "LblHardwareFilter";
			this.LblHardwareFilter.Size = new System.Drawing.Size(82, 13);
			this.LblHardwareFilter.TabIndex = 35;
			this.LblHardwareFilter.Text = "Hardware Filter";
			// 
			// TxtAdapterBufferSize
			// 
			this.TxtAdapterBufferSize.Location = new System.Drawing.Point(512, 112);
			this.TxtAdapterBufferSize.Name = "TxtAdapterBufferSize";
			this.TxtAdapterBufferSize.Size = new System.Drawing.Size(208, 20);
			this.TxtAdapterBufferSize.TabIndex = 36;
			this.TxtAdapterBufferSize.Text = "512000";
			// 
			// TxtBufferSize
			// 
			this.TxtBufferSize.Location = new System.Drawing.Point(512, 136);
			this.TxtBufferSize.Name = "TxtBufferSize";
			this.TxtBufferSize.Size = new System.Drawing.Size(208, 20);
			this.TxtBufferSize.TabIndex = 37;
			this.TxtBufferSize.Text = "256000";
			// 
			// TxtMinBytesToCopy
			// 
			this.TxtMinBytesToCopy.Location = new System.Drawing.Point(512, 160);
			this.TxtMinBytesToCopy.Name = "TxtMinBytesToCopy";
			this.TxtMinBytesToCopy.Size = new System.Drawing.Size(208, 20);
			this.TxtMinBytesToCopy.TabIndex = 38;
			this.TxtMinBytesToCopy.Text = "4096";
			// 
			// TxtNumWrites
			// 
			this.TxtNumWrites.Location = new System.Drawing.Point(512, 184);
			this.TxtNumWrites.Name = "TxtNumWrites";
			this.TxtNumWrites.Size = new System.Drawing.Size(208, 20);
			this.TxtNumWrites.TabIndex = 39;
			this.TxtNumWrites.Text = "1";
			// 
			// TxtReadTimeOut
			// 
			this.TxtReadTimeOut.Location = new System.Drawing.Point(512, 208);
			this.TxtReadTimeOut.Name = "TxtReadTimeOut";
			this.TxtReadTimeOut.Size = new System.Drawing.Size(208, 20);
			this.TxtReadTimeOut.TabIndex = 40;
			this.TxtReadTimeOut.Text = "1000";
			// 
			// CmbCaptureMode
			// 
			this.CmbCaptureMode.Items.AddRange(new object[] {
																"CAPTURE MODE",
																"STATISTICAL MODE",
																"DUMP MODE",
																"STATISTICAL & DUMP MODE"});
			this.CmbCaptureMode.Location = new System.Drawing.Point(512, 232);
			this.CmbCaptureMode.Name = "CmbCaptureMode";
			this.CmbCaptureMode.Size = new System.Drawing.Size(208, 21);
			this.CmbCaptureMode.TabIndex = 41;
			// 
			// BtnOk
			// 
			this.BtnOk.Location = new System.Drawing.Point(8, 432);
			this.BtnOk.Name = "BtnOk";
			this.BtnOk.TabIndex = 43;
			this.BtnOk.Text = "&Ok";
			this.BtnOk.Click += new System.EventHandler(this.BtnOk_Click);
			// 
			// BtnCancel
			// 
			this.BtnCancel.Location = new System.Drawing.Point(96, 432);
			this.BtnCancel.Name = "BtnCancel";
			this.BtnCancel.TabIndex = 44;
			this.BtnCancel.Text = "&Cancel";
			this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
			// 
			// ChkBoxHardwareFilter
			// 
			this.ChkBoxHardwareFilter.Items.AddRange(new object[] {
																	  "DIRECTED",
																	  "MULTICAST",
																	  "ALL_MULTICAST",
																	  "BROADCAST",
																	  "SOURCE_ROUTING",
																	  "PROMISCUOUS",
																	  "SMT",
																	  "ALL_LOCAL",
																	  "MAC_FRAME",
																	  "FUNCTIONAL",
																	  "ALL_FUNCTIONAL",
																	  "GROUP"});
			this.ChkBoxHardwareFilter.Location = new System.Drawing.Point(512, 256);
			this.ChkBoxHardwareFilter.Name = "ChkBoxHardwareFilter";
			this.ChkBoxHardwareFilter.Size = new System.Drawing.Size(208, 199);
			this.ChkBoxHardwareFilter.TabIndex = 45;
			this.ChkBoxHardwareFilter.SelectedValueChanged += new System.EventHandler(this.ChkBoxHardwareFilter_SelectedValueChanged);
			// 
			// ChkManufacturerNameResolution
			// 
			this.ChkManufacturerNameResolution.Location = new System.Drawing.Point(8, 352);
			this.ChkManufacturerNameResolution.Name = "ChkManufacturerNameResolution";
			this.ChkManufacturerNameResolution.Size = new System.Drawing.Size(328, 16);
			this.ChkManufacturerNameResolution.TabIndex = 46;
			this.ChkManufacturerNameResolution.Text = "Enable Manufacturer Name Resolution";
			// 
			// CaptureOptions
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(728, 461);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.ChkManufacturerNameResolution,
																		  this.ChkBoxHardwareFilter,
																		  this.BtnCancel,
																		  this.BtnOk,
																		  this.CmbCaptureMode,
																		  this.TxtReadTimeOut,
																		  this.TxtNumWrites,
																		  this.TxtMinBytesToCopy,
																		  this.TxtBufferSize,
																		  this.TxtAdapterBufferSize,
																		  this.LblHardwareFilter,
																		  this.LblCaptureMode,
																		  this.LblReadTimeOut,
																		  this.LblNumWrites,
																		  this.LblMinBytesToCopy,
																		  this.LblBufferSize,
																		  this.LblAdapterBufferSize,
																		  this.LblKilobytes,
																		  this.LblSeconds,
																		  this.LblPackets,
																		  this.LblFilter,
																		  this.LblBytes,
																		  this.LblInterface,
																		  this.panel5,
																		  this.panel4,
																		  this.ChkNameResolutionTransport,
																		  this.ChkNameResolutionNetwork,
																		  this.ChkNameResolutionMAC,
																		  this.panel3,
																		  this.TxtCaptureLimitsSeconds,
																		  this.TxtCaptureLimitsKiloBytes,
																		  this.TxtCaptureLimitsPackets,
																		  this.ChkCaptureLimitsSeconds,
																		  this.ChkCaptureLimitsKiloBytes,
																		  this.ChkCaptureLimitsPackets,
																		  this.panel2,
																		  this.ChkDisplayOptionsAutomaticScroll,
																		  this.ChkDisplayOptionsRealTime,
																		  this.panel1,
																		  this.TxtFilter,
																		  this.ChkCaptureMode,
																		  this.TxtEachPacketSize,
																		  this.ChkCaptureLimit,
																		  this.CmbAdapter});
			this.Name = "CaptureOptions";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Capture Options - r.ysie.ysse.ysmu.r.bb";
			this.Activated += new System.EventHandler(this.CaptureOptions_Activated);
			this.Enter += new System.EventHandler(this.CaptureOptions_Enter);
			this.ResumeLayout(false);

		}
		#endregion

		private void BtnOk_Click(object sender, System.EventArgs e)
		{
			string str = "";
		
			str = TxtEachPacketSize.Text;
			thisCaptureOptions.PacketSize = int.Parse( str );

			thisCaptureOptions.LimitPackets = ChkCaptureLimit.Checked;

			thisCaptureOptions.PromiscuousMode = ChkCaptureMode.Checked;
			thisCaptureOptions.Filter = TxtFilter.Text;
			thisCaptureOptions.AdapterIndex = CmbAdapter.SelectedIndex;

			str = TxtAdapterBufferSize.Text;
			thisCaptureOptions.AdapterBufferSize = int.Parse( str );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -