private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                SqliteDataReadOperations.ReadMonumentFeatures(conn, MonumentComboBoxValue, ref monumentFeatures);


                string Path = monumentFeatures.imagePath;

                Image image = new Image();
                image.Height = 300;
                image.Width  = 320;
                BitmapImage src = new BitmapImage();
                src.BeginInit();
                src.UriSource   = new Uri(Path, UriKind.Absolute);
                src.CacheOption = BitmapCacheOption.OnLoad;
                src.EndInit();
                MonumentImage.Source = src;

                MonumentTextBox.Text = monumentFeatures.description;
            }
            catch (UriFormatException)
            {
                MessageBox.Show("Nie udało się załadowac danych!");
                this.Close();
            }
            catch (System.IO.IOException)
            {
                MessageBox.Show("Nie udało się załadować obrazu!");
                this.Close();
            }
        }
Ejemplo n.º 2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     SqliteDataReadOperations.ReadCountries(conn, countries, CountryComboBox);
     SqliteDataReadOperations.ReadCities(conn, cities);
     SqliteDataReadOperations.ReadMonuments(conn, monuments);
 }