Exemplo n.º 1
0
        /// <summary>
        /// 点击拍照
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnImageType_Click(object sender, RoutedEventArgs e)
        {
            Button btn = (Button)sender as Button;

            if (string.IsNullOrEmpty(Order.OrderNum) || string.IsNullOrEmpty(Order.SampleID))
            {
                MessageBox.Show("Please scan OrderNum and  SampleID first", "Error");
            }
            else
            {
                Order.PhotoType = btn.Content.ToString();
                PhotoType       = Order.PhotoType;
                CameraWindow camera = new CameraWindow
                {
                    Order = Order,
                    Owner = App.CurrentWindow
                };
                if (camera.ShowDialog() == true)
                {
                    return;
                }
                BrowserModule module = new BrowserModule {
                    Order = Order, ParentControl = this
                };
                App.CurrentWindow.brMain.Child = module;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 拍照
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnTakePhoto_Click(object sender, RoutedEventArgs e)
        {
            CameraWindow camera = new CameraWindow
            {
                Order = Order,
                Owner = App.CurrentWindow
            };

            if (camera.ShowDialog() == true)
            {
                return;
            }
            Binding_Data(Order.PhotoType);
        }