/// <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; } }
/// <summary> /// 照片预览 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnBrowser_Click(object sender, RoutedEventArgs e) { Order order = dgOtsOrder.SelectedItem as Order; if (order != null) { BrowserModule module = new BrowserModule(order); CommonHelper.MainWindow.brMain.Child = module; } }
/// <summary> /// 照片预览 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnBrowser_Click(object sender, RoutedEventArgs e) { if (SelectedItem != null) { BrowserModule module = new BrowserModule { Order = SelectedItem, ParentControl = this }; App.CurrentWindow.brMain.Child = module; } else { CommonHelper.NoDataSelected(); } }
/// <summary> /// 照片预览 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnBrowser_Click(object sender, RoutedEventArgs e) { Order order = dgSlimOrder.SelectedItem as Order; if (order == null) { } if (!CommonHelper.UserControls.ContainsKey("Browser")) { BrowserModule browserModule = new BrowserModule(order); CommonHelper.MainWindow.brMain.Child = browserModule; CommonHelper.UserControls.Add("Browser", browserModule); } else { CommonHelper.MainWindow.brMain.Child = CommonHelper.UserControls["Browser"]; } }