Tableau d'image en C#
Bonjour,
Je souhaite crée un tableau d'images en C #.
Ce tableau peut permettra de faire défiler les images sur ma fenetre graphique.
Je vous envoie mon code :
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System;
using System.Windows.Forms;
using System.Windows;
namespace Projet_Net
{
/// <summary>
/// Logique d'interaction pour MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
Image[] img;
public MainWindow()
{
InitializeComponent();
img = new Image[37];
for (int i = 0; i < 37; ++i)
{
img[i] = Image.FromFile(@"p:\Mes documents\Trombi ESILV S08 MF_fichiers\image00" + (i + 1) + ".jpg");
}
}
}
La fonction FromFile n'est pas reconnu. Si j'ajoute la reférence System.drawing, le programme ne reconnait plus Image et la Fonction FromFile.
J'ai besoin de votre aide pour résoudre ce problème.
Merci
Je souhaite crée un tableau d'images en C #.
Ce tableau peut permettra de faire défiler les images sur ma fenetre graphique.
Je vous envoie mon code :
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System;
using System.Windows.Forms;
using System.Windows;
namespace Projet_Net
{
/// <summary>
/// Logique d'interaction pour MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
Image[] img;
public MainWindow()
{
InitializeComponent();
img = new Image[37];
for (int i = 0; i < 37; ++i)
{
img[i] = Image.FromFile(@"p:\Mes documents\Trombi ESILV S08 MF_fichiers\image00" + (i + 1) + ".jpg");
}
}
}
La fonction FromFile n'est pas reconnu. Si j'ajoute la reférence System.drawing, le programme ne reconnait plus Image et la Fonction FromFile.
J'ai besoin de votre aide pour résoudre ce problème.
Merci