亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩一区二区电影| 日韩精品三区四区| 日本一不卡视频| 欧美日韩国产在线播放网站| 日韩精品在线网站| 亚洲免费三区一区二区| 美女www一区二区| 在线观看一区二区视频| 欧美激情在线看| 免费精品99久久国产综合精品| 99久久99精品久久久久久| 精品国产污网站| 日本色综合中文字幕| 91福利精品视频| 亚洲色图视频免费播放| 国产精品18久久久久久久网站| 91精品国产一区二区| 亚洲国产精品一区二区www在线| 一区二区欧美在线观看| av网站免费线看精品| 久久精品一区蜜桃臀影院| 免费看欧美美女黄的网站| 欧美日韩综合在线| 综合自拍亚洲综合图不卡区| 国产精品亚洲第一| 蜜臀av在线播放一区二区三区| 91精品国产综合久久精品| 777奇米成人网| 亚洲国产一二三| 欧洲国内综合视频| 亚洲人成精品久久久久久| 成人黄色片在线观看| 久久久精品黄色| 国产精品一区一区三区| 精品福利一二区| 国产精品热久久久久夜色精品三区 | 午夜欧美在线一二页| 色屁屁一区二区| 亚洲欧美二区三区| 一本一道久久a久久精品综合蜜臀| 欧美日韩中文国产| 亚洲综合一二三区| 欧美在线一二三四区| 亚洲精品视频一区二区| 欧美不卡一二三| 久久97超碰色| 精品粉嫩超白一线天av| 黄色成人免费在线| 国产亚洲精品aa| 成人免费毛片高清视频| 欧美国产精品一区| 波多野结衣的一区二区三区| 欧美日韩成人一区二区| 亚洲成人黄色小说| 91精品国产综合久久福利| 日本不卡在线视频| 欧美zozozo| 91麻豆精品国产91久久久久久 | 日本韩国欧美在线| 一区二区三区精品在线| 欧美日韩在线一区二区| 日韩激情一区二区| 欧美一二三区精品| 日韩免费高清视频| 天天综合色天天| 日韩精品在线看片z| 国产一本一道久久香蕉| 国产精品成人免费精品自在线观看| 99re免费视频精品全部| 亚洲图片欧美色图| 欧美一区二区三区成人| 国产一区二区三区免费观看| 中文字幕乱码一区二区免费| 色婷婷久久综合| 日日嗨av一区二区三区四区| 久久综合99re88久久爱| www.日本不卡| 亚洲成人免费视| 久久先锋影音av鲁色资源| 99国产精品久久久久久久久久| 精品国产区一区| 波多野结衣的一区二区三区| 亚洲图片有声小说| 精品国产精品一区二区夜夜嗨| 国产精品亚洲一区二区三区在线| 亚洲免费观看视频| 欧美一区二区三区喷汁尤物| 国产乱人伦精品一区二区在线观看 | 欧美精品一区二区三区在线播放 | 捆绑调教一区二区三区| 欧美激情资源网| 欧美在线影院一区二区| 韩国女主播一区| 亚洲精品成人精品456| 日韩欧美的一区| 91社区在线播放| 日本一区二区不卡视频| 欧美三级视频在线观看| 国产乱人伦精品一区二区在线观看| 夜夜揉揉日日人人青青一国产精品| 日韩限制级电影在线观看| 成人精品视频一区二区三区 | 91麻豆精品在线观看| 日本强好片久久久久久aaa| 国产欧美日韩在线看| 欧美手机在线视频| 国产黄色精品网站| 午夜精品在线视频一区| 欧美激情在线一区二区| 国产在线精品一区二区不卡了 | 国产精品一区二区三区四区| 伊人婷婷欧美激情| 久久久美女毛片| 欧美剧情片在线观看| 成人在线视频一区| 美女网站色91| 亚洲成人手机在线| 国产精品久久久久久亚洲伦| 欧美成人一区二区| 欧美日韩三级在线| 99免费精品在线观看| 久久国产精品99久久久久久老狼| 亚洲精品日日夜夜| 中文一区一区三区高中清不卡| 精品久久久久久综合日本欧美| 欧美无砖砖区免费| 一区二区在线观看免费视频播放| 久久久久久久av麻豆果冻| 4438x亚洲最大成人网| caoporen国产精品视频| 国产米奇在线777精品观看| 日韩不卡手机在线v区| 亚洲综合成人在线| 国产精品美女久久久久久| 精品久久久久久久一区二区蜜臀| 婷婷综合五月天| www亚洲一区| 欧美一区二区三区视频| 欧美三电影在线| 欧美亚洲综合在线| 91蜜桃免费观看视频| 99天天综合性| 波多野结衣视频一区| 成人手机电影网| 粉嫩13p一区二区三区| 国产一区二区三区不卡在线观看| 蜜桃一区二区三区在线观看| 水蜜桃久久夜色精品一区的特点 | 久久久99精品免费观看| 欧美zozozo| 亚洲精品在线观看网站| 欧美电视剧在线观看完整版| 国产ts人妖一区二区| 国产精品伊人色| 国产成人亚洲综合色影视| 国产综合色视频| 国产精品911| 国产成人久久精品77777最新版本| 看电影不卡的网站| 国产一区二区三区四区在线观看| 日韩av网站在线观看| 日本在线不卡视频一二三区| 色狠狠色狠狠综合| caoporm超碰国产精品| 92国产精品观看| 91论坛在线播放| 欧美亚洲禁片免费| 欧美日韩国产一区二区三区地区| 欧美日韩性生活| 91麻豆精品国产自产在线观看一区| 69堂成人精品免费视频| 日韩一区二区在线观看视频 | 99久久久精品| 色999日韩国产欧美一区二区| 91久久精品国产91性色tv| 在线观看91视频| 7777精品伊人久久久大香线蕉完整版 | 青青草国产成人99久久| 久久福利资源站| 成人亚洲一区二区一| 91在线观看一区二区| 欧美三级日韩在线| 大白屁股一区二区视频| av一区二区三区黑人| 欧美性视频一区二区三区| 在线不卡中文字幕播放| 亚洲啪啪综合av一区二区三区| 亚洲综合另类小说| 欧美bbbbb| 国产91丝袜在线播放九色| 99久久免费视频.com| 日本国产一区二区| 欧美一区二区三区播放老司机| 久久久久久亚洲综合影院红桃| 国产精品每日更新| 亚洲成人中文在线| 国产伦精品一区二区三区免费| 国产精品美女久久久久久久网站| 在线播放国产精品二区一二区四区| 日韩欧美123|