begin process at 2010 02 10 12:16:01
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

.NET

 > TRANSFER DES FICHIER + L'UTILISATION DES THREAD

TRANSFER DES FICHIER + L'UTILISATION DES THREAD


 Information sur la source

Note :
5 / 10 - par 2 personnes
5,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :.NET Source .NET ( DotNet ) Classé sous :transfert, fichier, thread Niveau :Débutant Date de création :03/06/2004 Vu / téléchargé :11 681 / 530

Auteur : crack_xp

Ecrire un message privé
Site perso
Commentaire sur cette source (5)
Ajouter un commentaire et/ou une note

 Description

Cliquez pour voir la capture en taille normale
Ce code permet de transferer les fichier en local en convertissant les fichier en Bytes
avec un thread apart.....

Source

  • using System;
  • using System.Drawing;
  • using System.Collections;
  • using System.ComponentModel;
  • using System.Windows.Forms;
  • using System.Data;
  • using System.IO;
  • using System.Xml;
  • using System.Threading;
  • namespace BctDepository
  • {
  • /// <summary>
  • /// Summary description for Form1.
  • /// </summary>
  • public class Form1 : System.Windows.Forms.Form
  • {
  • //private int currentOrthoDirName,currentPatientDirName,currentExamenDirName;
  • string pathFrom,pathTo;
  • private Thread thread = null;
  • private System.Windows.Forms.GroupBox groupBox1;
  • private System.Windows.Forms.Button browseSource;
  • private System.Windows.Forms.GroupBox groupBox2;
  • private System.Windows.Forms.Button browseDestination;
  • private System.Windows.Forms.Button button1;
  • private System.Windows.Forms.OpenFileDialog openFile;
  • private System.Windows.Forms.TextBox textSource;
  • private System.Windows.Forms.TextBox txt;
  • private System.Windows.Forms.TextBox textDestination;
  • private System.Windows.Forms.Button exit;
  • private System.Windows.Forms.SaveFileDialog saveFile;
  • private System.Windows.Forms.Label fileSizeFromLabel;
  • /// <summary>
  • /// Required designer variable.
  • /// </summary>
  • private System.ComponentModel.Container components = null;
  • public Form1()
  • {
  • //
  • // Required for Windows Form Designer support
  • //
  • InitializeComponent();
  • //
  • // TODO: Add any constructor code after InitializeComponent call
  • //
  • }
  • /// <summary>
  • /// Clean up any resources being used.
  • /// </summary>
  • protected override void Dispose( bool disposing )
  • {
  • if( disposing )
  • {
  • if (components != null)
  • {
  • components.Dispose();
  • }
  • }
  • base.Dispose( disposing );
  • }
  • #region Windows Form Designer generated code
  • /// <summary>
  • /// Required method for Designer support - do not modify
  • /// the contents of this method with the code editor.
  • /// </summary>
  • private void InitializeComponent()
  • {
  • this.groupBox1 = new System.Windows.Forms.GroupBox();
  • this.textSource = new System.Windows.Forms.TextBox();
  • this.browseSource = new System.Windows.Forms.Button();
  • this.groupBox2 = new System.Windows.Forms.GroupBox();
  • this.textDestination = new System.Windows.Forms.TextBox();
  • this.browseDestination = new System.Windows.Forms.Button();
  • this.button1 = new System.Windows.Forms.Button();
  • this.openFile = new System.Windows.Forms.OpenFileDialog();
  • this.txt = new System.Windows.Forms.TextBox();
  • this.exit = new System.Windows.Forms.Button();
  • this.saveFile = new System.Windows.Forms.SaveFileDialog();
  • this.fileSizeFromLabel = new System.Windows.Forms.Label();
  • this.groupBox1.SuspendLayout();
  • this.groupBox2.SuspendLayout();
  • this.SuspendLayout();
  • //
  • // groupBox1
  • //
  • this.groupBox1.Controls.Add(this.textSource);
  • this.groupBox1.Controls.Add(this.browseSource);
  • this.groupBox1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  • this.groupBox1.Location = new System.Drawing.Point(8, 8);
  • this.groupBox1.Name = "groupBox1";
  • this.groupBox1.Size = new System.Drawing.Size(552, 48);
  • this.groupBox1.TabIndex = 0;
  • this.groupBox1.TabStop = false;
  • this.groupBox1.Text = "Source Path";
  • //
  • // textSource
  • //
  • this.textSource.Location = new System.Drawing.Point(8, 16);
  • this.textSource.Name = "textSource";
  • this.textSource.Size = new System.Drawing.Size(448, 20);
  • this.textSource.TabIndex = 1;
  • this.textSource.Text = "";
  • //
  • // browseSource
  • //
  • this.browseSource.Location = new System.Drawing.Point(464, 15);
  • this.browseSource.Name = "browseSource";
  • this.browseSource.TabIndex = 0;
  • this.browseSource.Text = "Browse";
  • this.browseSource.Click += new System.EventHandler(this.browseSource_Click);
  • //
  • // groupBox2
  • //
  • this.groupBox2.Controls.Add(this.textDestination);
  • this.groupBox2.Controls.Add(this.browseDestination);
  • this.groupBox2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  • this.groupBox2.Location = new System.Drawing.Point(8, 64);
  • this.groupBox2.Name = "groupBox2";
  • this.groupBox2.Size = new System.Drawing.Size(552, 48);
  • this.groupBox2.TabIndex = 3;
  • this.groupBox2.TabStop = false;
  • this.groupBox2.Text = "Destination Path";
  • //
  • // textDestination
  • //
  • this.textDestination.Location = new System.Drawing.Point(8, 16);
  • this.textDestination.Name = "textDestination";
  • this.textDestination.Size = new System.Drawing.Size(448, 20);
  • this.textDestination.TabIndex = 6;
  • this.textDestination.Text = "";
  • //
  • // browseDestination
  • //
  • this.browseDestination.Location = new System.Drawing.Point(464, 15);
  • this.browseDestination.Name = "browseDestination";
  • this.browseDestination.TabIndex = 0;
  • this.browseDestination.Text = "Browse";
  • this.browseDestination.Click += new System.EventHandler(this.browseDestination_Click);
  • //
  • // button1
  • //
  • this.button1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  • this.button1.Location = new System.Drawing.Point(384, 120);
  • this.button1.Name = "button1";
  • this.button1.Size = new System.Drawing.Size(96, 23);
  • this.button1.TabIndex = 2;
  • this.button1.Text = "Transfer";
  • this.button1.Click += new System.EventHandler(this.button1_Click);
  • //
  • // openFile
  • //
  • this.openFile.Filter = "All Files (*.*) | *.*";
  • //
  • // txt
  • //
  • this.txt.Location = new System.Drawing.Point(0, 0);
  • this.txt.Name = "txt";
  • this.txt.TabIndex = 0;
  • this.txt.Text = "";
  • //
  • // exit
  • //
  • this.exit.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  • this.exit.Location = new System.Drawing.Point(484, 120);
  • this.exit.Name = "exit";
  • this.exit.TabIndex = 8;
  • this.exit.Text = "Exit";
  • this.exit.Click += new System.EventHandler(this.exit_Click);
  • //
  • // saveFile
  • //
  • this.saveFile.Filter = "All Files (*.*) | *.*";
  • //
  • // fileSizeFromLabel
  • //
  • this.fileSizeFromLabel.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  • this.fileSizeFromLabel.Location = new System.Drawing.Point(8, 120);
  • this.fileSizeFromLabel.Name = "fileSizeFromLabel";
  • this.fileSizeFromLabel.Size = new System.Drawing.Size(360, 16);
  • this.fileSizeFromLabel.TabIndex = 9;
  • this.fileSizeFromLabel.Text = "File Size ( 0.0 Ko)";
  • //
  • // Form1
  • //
  • this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  • this.ClientSize = new System.Drawing.Size(570, 152);
  • this.Controls.Add(this.fileSizeFromLabel);
  • this.Controls.Add(this.exit);
  • this.Controls.Add(this.groupBox2);
  • this.Controls.Add(this.groupBox1);
  • this.Controls.Add(this.button1);
  • this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
  • this.Name = "Form1";
  • this.Text = "Transfer Files By Converting It\'s to Bytes";
  • this.groupBox1.ResumeLayout(false);
  • this.groupBox2.ResumeLayout(false);
  • this.ResumeLayout(false);
  • }
  • #endregion
  • /// <summary>
  • /// The main entry point for the application.
  • /// </summary>
  • [STAThread]
  • static void Main()
  • {
  • Application.Run(new Form1());
  • }
  • private void browseSource_Click(object sender, System.EventArgs e) {
  • if (openFile.ShowDialog()==DialogResult.OK){
  • textSource.Text=openFile.FileName;
  • }
  • FileStream sizeFile = new FileStream(textSource.Text,FileMode.Open,FileAccess.Read);
  • fileSizeFromLabel.Text="File Size ( "+(sizeFile.Length/1024) +" Ko)";
  • sizeFile.Close();
  • }
  • private void button1_Click(object sender, System.EventArgs e) {
  • try{
  • pathFrom = textSource.Text ;
  • pathTo = textDestination.Text;
  • ThreadStart threadStart = new ThreadStart(lunchThread);
  • thread = new Thread(threadStart);
  • thread.Start();
  • }catch(Exception ex)
  • {
  • MessageBox.Show(ex.ToString());
  • }
  • }
  • private void lunchThread()
  • {
  • transferFile(pathFrom,pathTo);
  • }
  • private void transferFile(string pathFrom,string pathTo)
  • {
  • try{
  • FileStream streamRead = new FileStream(pathFrom,FileMode.Open,FileAccess.Read);
  • FileStream streamWriter = new FileStream(pathTo,FileMode.CreateNew,FileAccess.ReadWrite);
  • int len = (int)streamRead.Length;
  • Byte[] byteFile = new Byte[len];
  • streamRead.Read(byteFile,0,len);
  • streamWriter.Write(byteFile,0,byteFile.Length);
  • streamRead.Close();
  • streamWriter.Close();
  • MessageBox.Show("Transfered success","Crack_xp Demo",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
  • }catch (Exception ex){
  • MessageBox.Show(ex.ToString(),"Exception in Transfer File",MessageBoxButtons.OK,MessageBoxIcon.Warning);
  • MessageBox.Show("Transfered Filed!!","Crack_xp Demo",MessageBoxButtons.OK,MessageBoxIcon.Error);
  • }
  • }
  • private void exit_Click(object sender, System.EventArgs e) {
  • Application.Exit();
  • }
  • private void browseDestination_Click(object sender, System.EventArgs e) {
  • try{
  • saveFile.FileName=textSource.Text.Remove(0,textSource.Text.LastIndexOf("\\"));
  • if (saveFile.ShowDialog()==DialogResult.OK){
  • textDestination.Text=saveFile.FileName;
  • }
  • }catch(Exception ex)
  • {
  • MessageBox.Show(ex.ToString(),"Exception in Transfer File",MessageBoxButtons.OK,MessageBoxIcon.Warning);
  • }
  • }
  • }
  • }
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Xml;
using System.Threading;

namespace BctDepository
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{		
		//private int currentOrthoDirName,currentPatientDirName,currentExamenDirName;		
		string pathFrom,pathTo;	
		private Thread thread = null;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Button browseSource;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Button browseDestination;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.OpenFileDialog openFile;
		private System.Windows.Forms.TextBox textSource;
		private System.Windows.Forms.TextBox txt;
		private System.Windows.Forms.TextBox textDestination;
		private System.Windows.Forms.Button exit;
		private System.Windows.Forms.SaveFileDialog saveFile;
		private System.Windows.Forms.Label fileSizeFromLabel;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textSource = new System.Windows.Forms.TextBox();
			this.browseSource = new System.Windows.Forms.Button();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.textDestination = new System.Windows.Forms.TextBox();
			this.browseDestination = new System.Windows.Forms.Button();
			this.button1 = new System.Windows.Forms.Button();
			this.openFile = new System.Windows.Forms.OpenFileDialog();
			this.txt = new System.Windows.Forms.TextBox();
			this.exit = new System.Windows.Forms.Button();
			this.saveFile = new System.Windows.Forms.SaveFileDialog();
			this.fileSizeFromLabel = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.textSource);
			this.groupBox1.Controls.Add(this.browseSource);
			this.groupBox1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.groupBox1.Location = new System.Drawing.Point(8, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(552, 48);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Source Path";
			// 
			// textSource
			// 
			this.textSource.Location = new System.Drawing.Point(8, 16);
			this.textSource.Name = "textSource";
			this.textSource.Size = new System.Drawing.Size(448, 20);
			this.textSource.TabIndex = 1;
			this.textSource.Text = "";
			// 
			// browseSource
			// 
			this.browseSource.Location = new System.Drawing.Point(464, 15);
			this.browseSource.Name = "browseSource";
			this.browseSource.TabIndex = 0;
			this.browseSource.Text = "Browse";
			this.browseSource.Click += new System.EventHandler(this.browseSource_Click);
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.textDestination);
			this.groupBox2.Controls.Add(this.browseDestination);
			this.groupBox2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.groupBox2.Location = new System.Drawing.Point(8, 64);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(552, 48);
			this.groupBox2.TabIndex = 3;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "Destination Path";
			// 
			// textDestination
			// 
			this.textDestination.Location = new System.Drawing.Point(8, 16);
			this.textDestination.Name = "textDestination";
			this.textDestination.Size = new System.Drawing.Size(448, 20);
			this.textDestination.TabIndex = 6;
			this.textDestination.Text = "";
			// 
			// browseDestination
			// 
			this.browseDestination.Location = new System.Drawing.Point(464, 15);
			this.browseDestination.Name = "browseDestination";
			this.browseDestination.TabIndex = 0;
			this.browseDestination.Text = "Browse";
			this.browseDestination.Click += new System.EventHandler(this.browseDestination_Click);
			// 
			// button1
			// 
			this.button1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.button1.Location = new System.Drawing.Point(384, 120);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(96, 23);
			this.button1.TabIndex = 2;
			this.button1.Text = "Transfer";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// openFile
			// 
			this.openFile.Filter = "All Files (*.*) | *.*";
			// 
			// txt
			// 
			this.txt.Location = new System.Drawing.Point(0, 0);
			this.txt.Name = "txt";
			this.txt.TabIndex = 0;
			this.txt.Text = "";
			// 
			// exit
			// 
			this.exit.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.exit.Location = new System.Drawing.Point(484, 120);
			this.exit.Name = "exit";
			this.exit.TabIndex = 8;
			this.exit.Text = "Exit";
			this.exit.Click += new System.EventHandler(this.exit_Click);
			// 
			// saveFile
			// 
			this.saveFile.Filter = "All Files (*.*) | *.*";
			// 
			// fileSizeFromLabel
			// 
			this.fileSizeFromLabel.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.fileSizeFromLabel.Location = new System.Drawing.Point(8, 120);
			this.fileSizeFromLabel.Name = "fileSizeFromLabel";
			this.fileSizeFromLabel.Size = new System.Drawing.Size(360, 16);
			this.fileSizeFromLabel.TabIndex = 9;
			this.fileSizeFromLabel.Text = "File Size ( 0.0 Ko)";
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(570, 152);
			this.Controls.Add(this.fileSizeFromLabel);
			this.Controls.Add(this.exit);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.button1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
			this.Name = "Form1";
			this.Text = "Transfer Files By Converting It\'s to Bytes";
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void browseSource_Click(object sender, System.EventArgs e) {
			if (openFile.ShowDialog()==DialogResult.OK){
				textSource.Text=openFile.FileName;
				}				
				FileStream sizeFile = new FileStream(textSource.Text,FileMode.Open,FileAccess.Read);
				fileSizeFromLabel.Text="File Size ( "+(sizeFile.Length/1024) +" Ko)";
				sizeFile.Close();
				
				
		}

		private void button1_Click(object sender, System.EventArgs e) {				
			
			try{
			pathFrom = textSource.Text ;
			pathTo = textDestination.Text;			
				ThreadStart threadStart = new ThreadStart(lunchThread);
				thread = new Thread(threadStart);		
				thread.Start();			
			}catch(Exception ex)
			{
			MessageBox.Show(ex.ToString());
			}
		}
		private void lunchThread()
		{
			transferFile(pathFrom,pathTo);
		}
		
		private void transferFile(string pathFrom,string pathTo)
		{								
			try{
			FileStream streamRead = new FileStream(pathFrom,FileMode.Open,FileAccess.Read);
			FileStream streamWriter = new FileStream(pathTo,FileMode.CreateNew,FileAccess.ReadWrite);
			int len = (int)streamRead.Length;				
			Byte[] byteFile = new Byte[len];
			streamRead.Read(byteFile,0,len);			
			streamWriter.Write(byteFile,0,byteFile.Length);			
			
			streamRead.Close();	
			streamWriter.Close();		
			MessageBox.Show("Transfered success","Crack_xp Demo",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);	
			}catch (Exception ex){
				MessageBox.Show(ex.ToString(),"Exception in Transfer File",MessageBoxButtons.OK,MessageBoxIcon.Warning);
				MessageBox.Show("Transfered Filed!!","Crack_xp Demo",MessageBoxButtons.OK,MessageBoxIcon.Error);	
			}
					
		}	
		
		private void exit_Click(object sender, System.EventArgs e) {
			Application.Exit();
		}

		private void browseDestination_Click(object sender, System.EventArgs e) {
			try{
			saveFile.FileName=textSource.Text.Remove(0,textSource.Text.LastIndexOf("\\"));
			if (saveFile.ShowDialog()==DialogResult.OK){
				textDestination.Text=saveFile.FileName;
				}
			}catch(Exception ex)	
			{
				MessageBox.Show(ex.ToString(),"Exception in Transfer File",MessageBoxButtons.OK,MessageBoxIcon.Warning);
			}
		}
		
	}
}

 Conclusion

t'es content mainteant SimonKari ??!!!!!

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
  •   BctDepository
    •   bin
      •   Debug
        • BctDepository.exeTélécharger ce fichier [Réservé aux membres club]32 768 octets
        • BctDepository.pdbTélécharger ce fichier [Réservé aux membres club]32 256 octets
    •   obj
      •   Debug
        • temp
        •   TempPE
          • Web References.Bibliocast.Reference.cs.dllTélécharger ce fichier [Réservé aux membres club]7 680 octets
        • BctDepository.exeTélécharger ce fichier [Réservé aux membres club]32 768 octets
        • BctDepository.Form1.resourcesTélécharger ce fichier [Réservé aux membres club]10 964 octets
        • BctDepository.pdbTélécharger ce fichier [Réservé aux membres club]32 256 octets
        • BctDepository.projdataTélécharger ce fichier [Réservé aux membres club]12 296 octets
    • App.icoTélécharger ce fichier [Réservé aux membres club]Voir ce fichier1 078 octets
    • AssemblyInfo.csTélécharger ce fichier [Réservé aux membres club]Voir ce fichier2 426 octets
    • BctDepository.csprojTélécharger ce fichier [Réservé aux membres club]Voir ce fichier4 997 octets
    • BctDepository.csproj.userTélécharger ce fichier [Réservé aux membres club]Voir ce fichier1 803 octets
    • BctDepository.slnTélécharger ce fichier [Réservé aux membres club]Voir ce fichier911 octets
    • BctDepository.suoTélécharger ce fichier [Réservé aux membres club]8 192 octets
    • Form1.csTélécharger ce fichier [Réservé aux membres club]Voir ce fichier9 858 octets
    • Form1.resxTélécharger ce fichier [Réservé aux membres club]Voir ce fichier14 357 octets

Télécharger le zip


 Sources du même auteur

Source avec Zip Source .NET (Dotnet) CONVERTISSEUR PDF
Source avec Zip Source avec une capture Source .NET (Dotnet) MAGIC TABCONTROL (CHANGER LA COULEUR DU TABCONTROL)
Source .NET (Dotnet) SOCKET.SEND METHOD (BYTE[], INT32, INT32, SOCKETFLAGS)
Source .NET (Dotnet) CLASSE KEYPRESSEVENTARGS
Source .NET (Dotnet) DÉTECTION DU TYPE DE NAVIGATEUR DANS WEB FORMS

 Sources de la même categorie

Source avec Zip CHAT SERVER-CLIENT par abderrahmenbilog
Source avec Zip Source avec une capture Source .NET (Dotnet) SIMULATION DE CONSOLE POUR WINDOWS MOBILE par originalcompo
Source avec Zip Source .NET (Dotnet) BASE DE DONNÉES EN XML par DanMor498
Source avec Zip Source avec une capture Source .NET (Dotnet) SIMPLECONV - APPLICATION DE CONVERSION MONÉTAIRE AVEC TAUX E... par Jeffrey_
Source avec Zip Source .NET (Dotnet) TRAITEUR D'IMAGE (MINI) par ycyril

 Sources en rapport avec celle ci

Source avec Zip Source avec une capture Source .NET (Dotnet) RECHERCHE ET GESTION DE FICHIERS PERSONNALISÉES par JeremyLecouvert
Source .NET (Dotnet) GREP POUR WINDOWS par Warny
Source avec Zip Source avec une capture Source .NET (Dotnet) CALCUL D'EMPREINTES DE FICHIERS par lex35
Source .NET (Dotnet) TÉLÉCHARGER UN FICHIER par yoannd
Source avec Zip Source avec une capture Source .NET (Dotnet) SPLITTER DE FICHIERS UTILISANT LES THREADS par AryCooL

Commentaires et avis

Commentaire de microdav le 03/06/2004 19:49:10

Tres sympa, Bonne idee....

Mais a-t-on moyen de voir l'etat de la copie, via un progress bar par exemple. Si oui comment recuperer cette info ?  Y a t il par exemple un evenement qui permettait cela ??

Commentaire de coq le 03/06/2004 20:29:02 administrateur CS

prend un gros fichier (genre 600Mo) et regarde la consommation memoire de ton appli dans "Processus" (RAM et MV en affichant la colonne "taille de la mémoire virtuelle")
tu comprendras tout de suite le probleme de la lecture/ecriture en un coup :)

Commentaire de taharban le 04/06/2004 12:39:33

Pour voir l'état d'avancement tu peux regarder ma source : PROGRESSBAR SUR TÉLÉCHARGEMENT DE FICHIER
http://www.csharpfr.com/code.aspx?ID=22744

Le principe du progressbar est le même en local ou par internet, découper la lecture-écriture et créer un événement à chaque fois qu'un bout est copié (dans mon exemple porgressbar.PerformStep() ).

Commentaire de crack_xp le 04/06/2004 13:03:31

Salut,
effectiuvement coq, ya une grande consommation au niveau de memoire, et la je suis entrain de compiler un nouveau projet tres interessant qui a le meme principe que GetRight, c.a.d spliter un fichier en plusieur morceaux et envoyer les blocs un par un, et les reconstituer dans l'autre coté, l'idée me viens via d'un probleme que j'ai rencontrer lors d'envoie des fichier par le protocole HTTP a un WebService qui s'occupe a le copier dans un autre serveur , le probleme été que le protocole http pouvait transferer au maximum un packet de 1 mo et pas plus....
alors avec le decoupage des fichiers ça marche tres bien, et encore ce nouveau projet contiendra une progress bar selon la demande de microdav :)

Commentaire de ledev le 25/06/2004 00:19:23

Pense à utilisé un MD5sum pour chaque "morceau" envoyée au passage, comme ça en prime tu rajoute un contrôle d'intégrité, et à l'autre bout il peut retélécharger la partie qui va pas :).

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

Copy de Fichier [ par creanova2000 ] &nbsp;&nbsp;Bonjour je desire copier un fichier a l'aide de la fonction File.CopyLe probleme est que je veux voire la progression de la copie avec un C# et les thread ??? [ par adriencollas ] Bonjour a tous,j'ai r&#233;alis&#233; un petit programme qui decode un signale DTMF a partir d'un fichier audio.le temp de calcul est ass&#233; long c Transfert de fichier + Signature [ par pepe013 ] Bonjour, Comment faire pour réaliser un transfert de fichier vers un poste distant qui possede un compte différent ? Sachant que je ne peux pas créer Transfert fichier par usb [ par Diafwl1 ] Bonjour, j'aimerai pouvoir lire et ecrire sur un fichier xml situé sur un PDA par l'intermediaire du port USB, à l'aide d'un programme en C# placé sur Transfert de fichier [ par spawn644 ] Bonjour, je dois r&#233;aliser une application poutr transf&#233;rer des fichiers via tcp/ip. J'ai r&#233;ussi a fauire du transfert de chain de carac Connaître la fin de lecture d'un fichier son [ par benzebuth666 ] Salut tout le monde,J'ai un problème avec la classe SoundPlayer Je voudrais lire un fichier wav et ensuite continuer le déroulement du programme. Mais Transfert d'une base sql vers un fichier exel. [ par Jofouin ] Bonjour à tous !Je réalise un petit logiciel de gestion. Et j'aimerais associer à un événement (quitter l'application) une fonction qui transfert le r transfert d'une collection dans un fichier [ par Jojo092 ] Bonjour &#224; tous,dans le cadre d'un PTI je dois d&#233;velopper un programme pour la gestion d'une biblioth&#232;que. J'ai donc cr&#233;er une coll fichier blob [ par verbeyst ] J'essaie de faire un transfert de fichiers sous le format blob binary large object vers une db sql server. Après un certain temps de transfert je reç


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,546 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales