Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using Microsoft.Win32;
- namespace IW5MoviesApp.UserControls
- {
- /// <summary>
- /// Interaction logic for AddMovieToDatabase.xaml
- /// </summary>
- public partial class AddMovieToDatabase : UserControl
- {
- public AddMovieToDatabase()
- {
- InitializeComponent();
- }
- private void btnOpen_File_Click(object sender, RoutedEventArgs e)
- {
- string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
- string sFileName;
- OpenFileDialog openFileDialog = new OpenFileDialog();
- openFileDialog.Filter = "Image files (*.png;*.jpeg;*.jpg)|*.png;*.jpeg;*.jpg|All files (*.*)|*.*";
- openFileDialog.InitialDirectory = path;
- if (openFileDialog.ShowDialog() != true)
- sFileName = string.Empty;
- else
- {
- sFileName = openFileDialog.FileName;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement