Esempio n. 1
0
 public static void WaitForDevice()
 {
     while (!Fel.DeviceExists())
     {
         Thread.Sleep(100);
     }
 }
Esempio n. 2
0
 private void timer_Tick(object sender, EventArgs e)
 {
     if (Fel.DeviceExists(vid, pid))
     {
         DialogResult  = DialogResult.OK;
         timer.Enabled = false;
     }
 }
Esempio n. 3
0
 private void timer_Tick(object sender, EventArgs e)
 {
     if (Fel.DeviceExists())
     {
         DialogResult  = DialogResult.OK;
         timer.Enabled = false;
         deviceFound   = true;
         Close();
     }
 }
Esempio n. 4
0
 public static bool WaitForDevice(UInt16 vid, UInt16 pid)
 {
     if (!Fel.DeviceExists(vid, pid))
     {
         var form = new WaitingForm(vid, pid);
         form.ShowDialog();
         return(form.DialogResult == DialogResult.OK);
     }
     return(true);
 }
Esempio n. 5
0
        public static bool WaitForDevice(UInt16 vid, UInt16 pid, IWin32Window owner)
        {
            if (Fel.DeviceExists(vid, pid))
            {
                return(true);
            }
            var form = new WaitingFelForm(vid, pid);

            form.ShowDialog(owner);
            return(form.DialogResult == DialogResult.OK);
        }
Esempio n. 6
0
 private void WaitingForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!Fel.DeviceExists(vid, pid))
     {
         if (Tasks.MessageForm.Show(Resources.AreYouSure, Resources.DoYouWantCancel, Resources.sign_warning, new Tasks.MessageForm.Button[] { Tasks.MessageForm.Button.Yes, Tasks.MessageForm.Button.No }, Tasks.MessageForm.DefaultButton.Button2) == Tasks.MessageForm.Button.No)
         {
             e.Cancel = true;
         }
         else
         {
             DialogResult = DialogResult.Abort;
         }
     }
 }
Esempio n. 7
0
 private void WaitingForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!Fel.DeviceExists(vid, pid))
     {
         if (MessageBox.Show(this, Resources.DoYouWantCancel, Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
             == System.Windows.Forms.DialogResult.No)
         {
             e.Cancel = true;
         }
         else
         {
             DialogResult = DialogResult.Abort;
         }
     }
 }