public static string getLocalRepositoryPath(GroupDocsComponent component) { return(GroupDocsComponentsManager.getGroupDocsHomePath() + "gitrepos" + "/" + component.get_name()); }
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { try { UpdateProgress(1); int total = 10; int index = 0; GroupDocsComponentsManager comManager = new GroupDocsComponentsManager(this); foreach (GroupDocsComponent component in GroupDocsComponents.list.Values) { if (component.is_selected()) { GlobalData.SelectedComponent = component.get_name(); if (GroupDocsComponentsManager.libraryAlreadyExists(component.get_downloadFileName())) { component.set_downloaded(true); } else { GroupDocsComponentsManager.addToDownloadList(component, component.get_downloadUrl(), component.get_downloadFileName()); } } decimal percentage = ((decimal)(index + 1) / (decimal)total) * 100; UpdateProgress(Convert.ToInt32(percentage)); index++; } UpdateProgress(100); UpdateText("All operations completed"); } catch (Exception) { } }