示例#1
0
        private void RaiseCompletedEvent(string path)
        {
            FileCompletedEventArgs args = new FileCompletedEventArgs();

            args.FileName = path;

            OnFileCompleted(args);
        }
示例#2
0
        /// <summary>
        /// Event will be raised when a file is done reading.
        /// The event args will contain the filename.
        /// </summary>
        /// <param name="e">Event args</param>
        protected virtual void OnFileCompleted(FileCompletedEventArgs e)
        {
            EventHandler <FileCompletedEventArgs> handler = FileCompleted;

            if (handler != null)
            {
                handler(this, e);
            }
        }
示例#3
0
        static void mfs_FileCompleted(object sender, FileCompletedEventArgs e)
        {
            string path = basePath + "\\TestApp\\TestMessages\\Done";

            FileInfo fi = new FileInfo(e.FileName);
            fi.MoveTo(path + "\\" + fi.Name);
            Console.WriteLine("File '{0}' moved.", fi.Name);
        }
 /// <summary>
 /// Event will be raised when a file is done reading.
 /// The event args will contain the filename.
 /// </summary>
 /// <param name="e">Event args</param>
 protected virtual void OnFileCompleted(FileCompletedEventArgs e)
 {
     EventHandler<FileCompletedEventArgs> handler = FileCompleted;
     if (handler != null)
     {
         handler(this, e);
     }
 }
        private void RaiseCompletedEvent(string path)
        {
            FileCompletedEventArgs args = new FileCompletedEventArgs();
            args.FileName = path;

            OnFileCompleted(args);
        }