示例#1
0
        private void btn_ClearBarcode_Click(object sender, RoutedEventArgs e)
        {
            if (ServiceProvider.DeviceManager.SelectedCameraDevice == null)
            {
                Dispatcher.BeginInvoke(new Action(delegate
                {
                    Barcode          = "";
                    txt_Barcode.Text = "";
                    CheckBarcode();
                    txt_Barcode.Focus();
                }));
                return;
            }

            Dispatcher.BeginInvoke(new Action(delegate
            {
                if (BarcodeClearDisplay == null || !BarcodeClearDisplay.IsVisible)
                {
                    BarcodeClearDisplay = new CameraControl.Plugins.windows.DialogPrompt("Ensuring transfers have completed...\nThis window will close automatically.");
                    BarcodeClearDisplay.Show();
                    BarcodeClearTimer          = new System.Windows.Threading.DispatcherTimer();
                    BarcodeClearTimer.Interval = new TimeSpan(0, 0, 1);
                    BarcodeClearTimer.Tick    += on_BarcodeClearTimer_Tick;
                    BarcodeClearTimer.Start();
                }
            }));
        }
示例#2
0
 public void ShowWarning(string msg)
 {
     Dispatcher.BeginInvoke(new Action(delegate
     {
         FlashScreen(-1);
         var prompt = new CameraControl.Plugins.windows.DialogPrompt(msg);
         prompt.ShowDialog();
         FlashScreenStop();
     }));
 }
示例#3
0
        private void on_txt_Barcode_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)
        {
            if (ServiceProvider.DeviceManager.SelectedCameraDevice != null && ServiceProvider.DeviceManager.SelectedCameraDevice.IsBusy)
            {
                Dispatcher.BeginInvoke(new Action(delegate
                {
                    var prompt = new CameraControl.Plugins.windows.DialogPrompt("Should not clear barcode: transfers still pending.");
                    prompt.ShowDialog();
                }));
                return;
            }

            Barcode     = txt_Barcode.Text; // Expedite update
            BarcodeUsed = false;
            CheckBarcode();
        }