private void CloneOrCheckOutRepo(AsposeComponent component) { downloadTaskCompleted = false; timer1.Start(); Task repoUpdateWorker = new Task(delegate { CloneOrCheckOutRepoWorker(component); }); //repoUpdateWorker.ContinueWith(result => RepositoryUpdateCompleted(), TaskContinuationOptions.OnlyOnRanToCompletion); repoUpdateWorker.Start(); progressTask = new Task(delegate { progressDisplayTask(); }); progressBar.Enabled = true; progressTask.Start(); ContinueButton.Enabled = false; if (GitHelper.isExamplesDefinitionsPresent(component)) { toolStripStatusMessage.Text = "Please wait while the Examples are being downloaded..."; } else { toolStripStatusMessage.Text = "Please wait while the Examples are being downloaded..."; } }
private void checkAndUpdateRepo(AsposeComponent component) { if (null == component) { return; } if (null == component.get_remoteExamplesRepository() || component.RemoteExamplesRepository == string.Empty) { showMessage("Examples not available", component.get_name() + " - " + Constants.EXAMPLES_NOT_AVAILABLE_MESSAGE, MessageBoxButtons.OK, MessageBoxIcon.Information); examplesNotAvailable = true; validateForm(); return; } else { examplesNotAvailable = false; validateForm(); } // String repoPath; if (GitHelper.isExamplesDefinitionsPresent(component)) { CloneOrCheckOutRepo(component); } else { DialogResult result = showMessage("Examples download required", component.get_name() + " - " + Constants.EXAMPLES_DOWNLOAD_REQUIRED, MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (result == DialogResult.Yes) { if (AsposeComponentsManager.isIneternetConnected()) { CloneOrCheckOutRepo(component); } else { showMessage(Constants.INTERNET_CONNECTION_REQUIRED_MESSAGE_TITLE, component.get_name() + " - " + Constants.EXAMPLES_INTERNET_CONNECTION_REQUIRED_MESSAGE, MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }
private void CloneOrCheckOutRepoWorker(AsposeComponent component) { GitHelper.CloneOrCheckOutRepo(component); downloadTaskCompleted = true; }
void processComponents() { if (checkBoxAsposeCells.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_CELLS, out component); component.Selected = true; } if (checkBoxAsposeWords.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_WORDS, out component); component.Selected = true; } if (checkBoxAsposePdf.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_PDF, out component); component.Selected = true; } if (checkBoxAsposeSlides.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_SLIDES, out component); component.Selected = true; } if (checkBoxAsposeDiagram.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_DIAGRAM, out component); component.Selected = true; } if (checkBoxAsposeBarCode.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_BARCODE, out component); component.Selected = true; } if (checkBoxAsposeTasks.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_TASKS, out component); component.Selected = true; } if (checkBoxAsposeEmail.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_EMAIL, out component); component.Selected = true; } if (checkBoxAsposeOCR.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_OCR, out component); component.Selected = true; } if (checkBoxAsposeImaging.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_IMAGING, out component); component.Selected = true; } if (checkBoxAsposeNote.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_NOTE, out component); component.Selected = true; } if (checkBoxAspose3D.Checked) { AsposeComponent component = new AsposeComponent(); AsposeComponents.list.TryGetValue(Constants.ASPOSE_3D, out component); component.Selected = true; } }