Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            m_hUsbEventHandle = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid);
            timer1.Enabled    = true;
            Random random = new Random();

            random.NextBytes(pass);
        }
Пример #2
0
 private void Form2_Load(object sender, EventArgs e)
 {
     this.Icon = Properties.Resources.MI;
     progressBar1.Visible = false;
     m_hUsbEventHandle = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid);
     toolStripStatusLabel5.Text = " ";
     timer1.Enabled = true;
     //this.Enabled = false;
 }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Win32Usb.UnregisterForUsbEvents(m_hUsbEventHandle);
            this.Hide();
            Form2 f = new Form2();

            f.ShowDialog();
            m_hUsbEventHandle = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid);
            ReHIDUI();
            this.Show();
        }
Пример #4
0
 private void Form1_Load(object sender, EventArgs e)
 {
     //this.Text = "Mercedes Key Tool ---"+HIDDevice.SoftVersion.ToString("f2");
     this.Icon                  = Properties.Resources.MI;
     progressBar1.Visible       = false;
     m_hUsbEventHandle          = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid);
     toolStripStatusLabel2.Text = "No Device";
     timer1.Enabled             = true;
     button1.Visible            = false;
     button2.Visible            = false;
     button3.Visible            = false;
 }
Пример #5
0
 private void Form4_Load(object sender, EventArgs e)
 {
     this.Icon = Properties.Resources.MI;
     if (HIDDevice.TheHIDDevice != null)
     {
         toolStripStatusLabel1.Text = WFNetLib.Strings.StringsFunction.byteToHexStr(HIDDevice.TheHIDDevice.HexID, "");
     }
     else
     {
         this.Close();
     }
     progressBar1.Visible = false;
     m_hUsbEventHandle    = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid);
 }
Пример #6
0
 private void Form1_Load(object sender, EventArgs e)
 {
     m_hUsbEventHandle = Win32Usb.RegisterForUsbEvents(Handle, Win32Usb.HIDGuid);
     timer1.Enabled    = true;
 }
Пример #7
0
 protected override void OnHandleCreated(EventArgs e)
 {
     Win32Usb.RegisterForUsbEvents(this.Handle, Win32Usb.HIDGuid);
 }
Пример #8
0
 protected override void OnHandleCreated(EventArgs e)
 {
     base.OnHandleCreated(e);
     usbEventHandle = Win32Usb.RegisterForUsbEvents(Handle, deviceClassGuid);
 }