Beispiel #1
0
        private void ImageCH_Click(object sender, RoutedEventArgs e)
        {
            string         image_path     = System.IO.Directory.GetCurrentDirectory() + @"images\user.jpg";
            OpenFileDialog openFileDialog = new OpenFileDialog();

            if (openFileDialog.ShowDialog() == true)
            {
                image_path = openFileDialog.FileName;
                using (DynDB db = new DynDB())
                {
                    db.Register($"UPDATE USERS SET PHOTO = @0 WHERE ID = {Int32.Parse(_Window._identity)}", image_path);
                    ImageDyn.Source           = db.Load_Image(_Window._identity);
                    _Window.image_prof.Source = db.Load_Image(_Window._identity);
                }
            }
        }