Example #1
0
        internal void SelectItem(PatientEducationObject item)
        {
            {
                if (item.isCached())
                {
                    try
                    {
                        Uri localUri = new Uri(System.IO.Path.Combine(Environment.CurrentDirectory, item.cacheFileName()));
                        //MessageBox.Show(localUri.ToString());
                        //SingleItemBrowser.Source = localUri;

                        SingleItemBrowser.Source = item.URL;
                    }
                    catch (System.Exception ex)
                    {
                        MessageBox.Show("Exception: " + ex.Message);
                    }

                    item.ShowDocument(currentReviewDocument);
                }

                currentReviewDocument = item;

                LoadIssues();
            }
        }
Example #2
0
        private void GenderComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var    comboBox                 = sender as ComboBox;
            String selectedGender           = comboBox.SelectedItem.ToString();
            PatientEducationObject selected = (HTMLDocument)EducationItemsDataGrid.SelectedItem;

            selected.UpdateDatabaseGender(selectedGender);
        }
 internal void registerNewDocument(PatientEducationObject input, string equivalentURL = null)
 {
     EducationObjects.Add(equivalentURL, input);
     EducationCollection.Add(input);
     if (input.DocID >= 0)
     {
         EducationObjectsByDatabaseID.Add(input.DocID, input);
     }
 }
Example #4
0
        private void ApplyButton_Click(object sender, RoutedEventArgs e)
        {
            String selectedGender = GenderComboBox.SelectedItem.ToString();

            foreach (HTMLDocument element in mainWindow.EducationItemsDataGrid.SelectedItems)
            {
                PatientEducationObject selected = element;
                selected.UpdateDatabaseGender(selectedGender);
                selected.GenderString = selectedGender;
            }

            Close();
        }
Example #5
0
        private void setOutputDirectory(string directory)
        {
            OutputDirectoryPath.Text = directory;
            EducationDatabase.Self().CachePath = directory;

            if (directory.Length > 0 && Directory.Exists(directory))
            {
                if (!Directory.Exists(PatientEducationObject.cachePath()))
                {
                    Directory.CreateDirectory(PatientEducationObject.cachePath());
                }

                if (!Directory.Exists(PatientEducationObject.imagesPath()))
                {
                    Directory.CreateDirectory(PatientEducationObject.imagesPath());
                }

                Properties.Settings.Default.OutputDirectory = directory;
                Properties.Settings.Default.Save();
            }
        }