Beispiel #1
0
        private void imgFile_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            String DigitalCopy = task.GetDigitalCopy(tbDocNumber.Text);

            try
            {
                if (File.Exists(DigitalCopy))
                {
                    Process.Start(new ProcessStartInfo(DigitalCopy));
                }
            }
            catch (Exception)
            {
            }
        }
        private void cmDigitalCopy_Click(object sender, RoutedEventArgs e)
        {
            Details selected    = listdoc.SelectedItem as Details;
            string  DigitalCopy = task.GetDigitalCopy(selected.DocNumber);

            if (string.IsNullOrEmpty(DigitalCopy) == false)
            {
                try
                {
                    if (File.Exists(DigitalCopy))
                    {
                        Process.Start(new ProcessStartInfo(DigitalCopy));
                    }
                }
                catch (Exception)
                {
                }
            }
            else
            {
                MessageBox.Show("This document does not have a digital copy", "No File", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }