2019-01-19 11:04:17 +01:00
|
|
|
|
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.Shapes;
|
2019-01-19 22:29:09 +01:00
|
|
|
|
using System.IO;
|
|
|
|
|
using Microsoft.Win32;
|
2019-01-19 11:04:17 +01:00
|
|
|
|
|
|
|
|
|
namespace ProjetTheAlone.View
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Logique d'interaction pour FicBeneficiaireEncode.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class FicBeneficiaireEncode : Window
|
|
|
|
|
{
|
|
|
|
|
public FicBeneficiaireEncode()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2019-01-20 11:46:45 +01:00
|
|
|
|
DataContext = new ViewModel.VM_Beneficiaire();
|
2019-01-19 22:29:09 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BtnQuitter_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnOpenFile_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
|
|
|
|
openFileDialog.Filter = "Image files (*.png;*.jpeg)|*.png;*.jpeg|All files (*.*)|*.*";
|
|
|
|
|
if (openFileDialog.ShowDialog() == true)
|
|
|
|
|
{ string FileName = openFileDialog.FileName;
|
|
|
|
|
|
|
|
|
|
txtEditor.Text = FileName;
|
|
|
|
|
|
|
|
|
|
//FileStream fs = new System.IO.FileStream(@""+FileName+"", FileMode.Open, FileAccess.Read);
|
|
|
|
|
//BinaryReader br = new BinaryReader(fs);
|
|
|
|
|
//byte[] result = br.ReadBytes((int)fs.Length);
|
|
|
|
|
|
|
|
|
|
ImageFile.Source = new BitmapImage(new Uri(@"" + FileName + ""));
|
|
|
|
|
}
|
2019-01-19 11:04:17 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|