Example #1
0
        private void New_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog op = new OpenFileDialog();

            op.Title = "Select new file with Vet findings";

            if (op.ShowDialog() == true)
            {
                string filepath    = op.FileName;
                string thisCatPath = _pdf + "_" + DateTime.Now.ToShortDateString();
                File.Copy(filepath, thisCatPath, true);
                _selectedCat.vetFindings = thisCatPath;
            }
            Close();
            PDFReader reader = new PDFReader(_selectedCat.vetFindings, _selectedCat);

            reader.Show();
        }
Example #2
0
        private void Pdf_Click(object sender, RoutedEventArgs e)
        {
            string         iName = _selectedCat.catName;
            OpenFileDialog op    = new OpenFileDialog();

            op.Title = "Select a file with findings";
            if (Directory.Exists(appPath + iName) == false)
            {
                Directory.CreateDirectory(appPath + iName);
            }
            op.InitialDirectory = appPath + iName;
            if (op.ShowDialog() == true)
            {
                string filepath    = op.FileName;
                string fileName    = op.SafeFileName;
                string thisCatPath = appPath + iName + @"\" + fileName;
                File.Copy(filepath, thisCatPath, true);
                _selectedCat.vetFindings = thisCatPath;
                PDFReader reader = new PDFReader(thisCatPath, _selectedCat);
                reader.Show();
            }
        }