亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? form1.cs

?? VC#編寫的例程
?? CS
?? 第 1 頁 / 共 2 頁
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Threading;
using CyUSB;
using System.Runtime.InteropServices;
namespace Screamer
{

	public class Form1 : System.Windows.Forms.Form
	{
        bool bVista;
        private System.Diagnostics.PerformanceCounter CpuCounter;

		USBDeviceList	usbDevices;		CyUSBDevice		MyDevice;
        CyUSBEndPoint   EndPoint;

		DateTime        t1,t2;		TimeSpan        elapsed;		double	        XferBytes;		long		    xferRate;

        int BufSz; 
        int QueueSz;
        int PPX;
        int IsoPktBlockSize;
        int Successes;
        int Failures;
                Thread tListen;
        bool bRunning;

        // These 2 needed for ListenThread to update the UI
        delegate void UpdateUICallback();
        UpdateUICallback updateUI;

        // These 2 needed to close the app from the ListenThread (exception handling)
        delegate void ExceptionCallback();
        ExceptionCallback handleException;

		public Form1()
		{
            bVista = (Environment.OSVersion.Version.Major == 6);

			// Required for Windows Form Designer support
			InitializeComponent();

            // Late setup of the CPU monitor - (Bails-out if in Vista)
            InitializePeformanceMonitor();

            // Hide the CPU load monitor if running in Windows Vista
            // Detecting the CPU load is a security violation in Vista
            CPULoadBox.Visible = !bVista;

            // Setup the callback routine for updating the UI
            updateUI = new UpdateUICallback(StatusUpdate);

            // Setup the callback routine for NullReference exception handling
            handleException = new ExceptionCallback(ThreadException);

            // Create the list of USB devices attached to the CyUSB.sys driver.
            usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB, new App_PnP_Callback(PnP_Event_Handler));			SetDevice();		}


		public  void PnP_Event_Handler(IntPtr pnpEvent, IntPtr hRemovedDevice)		{			if (pnpEvent.Equals(CyConst.DBT_DEVICEREMOVECOMPLETE)) 			{				usbDevices.Remove(hRemovedDevice);
                MyDevice = null;
                EndPoint = null;				SetDevice();			}			if (pnpEvent.Equals(CyConst.DBT_DEVICEARRIVAL)) 			{				usbDevices.Add();				SetDevice();			}		}		private void SetDevice()		{			USBDevice dev = usbDevices[0x04B4,0x1003];

            if (dev != null)
            {
                MyDevice = (CyUSBDevice)dev;

                GetEndpointsOfNode(MyDevice.Tree);
                if (EndPointsComboBox.Items.Count > 0)
                {
                    EndPointsComboBox.SelectedIndex = 0;
                    StartBtn.Enabled = true;
                }
            }
            else
            {
                StartBtn.Enabled = false;
                EndPointsComboBox.Items.Clear();
                EndPointsComboBox.Text = "";
            }
		}


        // Recursive routine populates EndPointsComboBox with strings 
        // representing all the endpoints in the device.
        private void GetEndpointsOfNode(TreeNode devTree)
        {
            foreach (TreeNode node in devTree.Nodes)
            {
                if (node.Nodes.Count > 0)
                    GetEndpointsOfNode(node);
                else
                {
                    CyUSBEndPoint ept = node.Tag as CyUSBEndPoint;

                    if (!node.Text.Contains("Control"))
                    {
                        CyUSBInterface ifc = node.Parent.Tag as CyUSBInterface;

                        string s = string.Format("ALT-{0}, {1} Byte, {2}", ifc.bAlternateSetting, ept.MaxPktSize, node.Text);
                        EndPointsComboBox.Items.Add(s);
                    }
                }
            }

        }

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

        private void InitializePeformanceMonitor()
        {
            // This isn't allowed in Vista.
            if (bVista) return;

            CpuCounter = new System.Diagnostics.PerformanceCounter();
            ((System.ComponentModel.ISupportInitialize)(CpuCounter)).BeginInit();

            CpuCounter.CategoryName = "Processor";
            CpuCounter.CounterName = "% Processor Time";
            CpuCounter.InstanceName = "_Total";

            ((System.ComponentModel.ISupportInitialize)(CpuCounter)).EndInit();

        }
        

        #region Windows Form Designer generated code

        private System.Windows.Forms.MainMenu mainMenu;
        private System.Windows.Forms.MenuItem menuItem1;
        private System.Windows.Forms.MenuItem menuItem2;
        private System.Windows.Forms.MenuItem ExitItem;
        private System.Windows.Forms.MenuItem menuItem3;
        private System.Windows.Forms.MenuItem AboutItem;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.ComboBox PpxBox;
        private System.Windows.Forms.ComboBox QueueBox;
        private System.Windows.Forms.TextBox SuccessBox;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.ProgressBar ProgressBar;
        private System.Windows.Forms.Button StartBtn;
        private System.Windows.Forms.Label ThroughputLabel;
        private System.Windows.Forms.TextBox FailuresBox;
        private ComboBox EndPointsComboBox;
        private Label label5;
        private GroupBox CPULoadBox;
        private Label CpuLabel;
        private ProgressBar CpuBar;
        private System.Windows.Forms.Timer PerfTimer;
        
        private IContainer components;
        
        /// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.mainMenu = new System.Windows.Forms.MainMenu(this.components);
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.ExitItem = new System.Windows.Forms.MenuItem();
            this.menuItem3 = new System.Windows.Forms.MenuItem();
            this.AboutItem = new System.Windows.Forms.MenuItem();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.PpxBox = new System.Windows.Forms.ComboBox();
            this.QueueBox = new System.Windows.Forms.ComboBox();
            this.SuccessBox = new System.Windows.Forms.TextBox();
            this.FailuresBox = new System.Windows.Forms.TextBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.ThroughputLabel = new System.Windows.Forms.Label();
            this.ProgressBar = new System.Windows.Forms.ProgressBar();
            this.StartBtn = new System.Windows.Forms.Button();
            this.EndPointsComboBox = new System.Windows.Forms.ComboBox();
            this.label5 = new System.Windows.Forms.Label();
            this.CPULoadBox = new System.Windows.Forms.GroupBox();
            this.CpuLabel = new System.Windows.Forms.Label();
            this.CpuBar = new System.Windows.Forms.ProgressBar();
            this.PerfTimer = new System.Windows.Forms.Timer(this.components);

            this.groupBox1.SuspendLayout();
            this.CPULoadBox.SuspendLayout();
            this.SuspendLayout();
            // 
            // mainMenu
            // 
            this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem1,
            this.menuItem3});
            // 
            // menuItem1
            // 
            this.menuItem1.Index = 0;
            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem2,
            this.ExitItem});
            this.menuItem1.Text = "File";
            // 
            // menuItem2
            // 
            this.menuItem2.Index = 0;
            this.menuItem2.Text = "-";
            // 
            // ExitItem
            // 
            this.ExitItem.Index = 1;
            this.ExitItem.Text = "Exit";
            this.ExitItem.Click += new System.EventHandler(this.ExitItem_Click);
            // 
            // menuItem3
            // 
            this.menuItem3.Index = 1;
            this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.AboutItem});
            this.menuItem3.Text = "Help";
            // 
            // AboutItem
            // 
            this.AboutItem.Index = 0;
            this.AboutItem.Text = "About";
            this.AboutItem.Click += new System.EventHandler(this.AboutItem_Click);
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(16, 58);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(89, 16);
            this.label1.TabIndex = 0;
            this.label1.Text = "Packets per Xfer";
            this.label1.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(16, 97);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(89, 17);
            this.label2.TabIndex = 1;
            this.label2.Text = "Xfers to Queue";
            this.label2.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // label3
            // 
            this.label3.Location = new System.Drawing.Point(215, 58);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(64, 17);
            this.label3.TabIndex = 2;
            this.label3.Text = "Successes";
            this.label3.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // label4
            // 
            this.label4.Location = new System.Drawing.Point(215, 99);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(64, 16);
            this.label4.TabIndex = 3;
            this.label4.Text = "Failures";
            this.label4.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
            // 
            // PpxBox
            // 
            this.PpxBox.Items.AddRange(new object[] {
            "1",
            "2",
            "4",
            "8",
            "16",
            "32",
            "64",
            "128"});
            this.PpxBox.Location = new System.Drawing.Point(111, 58);
            this.PpxBox.Name = "PpxBox";
            this.PpxBox.Size = new System.Drawing.Size(64, 21);
            this.PpxBox.TabIndex = 1;
            this.PpxBox.Text = "8";
            this.PpxBox.SelectedIndexChanged += new System.EventHandler(this.PpxBox_SelectedIndexChanged);
            // 
            // QueueBox
            // 
            this.QueueBox.Items.AddRange(new object[] {
            "1",
            "2",
            "4",
            "8",
            "16",
            "32",
            "64",
            "128"});
            this.QueueBox.Location = new System.Drawing.Point(111, 97);
            this.QueueBox.Name = "QueueBox";
            this.QueueBox.Size = new System.Drawing.Size(64, 21);
            this.QueueBox.TabIndex = 2;
            this.QueueBox.Text = "16";
            // 
            // SuccessBox
            // 
            this.SuccessBox.Location = new System.Drawing.Point(279, 58);
            this.SuccessBox.Name = "SuccessBox";
            this.SuccessBox.Size = new System.Drawing.Size(72, 20);
            this.SuccessBox.TabIndex = 6;
            this.SuccessBox.TabStop = false;
            this.SuccessBox.Text = "0";
            this.SuccessBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // FailuresBox
            // 
            this.FailuresBox.Location = new System.Drawing.Point(279, 98);
            this.FailuresBox.Name = "FailuresBox";
            this.FailuresBox.Size = new System.Drawing.Size(72, 20);
            this.FailuresBox.TabIndex = 7;
            this.FailuresBox.TabStop = false;
            this.FailuresBox.Text = "0";
            this.FailuresBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.ThroughputLabel);
            this.groupBox1.Controls.Add(this.ProgressBar);
            this.groupBox1.Location = new System.Drawing.Point(19, 172);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(330, 60);
            this.groupBox1.TabIndex = 8;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = " Throughput (KB/s) ";
            // 
            // ThroughputLabel
            // 
            this.ThroughputLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.ThroughputLabel.Location = new System.Drawing.Point(114, 38);
            this.ThroughputLabel.Name = "ThroughputLabel";
            this.ThroughputLabel.Size = new System.Drawing.Size(100, 16);
            this.ThroughputLabel.TabIndex = 1;
            this.ThroughputLabel.Text = "0";
            this.ThroughputLabel.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
            // 
            // ProgressBar
            // 
            this.ProgressBar.ForeColor = System.Drawing.SystemColors.HotTrack;
            this.ProgressBar.Location = new System.Drawing.Point(16, 25);
            this.ProgressBar.Maximum = 40000;
            this.ProgressBar.Name = "ProgressBar";
            this.ProgressBar.Size = new System.Drawing.Size(294, 10);
            this.ProgressBar.TabIndex = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高清不卡一二三区| 狠狠色丁香婷综合久久| 国产剧情一区在线| 欧美亚日韩国产aⅴ精品中极品| 精品国产乱码久久久久久图片 | 欧美一区二区视频在线观看| 中文字幕一区三区| 九色porny丨国产精品| 91福利视频网站| 中文字幕 久热精品 视频在线| 日本不卡一区二区三区| 日本道免费精品一区二区三区| 久久久久久久久久久久久久久99| 午夜亚洲福利老司机| av中文字幕在线不卡| 国产午夜精品久久久久久免费视| 青娱乐精品视频| 欧美熟乱第一页| 亚洲欧美视频在线观看视频| 国产xxx精品视频大全| 欧美精品一区男女天堂| 日本欧美肥老太交大片| 欧美日韩免费观看一区三区| 亚洲三级理论片| 成人av网站免费观看| 久久久精品综合| 韩国毛片一区二区三区| 欧美精品tushy高清| 国产精品国产三级国产普通话蜜臀| 极品少妇xxxx精品少妇偷拍| 欧美一区二区三区人| 天堂蜜桃一区二区三区| 欧美日韩亚洲综合在线 | 4438x亚洲最大成人网| 夜夜嗨av一区二区三区中文字幕 | 在线欧美小视频| 亚洲免费资源在线播放| 99精品欧美一区| 亚洲欧洲三级电影| www.成人在线| 国产精品久久二区二区| 99热这里都是精品| 一区免费观看视频| 色狠狠色狠狠综合| 一区二区三区四区乱视频| 色成年激情久久综合| 日韩美女精品在线| 色女孩综合影院| 一区二区三区在线观看网站| 在线看不卡av| 亚洲成人激情av| 51精品视频一区二区三区| 日本午夜精品一区二区三区电影| 欧美一区三区二区| 男人的天堂久久精品| 精品免费99久久| 国产精品综合在线视频| 国产精品网站在线播放| av色综合久久天堂av综合| 亚洲免费在线视频一区 二区| 色综合一区二区| 亚洲韩国一区二区三区| 91精品欧美综合在线观看最新| 免费在线一区观看| 国产肉丝袜一区二区| a亚洲天堂av| 亚洲一区二区精品久久av| 9191成人精品久久| 精品一区二区久久久| 国产日韩三级在线| 91社区在线播放| 午夜精品一区二区三区三上悠亚| 日韩视频永久免费| 国产91露脸合集magnet| 亚洲品质自拍视频| 91精品国产综合久久久久久久久久 | 亚洲日韩欧美一区二区在线| 欧美日韩在线不卡| 久久电影网电视剧免费观看| 国产欧美一区二区精品性色超碰| 99re这里都是精品| 偷窥少妇高潮呻吟av久久免费| 欧美一个色资源| 顶级嫩模精品视频在线看| 亚洲精品老司机| 日韩欧美在线观看一区二区三区| 东方aⅴ免费观看久久av| 亚洲成人7777| 欧美精品一区二区精品网| av欧美精品.com| 免费观看在线色综合| 中文字幕乱码一区二区免费| 欧美日韩在线播放三区| 国产一区二区三区免费观看| 亚洲人成亚洲人成在线观看图片| 欧美高清性hdvideosex| 国产成人免费视频精品含羞草妖精 | 91麻豆自制传媒国产之光| 日产国产欧美视频一区精品| 亚洲国产高清在线观看视频| 欧美丰满嫩嫩电影| 高清beeg欧美| 日韩高清中文字幕一区| 国产精品国产三级国产aⅴ中文| 3d成人h动漫网站入口| 成人高清免费观看| 蜜桃久久久久久| 亚洲天堂a在线| 久久综合久久久久88| 欧美日韩在线免费视频| 成人黄色a**站在线观看| 男人的天堂久久精品| 一区二区三区四区不卡视频| 久久久精品一品道一区| 欧美精品在线一区二区三区| gogo大胆日本视频一区| 国产一区二区精品久久| 亚洲成人动漫在线免费观看| 国产精品久久久久影视| 欧美tickling网站挠脚心| 欧美天堂亚洲电影院在线播放 | 亚洲福利电影网| 国产精品二三区| 亚洲精品一区二区三区影院 | 欧美日韩国产区一| 91日韩在线专区| 粉嫩嫩av羞羞动漫久久久| 蜜桃av一区二区三区| 亚洲成人免费在线观看| 亚洲视频每日更新| 中文字幕乱码日本亚洲一区二区 | 2017欧美狠狠色| 91麻豆精品久久久久蜜臀| 在线观看网站黄不卡| 成人黄色免费短视频| 国产成人99久久亚洲综合精品| 久久精品二区亚洲w码| 天天色综合天天| 亚洲资源中文字幕| 亚洲另类在线一区| 亚洲日本在线天堂| 亚洲婷婷综合久久一本伊一区 | 91精品国产91久久综合桃花| 欧美亚洲动漫精品| 91国模大尺度私拍在线视频| 99免费精品视频| 99久久精品免费精品国产| 丁香婷婷综合网| 成人av网址在线观看| 成人黄色小视频在线观看| 国产成人午夜精品影院观看视频 | 亚洲成人精品在线观看| 亚洲一区二区三区免费视频| 亚洲综合免费观看高清在线观看| 亚洲色欲色欲www| 中文字幕一区在线观看视频| 中文字幕精品一区| 国产精品高潮久久久久无| ㊣最新国产の精品bt伙计久久| 国产精品美女视频| 自拍偷拍亚洲激情| 亚洲精品亚洲人成人网在线播放| 一区二区三区鲁丝不卡| 亚洲福利一区二区三区| 午夜精品免费在线| 奇米一区二区三区| 极品美女销魂一区二区三区免费| 狠狠色丁香久久婷婷综| 国产精品系列在线观看| 成人福利在线看| 91国偷自产一区二区使用方法| 欧美性猛交xxxx乱大交退制版| 精品视频在线看| 日韩女同互慰一区二区| 久久奇米777| 国产精品丝袜一区| 亚洲人一二三区| 亚洲国产日产av| 麻豆91精品91久久久的内涵| 国内成人免费视频| 激情五月播播久久久精品| 国产毛片精品视频| 亚洲一二三级电影| 亚洲国产电影在线观看| 久久久久久一二三区| 久久久久99精品国产片| 欧美一区二区视频在线观看2020| 岛国av在线一区| 美女视频第一区二区三区免费观看网站 | 亚洲国产日韩精品| 综合久久一区二区三区| 亚洲一区二三区| 亚洲一区电影777| 亚洲福利国产精品| 久久99精品国产麻豆婷婷 | 久久国产精品99久久久久久老狼| 肉丝袜脚交视频一区二区| 久久精品国产亚洲5555| 国产精品一区免费在线观看| 成人免费视频视频|