Ejemplo n.º 1
0
        public Proprety(fichier f, Dossier d)
        {
            InitializeComponent();
            int size;

            if (f != null && d == null)
            {
                pictureBox1.BackgroundImage = imageList1.Images[1];
                textBox1.Text = f.GetNom().Trim() + "." + f.GetFormat().Trim();
                label4.Text   = f.GetFormat();

                if (f.GetBlob() != null)
                {
                    size = f.GetBlob().Length;
                }
                else
                {
                    size = 0;
                }

                label5.Text = size.ToString() + " Octets";
                label3.Text = null;
                label6.Text = null;
                label8.Text = f.GetDatecreation().ToString();
            }
            if (d != null && f == null)
            {
                pictureBox1.BackgroundImage = imageList1.Images[0];
                textBox1.Text = d.GetNom().Trim();
                label4.Text   = "Dossier";
                size          = d.Getlistoffiles().Count + d.Getlistofdir().Count;
                label5.Text   = size.ToString();
                label3.Text   = "Contains : ";
                label6.Text   = d.Getlistoffiles().Count + " files," + d.Getlistofdir().Count + " directorys";
                label8.Text   = d.GetDatecreation().ToString();
            }
        }