//..................................................................... /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ButtonCopying_Click(object sender, EventArgs e) { string srcpath = this.TextGithub.Text; string dstpath = this.TextApache.Text; if (string.IsNullOrEmpty(srcpath)) { return; } if (string.IsNullOrEmpty(dstpath)) { return; } this.AppINI.Plus(this.CONST_HANS_GITHUB, srcpath); this.AppINI.Plus(this.CONST_APACHE_ROOT, dstpath); this.AppINI.Save( ); PathFile pathfile = new PathFile( ); pathfile.SeekingPath(srcpath); List <DirectoryInfo> listpath = pathfile.Paths; var listname = from lst in listpath orderby lst.FullName select lst.FullName; foreach (var code in listname) { string newPath = dstpath + code.Substring(srcpath.Length); if (Directory.Exists(newPath)) { continue; } if (newPath.ToLower( ).Contains(".git")) { continue; } Directory.CreateDirectory(newPath); } List <FileInfo> listing = pathfile.SeekingFiles( ); foreach (FileInfo fileinfo in listing) { if (fileinfo.FullName.ToLower( ).Contains("\\.git\\")) { continue; } string newName = fileinfo.FullName .Substring(srcpath.Length); fileinfo.CopyTo(dstpath + newName, true); } Process.Start("explorer.exe", dstpath); return; }