コード例 #1
0
        private void CreateCaptureTrafficTab(ICaptureDevice device)
        {
            var newTab     = new TabPage($"Capturing from {device.GetFriendlyName()}");
            var newControl = new CaptureTrafficControl()
            {
                Dock       = DockStyle.Fill,
                ParentForm = this,
                ParentTab  = newTab
            };

            newTab.Controls.Add(newControl);

            tabControl.TabPages.Add(newTab);
            tabControl.SelectTab(newTab);

            newControl.OnShow();
            newControl.StartNetworkAnalysis(device);

            // captureTrafficControl.OnStateChange += this.OnTabControlStateChange;
        }