コード例 #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.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.windows.DialogPrompt(msg);
         prompt.ShowDialog();
         FlashScreenStop();
     }));
 }