Click here to Skip to main content
14,661,500 members
Home » Discussions » Silverlight / WPF
   

Silverlight / WPF

 
AnswerMessage Closed Pin
10-Aug-16 16:19
professionalBeginner Luck10-Aug-16 16:19 
GeneralRe: Basic WPF binding to collection in combobox. Pin
Mycroft Holmes10-Aug-16 17:01
professionalMycroft Holmes10-Aug-16 17:01 
Questionwpf gridview does not have a row selected event Pin
holdorf9-Aug-16 4:26
Memberholdorf9-Aug-16 4:26 
AnswerRe: wpf gridview does not have a row selected event Pin
Richard Deeming9-Aug-16 5:10
mveRichard Deeming9-Aug-16 5:10 
GeneralRe: wpf gridview does not have a row selected event Pin
holdorf9-Aug-16 9:57
Memberholdorf9-Aug-16 9:57 
GeneralRe: wpf gridview does not have a row selected event Pin
Richard Deeming9-Aug-16 10:09
mveRichard Deeming9-Aug-16 10:09 
GeneralRe: wpf gridview does not have a row selected event Pin
holdorf10-Aug-16 2:24
Memberholdorf10-Aug-16 2:24 
QuestionCopy directory with progress bar in WPF Pin
Dadou557-Aug-16 20:12
MemberDadou557-Aug-16 20:12 
Hi,

I'm coding a little application for my company, the idea is very simple:

I would like to copy a directory from a server location to a local folder and I want to show the progress by using a progress bar.

I already integrated the copy of the directory by using this code:

using System;
using System.IO;

class DirectoryCopyExample {
    static void Main() {
        // Copy from the current directory, include subdirectories.
        DirectoryCopy(".", @".\temp", true);
    }

    private static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) {
        // Get the subdirectories for the specified directory.
        DirectoryInfo dir = new DirectoryInfo(sourceDirName);

        if (!dir.Exists) {
            throw new DirectoryNotFoundException("Source directory does not exist or could not be found: " + sourceDirName);
        }

        DirectoryInfo[] dirs = dir.GetDirectories();
        // If the destination directory doesn't exist, create it.
        if (!Directory.Exists(destDirName)) {
            Directory.CreateDirectory(destDirName);
        }

        // Get the files in the directory and copy them to the new location.
        FileInfo[] files = dir.GetFiles();
        foreach(FileInfo file in files) {
            string temppath = Path.Combine(destDirName, file.Name);
            file.CopyTo(temppath, false);
        }

        // If copying subdirectories, copy them and their contents to new location.
        if (copySubDirs) {
            foreach(DirectoryInfo subdir in dirs) {
                string temppath = Path.Combine(destDirName, subdir.Name);
                DirectoryCopy(subdir.FullName, temppath, copySubDirs);
            }
        }
    }
}


For the integration of the progress bar according to the number of files/sizes I can't find anything

Can someone help me with this?

Thank you!
AnswerRe: Copy directory with progress bar in WPF Pin
Richard MacCutchan7-Aug-16 21:14
mveRichard MacCutchan7-Aug-16 21:14 
GeneralRe: Copy directory with progress bar in WPF Pin
Dadou557-Aug-16 21:50
MemberDadou557-Aug-16 21:50 
GeneralRe: Copy directory with progress bar in WPF Pin
Pete O'Hanlon7-Aug-16 22:06
subeditorPete O'Hanlon7-Aug-16 22:06 
GeneralRe: Copy directory with progress bar in WPF Pin
Dadou557-Aug-16 22:38
MemberDadou557-Aug-16 22:38 
GeneralRe: Copy directory with progress bar in WPF Pin
Pete O'Hanlon7-Aug-16 22:46
subeditorPete O'Hanlon7-Aug-16 22:46 
QuestionExecuting a WPF .exe program from an email link Pin
holdorf5-Aug-16 8:07
Memberholdorf5-Aug-16 8:07 
AnswerRe: Executing a WPF .exe program from an email link Pin
Richard Deeming5-Aug-16 8:26
mveRichard Deeming5-Aug-16 8:26 
AnswerRe: Executing a WPF .exe program from an email link Pin
holdorf5-Aug-16 9:40
Memberholdorf5-Aug-16 9:40 
GeneralRe: Executing a WPF .exe program from an email link Pin
Dave Kreskowiak5-Aug-16 9:45
mveDave Kreskowiak5-Aug-16 9:45 
AnswerRe: Executing a WPF .exe program from an email link Pin
Richard MacCutchan5-Aug-16 20:42
mveRichard MacCutchan5-Aug-16 20:42 
AnswerRe: Executing a WPF .exe program from an email link Pin
Gerry Schmitz6-Aug-16 7:07
mveGerry Schmitz6-Aug-16 7:07 
GeneralRe: Executing a WPF .exe program from an email link Pin
holdorf7-Aug-16 11:26
Memberholdorf7-Aug-16 11:26 
GeneralRe: Executing a WPF .exe program from an email link Pin
Gerry Schmitz7-Aug-16 12:16
mveGerry Schmitz7-Aug-16 12:16 
QuestionResourceDictionary swapped at run-time only applies to MainWindow Pin
James J M5-Aug-16 6:51
MemberJames J M5-Aug-16 6:51 
AnswerRe: ResourceDictionary swapped at run-time only applies to MainWindow Pin
Richard Deeming5-Aug-16 7:02
mveRichard Deeming5-Aug-16 7:02 
GeneralRe: ResourceDictionary swapped at run-time only applies to MainWindow Pin
James J M5-Aug-16 7:18
MemberJames J M5-Aug-16 7:18 
QuestionKeepTextBoxDisplaySynchronizedWithTextProperty Pin
Kevin Marois28-Jul-16 7:18
professionalKevin Marois28-Jul-16 7:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.