public static string readVersion(AsposeComponent component)
        {
            string localPath = getLibaryDownloadPath() + component.get_name() + ".ver";
            string line      = string.Empty;

            try
            {
                return(System.IO.File.ReadAllText(localPath));
            }
            catch (Exception) { }
            return(line);
        }
        public void storeReleaseNotes(AsposeComponent component)
        {
            string localPath = getLibaryDownloadPath() + component.get_name() + ".htm";

            try
            {
                System.IO.File.WriteAllText(localPath, component.get_changeLog());
            }
            catch (FileNotFoundException e)
            {
            }
            catch (Exception e)
            {
            }
        }
        public static void storeVersion(AsposeComponent component)
        {
            string localPath = getLibaryDownloadPath() + component.get_name() + ".ver";

            try
            {
                System.IO.File.WriteAllText(localPath, component.get_latestVersion());
            }
            catch (FileNotFoundException e)
            {
            }
            catch (Exception e)
            {
            }
        }
Esempio n. 4
0
 /**
  * 
  * @param component
  * @return
  */
 public static string getLocalRepositoryPath(AsposeComponent component)
 {
     return AsposeComponentsManager.getAsposeHomePath() + "gitrepos" + "/" + component.get_name();
 }
        public void storeReleaseNotes(AsposeComponent component)
        {
            string localPath = getLibaryDownloadPath() + component.get_name() + ".htm";
            try
            {
                System.IO.File.WriteAllText(localPath, component.get_changeLog());
            }
            catch (FileNotFoundException e)
            {

            }
            catch (Exception e)
            {

            }

        }
        public static string readVersion(AsposeComponent component)
        {
            string localPath = getLibaryDownloadPath() + component.get_name() + ".ver";
            string line = string.Empty;

            try
            {
                return System.IO.File.ReadAllText(localPath);
            }
            catch (Exception) { }
            return line;
        }
        public static void storeVersion(AsposeComponent component)
        {
            string localPath = getLibaryDownloadPath() + component.get_name() + ".ver";
            try
            {
                System.IO.File.WriteAllText(localPath, component.get_latestVersion());
            }
            catch (FileNotFoundException e)
            {

            }
            catch (Exception e)
            {

            }

        }
 /**
  *
  * @param component
  * @return
  */
 public static string getLocalRepositoryPath(AsposeComponent component)
 {
     return(AsposeComponentsManager.getAsposeHomePath() + "gitrepos" + "/" + component.get_name());
 }
        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);
                }
            }

        }