private void DownloadFile(string[] filepath) { string npath = ""; if (flag == 2) { npath = @"SchoolInteligentUSB\FileRoom"; CreateFolder(npath); } else { npath = @"SchoolInteligentUSB\BookRoom"; CreateFolder(npath); } System.Windows.Forms.FolderBrowserDialog dlg = new System.Windows.Forms.FolderBrowserDialog() { ShowNewFolderButton = true, Description = "Select the directory that you want to use as the default.", SelectedPath = System.IO.Path.Combine(usbpath, npath), // RootFolder = new DirectoryInfo(System.IO.Path.Combine(usbpath, npath)), }; dlg.ShowDialog(); //프로그래스바 ㄱㄱ MultiProgressBar mbar = new MultiProgressBar(service, filepath, flag, dlg.SelectedPath); mbar.getfile += GetFile; mbar.Show(); }
private void DownloadedBookCheck() { ArrayList downfilelist = new ArrayList(); string[] fileinfo; foreach (string str in service.GetUploadedXmlInfo(1)) { fileinfo = new string[2]; fileinfo = str.Split('\a'); if (Xml.DownloadedXml.DownloadedBookCheck(fileinfo[0].ToString(), fileinfo[1].ToString()) != null) { downfilelist.Add(Xml.DownloadedXml.DownloadedBookCheck(fileinfo[0].ToString(), fileinfo[1].ToString())); } } if (downfilelist.Count != 0) { StorageFileInfo[] files = null; files = service.List(null, 1); // double fileSize = 0; string[] Time = new string[downfilelist.Count]; for (int i = 0; i < downfilelist.Count; i++) { foreach (var file in files) { if (downfilelist[i].ToString() == file.VirtualPathk__BackingField) { Time[i] = file.Timek__BackingField.ToString(); } } } //프로그래스바 ㄱㄱ string realpath = usbpath + @"SchoolInteligentUSB\BookRoom"; MultiProgressBar mbar = new MultiProgressBar(service, (string[])downfilelist.ToArray(typeof(string)), 1, realpath); mbar.Closed += mbar_Closed; mbar.Show(); for (int i = 0; i < downfilelist.Count; i++) { Xml.DownloadedXml.DownloadedBookWrite(downfilelist[i].ToString(), Time[i]); } } }